diff --git a/app/js/app.js b/app/js/app.js index d959430..7cc48ea 100644 --- a/app/js/app.js +++ b/app/js/app.js @@ -385,8 +385,19 @@ .run(['$rootScope', '$state', 'LoginService', 'AUTH_EVENTS', function($rootScope, $state, LoginService, AUTH_EVENTS) { $rootScope.$on('$stateChangeStart', function (event, next, nextParams, fromState) { //console.log("from",from, "fromState",fromState) + $rootScope.isShowEmail = false; + $rootScope.isShowFMA = false; $rootScope.previousState = fromState.name; $rootScope.currentUser = JSON.parse(window.localStorage.getItem('currentUser')); + var EPDAccess = JSON.parse(window.localStorage.getItem('EPDAccess')); + var FMAAccess = JSON.parse(window.localStorage.getItem('FMAAccess')); + if(EPDAccess === true || EPDAccess == null){ + $rootScope.isShowEmail = true; + } + if(FMAAccess === true || FMAAccess == null){ + $rootScope.isShowFMA = true; + } + // console.log("nextParams",nextParams) /*LoginService.isAuthorized = function (authorizedRoles) { if (!angular.isArray(authorizedRoles)) { diff --git a/app/partials/dashboard/dashboard.controller.js b/app/partials/dashboard/dashboard.controller.js index 4341541..bc830fb 100644 --- a/app/partials/dashboard/dashboard.controller.js +++ b/app/partials/dashboard/dashboard.controller.js @@ -13,6 +13,7 @@ } $scope.logout = function () { + localStorage.clear(); localStorage.removeItem("loginStatus"); $rootScope.path = false; $state.reload(); diff --git a/app/partials/dashboard/dashboard.html b/app/partials/dashboard/dashboard.html index 4ef9ca8..395f99d 100644 --- a/app/partials/dashboard/dashboard.html +++ b/app/partials/dashboard/dashboard.html @@ -158,7 +158,7 @@ table tr:nth-child(even) {
diff --git a/app/partials/viewCompany/viewCompany.html b/app/partials/viewCompany/viewCompany.html index 5aa794d..b1de0dc 100644 --- a/app/partials/viewCompany/viewCompany.html +++ b/app/partials/viewCompany/viewCompany.html @@ -210,7 +210,7 @@