1
0
mirror of https://github.com/bitwarden/web synced 2025-12-11 22:03:21 +00:00

org settings and billing

This commit is contained in:
Kyle Spearrin
2017-04-06 16:52:25 -04:00
parent 7591843220
commit 80e4d2329a
8 changed files with 249 additions and 9 deletions

View File

@@ -1,6 +1,23 @@
angular
.module('bit.organization')
.controller('organizationSettingsController', function ($scope) {
.controller('organizationSettingsController', function ($scope, $state, apiService, toastr, authService) {
$scope.model = {};
$scope.$on('$viewContentLoaded', function () {
apiService.organizations.get({ id: $state.params.orgId }, function (org) {
$scope.model = {
name: org.Name,
billingEmail: org.BillingEmail,
businessName: org.BusinessName
};
});
});
$scope.generalSave = function () {
$scope.generalPromise = apiService.organizations.put({ id: $state.params.orgId }, $scope.model, function (org) {
authService.updateProfileOrganization(org).then(function (updatedOrg) {
toastr.success('Organization has been updated.', 'Success!');
});
}).$promise;
};
});