Add all plans to the map in the org admin
This commit is contained in:
parent
8615e9236b
commit
51dc9c9132
1 changed files with 9 additions and 3 deletions
|
@ -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;
|
||||
|
|
Reference in a new issue