parent
d63ec8c6b0
commit
fe735b8048
25 changed files with 784 additions and 614 deletions
|
@ -16,9 +16,10 @@
|
|||
$scope.namespace = orgname;
|
||||
$scope.showLogsCounter = 0;
|
||||
$scope.showApplicationsCounter = 0;
|
||||
$scope.showInvoicesCounter = 0;
|
||||
$scope.showBillingCounter = 0;
|
||||
$scope.showRobotsCounter = 0;
|
||||
$scope.showTeamsCounter = 0;
|
||||
$scope.changeEmailInfo = null;
|
||||
|
||||
$scope.orgScope = {
|
||||
'changingOrganization': false,
|
||||
|
@ -67,8 +68,8 @@
|
|||
$scope.showTeamsCounter++;
|
||||
};
|
||||
|
||||
$scope.showInvoices = function() {
|
||||
$scope.showInvoicesCounter++;
|
||||
$scope.showBilling = function() {
|
||||
$scope.showBillingCounter = true;
|
||||
};
|
||||
|
||||
$scope.showApplications = function() {
|
||||
|
@ -79,25 +80,27 @@
|
|||
$scope.showLogsCounter++;
|
||||
};
|
||||
|
||||
$scope.changeEmail = function() {
|
||||
UIService.hidePopover('#changeEmailForm input');
|
||||
$scope.showChangeEmail = function() {
|
||||
$scope.changeEmailInfo = {
|
||||
'email': $scope.organization.email
|
||||
};
|
||||
};
|
||||
|
||||
$scope.orgScope.changingOrganization = true;
|
||||
$scope.changeEmail = function(info, callback) {
|
||||
var params = {
|
||||
'orgname': orgname
|
||||
};
|
||||
|
||||
var data = {
|
||||
'email': $scope.orgScope.organizationEmail
|
||||
var details = {
|
||||
'email': $scope.changeEmailInfo.email
|
||||
};
|
||||
|
||||
ApiService.changeOrganizationDetails(data, params).then(function(org) {
|
||||
$scope.orgScope.changingOrganization = false;
|
||||
$scope.organization = org;
|
||||
}, function(result) {
|
||||
$scope.orgScope.changingOrganization = false;
|
||||
UIService.showFormError('#changeEmailForm input', result, 'right');
|
||||
});
|
||||
var errorDisplay = ApiService.errorDisplay('Could not change email address', callback);
|
||||
|
||||
ApiService.changeOrganizationDetails(details, params).then(function() {
|
||||
$scope.organization.email = $scope.changeEmailInfo.email;
|
||||
callback(true);
|
||||
}, errorDisplay);
|
||||
};
|
||||
}
|
||||
})();
|
Reference in a new issue