*
* ============LICENSE_END============================================
*
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ *
*/
'use strict';
(function () {
class ApplicationsCtrl {
constructor($log, $cookies, conf, ngDialog,
- applicationsService, confirmBoxService, userProfileService, utilsService,$modal) {
+ applicationsService, confirmBoxService, userProfileService, utilsService,$modal,$scope) {
this.emptyImgForPreview = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';
+ $scope.isAdmin = false;
let getOnboardingApps = () => {
this.isLoadingTable = true;
applicationsService.getOnboardingApps()
appsList[i].imageLink = appsList[i].imageLink+'?' + new Date().getTime();
}
}
+ if(appsList.length == 0)
+ {
+ confirmBoxService.showInformation('You do not have applications to edit').then(isConfirmed => {});
+ }
this.appsList = appsList;
}).catch(err => {
confirmBoxService.showInformation('There was a problem retrieving the Applications. ' +
});
};
+ let checkIfUserIsSuperAdmin = () => {
+ applicationsService.checkIfUserIsSuperAdmin().then(res => {
+ if(res) {
+ $scope.isAdmin = true;
+ }
+ }).catch(err => {
+ $log.error('ApplicationsCtrl.checkIfUserIsSuperAdmin:: Failed - ' + err);
+ }).finally(()=> {
+ this.isSaving = false;
+ });
+ };
+
let init = () => {
this.isLoadingTable = false;
+ checkIfUserIsSuperAdmin();
getOnboardingApps();
this.searchString = '';
this.appsTableHeaders = [
}
}
ApplicationsCtrl.$inject = ['$log', '$cookies', 'conf', 'ngDialog',
- 'applicationsService', 'confirmBoxService', 'userProfileService', 'utilsService','$modal'];
+ 'applicationsService', 'confirmBoxService', 'userProfileService', 'utilsService','$modal', '$scope'];
angular.module('ecompApp').controller('ApplicationsCtrl', ApplicationsCtrl);
})();