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:
@@ -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;
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user