diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index 880fc9e..ea1269e 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -225,7 +225,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic $rootScope.isVisibleLogin = false; $rootScope.haveRoleAdmin = true; localStorage.setItem('loggedInUserDetails', JSON.stringify(result)); - $('#dvUserModulesInfo').modal('show'); + ShowAssignedModulesPopup(result.Modules); $location.path('/'); } @@ -236,7 +236,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic $rootScope.isVisibleLogin = false; $rootScope.haveRoleAdmin = false; localStorage.setItem('loggedInUserDetails', JSON.stringify(result)); - $('#dvUserModulesInfo').modal('show'); + ShowAssignedModulesPopup(result.Modules); $location.path('/'); } @@ -267,6 +267,27 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic $("#messageModal").modal('show'); } } + } + + function ShowAssignedModulesPopup(userModules) { + var allModules = Modules; + var elemId = 0; + for (var module = 0; module <= allModules.length; module++) { + elemId = module + 1; // Id starts from 1 + $('#moduleDiv' + elemId).hide(); + } + for (var count = 0; count < userModules.length; count++) { + for (var module = 0; module < allModules.length; module++) { + if (userModules[count].name.trim() == allModules[module].Name.trim()) { + elemId = count + 1; // Id starts from 1 + $('#moduleDiv' + elemId).show(); + break; + } + } + } + if (userModules.length > 0) { + $('#dvUserModulesInfo').modal('show'); + } } $rootScope.UpdateLicenseTermStatus = function () { $('#dvTermCondition').fadeOut(); @@ -290,7 +311,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic $rootScope.isVisibleLogin = false; $rootScope.userData = userInfo; $rootScope.userModules = userInfo.Modules; - $('#dvUserModulesInfo').modal('show'); + ShowAssignedModulesPopup(userInfo.Modules);; } } } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js b/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js index 0d2f810..80b49c5 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js @@ -232,7 +232,7 @@ AIA.constant('Modules', [ }, { Id: 7, - Name: 'Anatomy Tests', + Name: 'Anatomy Test', }, { Id: 8, @@ -240,11 +240,11 @@ AIA.constant('Modules', [ }, { Id: 9, - Name: 'ADAM Images', + Name: 'A.D.A.M. Images', }, { Id: 10, - Name: 'ADAM On Demand', + Name: 'A.D.A.M. OnDemand', }, { Id: 11, @@ -262,7 +262,7 @@ AIA.constant('Modules', [ }, { Id: 14, - Name: 'Complementary and Alternative Medicine', + Name: 'CAM', //Complementary and Alternative Medicine' }, { Id: 15, @@ -270,7 +270,7 @@ AIA.constant('Modules', [ }, { Id: 16, - Name: 'Health Navigator', + Name: 'Symptom Navigator', //Health Navigator', }, { Id: 17, diff --git a/400-SOURCECODE/AIAHTML5.Web/index.html b/400-SOURCECODE/AIAHTML5.Web/index.html index 81a2425..3fafc9b 100644 --- a/400-SOURCECODE/AIAHTML5.Web/index.html +++ b/400-SOURCECODE/AIAHTML5.Web/index.html @@ -1150,7 +1150,7 @@