diff options
author | 2017-08-23 18:27:19 -0400 | |
---|---|---|
committer | 2017-08-23 21:12:56 -0400 | |
commit | 978dbcf0a196acbafad72fe1e2478ec0e384f02f (patch) | |
tree | 17e1ceaa4a12a599320cbb317947e990bf1a5383 /ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.controller.js | |
parent | bc7350dce5b7b1dcd1c472a3922b42c4ea99809d (diff) |
Deliver centralized role management feature
Repair multiple defects also.
Revise deployment to use docker-compose.
Remove all zip archives.
Issue: PORTAL-21, PORTAL-25, PORTAL-28, PORTAL-52, PORTAL-69,
PORTAL-74, PORTAL-76, PORTAL-80, PORTAL-82
Change-Id: Ie72fec7d35ba78beb162bba6ed27b2caee340c61
Signed-off-by: Christopher Lott (cl778h) <clott@research.att.com>
Diffstat (limited to 'ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.controller.js')
-rw-r--r-- | ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.controller.js | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.controller.js b/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.controller.js index 9aec9b4f..a5ba0215 100644 --- a/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.controller.js +++ b/ecomp-portal-FE-common/client/app/views/admins/add-admin-dialogs/new-admin.controller.js @@ -21,15 +21,14 @@ 'use strict'; (function () { class NewAdminModalCtrl { - constructor($log, adminsService, $scope, confirmBoxService, utilsService, $location) { - + constructor($log, adminsService, $scope, confirmBoxService, utilsService, $location, items) { let init = () => { this.isSaving = false; this.originalApps = []; /* istanbul ignore if */ - if ($scope.ngDialogData && $scope.ngDialogData.selectedUser && $scope.ngDialogData.dialogState) { - this.selectedUser = $scope.ngDialogData.selectedUser; - this.dialogState = $scope.ngDialogData.dialogState; + if (items && items.selectedUser && items.dialogState) { + this.selectedUser = items.selectedUser; + this.dialogState = items.dialogState; this.isShowBack = false; if (this.dialogState === 2) { this.getAdminAppsRoles(); @@ -162,7 +161,7 @@ $log.debug('Admin apps roles updated successfully!', res); //close and resolve dialog promise with true (to update the table) this.remindToAddUserIfNecessary(); - $scope.closeThisDialog(true); + $scope.$dismiss('cancel'); }).catch(err => { $log.error('NewAdminModalCtrl.updateAdminAppsRoles:: Failed - ' + err); }).finally(()=> { @@ -193,7 +192,7 @@ * add it to the user administrated apps list */ $scope.$watch('newAdmin.selectedNewApp.value', (newVal) => { - var newVal= JSON.parse(newVal); + if(newVal) var newVal= JSON.parse(newVal); if (!newVal || newVal.isAdmin === undefined) { return; } @@ -248,6 +247,6 @@ } } - NewAdminModalCtrl.$inject = ['$log', 'adminsService', '$scope', 'confirmBoxService', 'utilsService', '$location']; + NewAdminModalCtrl.$inject = ['$log', 'adminsService', '$scope', 'confirmBoxService', 'utilsService', '$location', 'items']; angular.module('ecompApp').controller('NewAdminModalCtrl', NewAdminModalCtrl); })(); |