From 51dc9c91327e8020e6507b95de5919cc4a09c975 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Wed, 13 Nov 2013 18:00:51 -0500 Subject: [PATCH] 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;