1
0
mirror of https://github.com/bitwarden/web synced 2025-12-06 00:03:28 +00:00
Files
web/src/app/global/paidOrgRequiredController.js
Kyle Spearrin 715835c12f lint fixes
2017-07-14 14:32:26 -04:00

27 lines
863 B
JavaScript

angular
.module('bit.global')
.controller('paidOrgRequiredController', function ($scope, $state, $uibModalInstance, $analytics, $uibModalStack, orgId,
constants, authService) {
$analytics.eventTrack('paidOrgRequiredController', { category: 'Modal' });
authService.getUserProfile().then(function (profile) {
$scope.admin = profile.organizations[orgId].type !== constants.orgUserType.user;
});
$scope.go = function () {
if (!$scope.admin) {
return;
}
$analytics.eventTrack('Get Paid Org');
$state.go('backend.org.billing', { orgId: orgId }).then(function () {
$uibModalStack.dismissAll();
});
};
$scope.close = function () {
$uibModalInstance.dismiss('close');
};
});