From 51dc9c91327e8020e6507b95de5919cc4a09c975 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Wed, 13 Nov 2013 18:00:51 -0500 Subject: [PATCH 1/3] Add all plans to the map in the org admin --- static/js/controllers.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/static/js/controllers.js b/static/js/controllers.js index e74c048ac..e4e3d5d4f 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -1188,9 +1188,15 @@ function OrgAdminCtrl($rootScope, $scope, Restangular, $routeParams, UserService PlanService.getPlans(function(plans) { $scope.plans = plans.business; $scope.plan_map = {}; - for (var i = 0; i < plans.business.length; ++i) { - $scope.plan_map[plans.business[i].stripeId] = plans.business[i]; - } + + var addPlans = function(plans) { + for (var i = 0; i < plans.length; ++i) { + $scope.plan_map[plans[i].stripeId] = plans[i]; + } + }; + + addPlans(plans.user); + addPlans(plans.business); }); var orgname = $routeParams.orgname; From 971c55608ecd8b8d941dd77bce250f77ec674a21 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Wed, 13 Nov 2013 18:04:34 -0500 Subject: [PATCH 2/3] Remove plan price in invoice --- static/partials/org-admin.html | 1 - 1 file changed, 1 deletion(-) diff --git a/static/partials/org-admin.html b/static/partials/org-admin.html index bba531439..b0102534d 100644 --- a/static/partials/org-admin.html +++ b/static/partials/org-admin.html @@ -69,7 +69,6 @@
Plan
{{ plan_map[invoice.plan].title }} - {{ plan_map[invoice.plan].price / 100 }}
From 318dc79de333355a4e336aefb260a2b9096f4558 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Wed, 13 Nov 2013 18:06:06 -0500 Subject: [PATCH 3/3] Add the payment failed case --- static/partials/org-admin.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/partials/org-admin.html b/static/partials/org-admin.html index b0102534d..1ed36b0c5 100644 --- a/static/partials/org-admin.html +++ b/static/partials/org-admin.html @@ -52,7 +52,8 @@ Paid - Thank you! - Payment failed - Will retry soon + Payment failed + Payment failed - Will retry soon Payment pending