mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
24 lines
946 B
JavaScript
24 lines
946 B
JavaScript
angular
|
|
.module('bit.organization')
|
|
|
|
.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;
|
|
};
|
|
});
|