diff --git a/150-DOCUMENTATION/Testing Data/UserDetails.xlsx b/150-DOCUMENTATION/Testing Data/UserDetails.xlsx new file mode 100644 index 0000000..ac75dab --- /dev/null +++ b/150-DOCUMENTATION/Testing Data/UserDetails.xlsx diff --git a/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs b/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs index 4ff8923..7128c81 100644 --- a/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs +++ b/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs @@ -67,6 +67,7 @@ namespace AIAHTML5.API.Models foreach (DataRow drModule in dt.Rows) { userModuleHash = new Hashtable(); + userModuleHash.Add(AIAConstants.KEY_ID, drModule["Id"]); userModuleHash.Add(AIAConstants.KEY_NAME, drModule["Name"]); userModuleHash.Add(AIAConstants.KEY_SLUG, drModule["Slug"]); arrUserModules.Add(userModuleHash); @@ -207,6 +208,7 @@ namespace AIAHTML5.API.Models foreach (DataRow dr in dt.Rows) { modulesHash = new Hashtable(); + modulesHash.Add(AIAConstants.KEY_ID, dr["Id"]); modulesHash.Add(AIAConstants.KEY_NAME, dr["Title"]); modulesHash.Add(AIAConstants.KEY_SLUG, dr["Slug"]); userModulelist.Add(modulesHash); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index d194d6b..471d3bc 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -272,16 +272,17 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic 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 module = 1; module <= allModules.length; module++) { + $('#moduleDiv' + module).hide(); } + if (('#moduleDiv1017').length > 0) { + $('#moduleDiv1017').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(); + if (userModules[count].id == allModules[module].Id) { + $('#moduleDiv' + userModules[count].id).show(); break; } } diff --git a/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js b/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js index 80b49c5..a82768c 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js @@ -204,7 +204,7 @@ AIA.constant('DA', [ }, ]); - +// These constants are same as in Database table ResourceModule, we have to maintain the module order and module id mention in the same order AIA.constant('Modules', [ { Id: 1, @@ -226,56 +226,56 @@ AIA.constant('Modules', [ Id: 5, Name: 'Clinical Animations', }, - { - Id: 6, - Name: 'Curriculum Builder', - }, + { + Id: 6, + Name: 'Encyclopedia', + + }, { Id: 7, - Name: 'Anatomy Test', + Name: 'Curriculum Builder', }, { Id: 8, - Name: 'Lab Exercises', - }, - { - Id: 9, - Name: 'A.D.A.M. Images', + Name: 'Anatomy Test', }, + { + Id: 9, + Name: 'IP 10', + }, { Id: 10, - Name: 'A.D.A.M. OnDemand', - }, - { - Id: 11, - Name: 'Encyclopedia', - + Name: 'Lab Exercises', }, + { + Id: 11, + Name: 'In-Depth Reports', + }, { Id: 12, - Name: 'IP 10', + Name: 'CAM', //Complementary and Alternative Medicine' }, - { Id: 13, - Name: 'In-Depth Reports', - }, - { - Id: 14, - Name: 'CAM', //Complementary and Alternative Medicine' + Name: 'A.D.A.M. Images', }, + { + Id: 14, + Name: 'Body Guide', + }, { Id: 15, - Name: 'Body Guide', + Name: 'Symptom Navigator', //Health Navigator', }, { Id: 16, - Name: 'Symptom Navigator', //Health Navigator', + Name: 'The Wellness Tools', }, { - Id: 17, - Name: 'The Wellness Tools', + Id: 1017, // Updated from 17 to 1017 to match with database Id + Name: 'A.D.A.M. OnDemand', }, + ]); AIA.constant('BodyViewws', [ @@ -308,59 +308,59 @@ AIA.constant("LoginConstants", { "MAIL_SENT": "Mail sent.", "SQL_CONNECTION_ERROR": "We are unable to connect with database. Please contact customer support", "EXCEPTION_OCCURED": "We are facing some issue. Please try to login after sometime.", - "E_NO_ERROR": "0", - "E_USER_NOT_EXIST": "1", - "E_PASSWORD_NOT_MATCH": "2", - "E_USER_ID_BLOCKED_24_HRS": "3", - "E_USER_NOT_ACTIVE": "4", - "E_USER_ID_WILL_BLOCKED": "5", - "E_EMAIL_ID_NOT_EXIT": "6", - "E_LICENCE_IS_INACTIVE": "7", - "E_USER_NOT_MAP_TO_LICENCE_EDITION": "8", - "E_NO_ROW_FOUND_LICENCE_TO_EDITION_TABLE": "9", - "E_NO_ROW_FOUND_LICENCE_TABLE": "10", - "E_SECURITY_QUEST_NOT_MATCH": "11", - "E_SEQURITY_ANSWER_NOT_MATCH": "12", - "E_FORGOT_USER_ID_EMAIL_ID_NOT_EXIT": "13", - "E_TOTAL_NUMBER_LOGIN_EXCEED": "14", - "E_FORGOT_PASSWORD_EMAIL_ID_NOT_EXIST": "15", - "E_TEST_SETUP_ACCOUNT_USER_NAME_EXIST": "16", - "E_TEST_SETUP_ACCOUNT_EMAILID_EXIST": "17", - "E_SP_ERROR": "18", - "E_ACCOUNT_NUMBER_NOT_EXIST": "19", - "E_ACCOUNT_NUMBER_ALREADY_EXIST": "20", - "E_TEST_ACCOUNT_CREATED_MAIL_COULD_NOT_SENT": "21", - "E_MAIL_COULD_NOT_SENT": "22", - "E_RESELLER_ACCOUNT_CREATED_MAIL_COULD_NOT_SENT": "23", - "E_LICENSE_TERM_CONDITION": "24", - "E_EDITION_NOT_LINKED_WITH_SITE": "25", - "E_LOGIN_SESSION_EXPIRE": "26", - "E_DISCOUNT_CODE_NOT_EXIST": "27", - "E_DISCOUNT_CODE_ALREADY_EXIST": "28", - - "E_SITE_IP_NOT_NULL": "29", - "E_EDITION_ID_NOT_NULL": "30", - "E_MASTER_SITEIP_NOT_EXIST": "31", - "EDITION_ID_NOT_EXIST": "32", - "E_ERROR_LOG": "33", - "E_MASTER_SITE_ALREADY_EXIST": "34", - "E_ACCOUNT_NUMBER_NOT_NULL": "35", - "E_SITE_IP_ALREADY_EXIST": "36", - - - "E_LICENCE_IS_EXPIRED": "37", - "E_SINGLEACCOUNT_IS_BEING_USED": "38", - - - "E_DATA_BASE_CONNECTION": "4060", - - - //login failure error constant - "ACCOUNT_NUMBER_NOT_NULL": "4", - "EDITION_ID_NOT_NULL": "5", - "ACCOUNT_NUMBER_NOT_EXIST": "1", - "EDITION_NOT_EXIST": "3", - "MASTER_SITEIP_NOT_EXIST": "2", + "E_NO_ERROR": "0", + "E_USER_NOT_EXIST": "1", + "E_PASSWORD_NOT_MATCH": "2", + "E_USER_ID_BLOCKED_24_HRS": "3", + "E_USER_NOT_ACTIVE": "4", + "E_USER_ID_WILL_BLOCKED": "5", + "E_EMAIL_ID_NOT_EXIT": "6", + "E_LICENCE_IS_INACTIVE": "7", + "E_USER_NOT_MAP_TO_LICENCE_EDITION": "8", + "E_NO_ROW_FOUND_LICENCE_TO_EDITION_TABLE": "9", + "E_NO_ROW_FOUND_LICENCE_TABLE": "10", + "E_SECURITY_QUEST_NOT_MATCH": "11", + "E_SEQURITY_ANSWER_NOT_MATCH": "12", + "E_FORGOT_USER_ID_EMAIL_ID_NOT_EXIT": "13", + "E_TOTAL_NUMBER_LOGIN_EXCEED": "14", + "E_FORGOT_PASSWORD_EMAIL_ID_NOT_EXIST": "15", + "E_TEST_SETUP_ACCOUNT_USER_NAME_EXIST": "16", + "E_TEST_SETUP_ACCOUNT_EMAILID_EXIST": "17", + "E_SP_ERROR": "18", + "E_ACCOUNT_NUMBER_NOT_EXIST": "19", + "E_ACCOUNT_NUMBER_ALREADY_EXIST": "20", + "E_TEST_ACCOUNT_CREATED_MAIL_COULD_NOT_SENT": "21", + "E_MAIL_COULD_NOT_SENT": "22", + "E_RESELLER_ACCOUNT_CREATED_MAIL_COULD_NOT_SENT": "23", + "E_LICENSE_TERM_CONDITION": "24", + "E_EDITION_NOT_LINKED_WITH_SITE": "25", + "E_LOGIN_SESSION_EXPIRE": "26", + "E_DISCOUNT_CODE_NOT_EXIST": "27", + "E_DISCOUNT_CODE_ALREADY_EXIST": "28", + + "E_SITE_IP_NOT_NULL": "29", + "E_EDITION_ID_NOT_NULL": "30", + "E_MASTER_SITEIP_NOT_EXIST": "31", + "EDITION_ID_NOT_EXIST": "32", + "E_ERROR_LOG": "33", + "E_MASTER_SITE_ALREADY_EXIST": "34", + "E_ACCOUNT_NUMBER_NOT_NULL": "35", + "E_SITE_IP_ALREADY_EXIST": "36", + + + "E_LICENCE_IS_EXPIRED": "37", + "E_SINGLEACCOUNT_IS_BEING_USED": "38", + + + "E_DATA_BASE_CONNECTION": "4060", + + + //login failure error constant + "ACCOUNT_NUMBER_NOT_NULL": "4", + "EDITION_ID_NOT_NULL": "5", + "ACCOUNT_NUMBER_NOT_EXIST": "1", + "EDITION_NOT_EXIST": "3", + "MASTER_SITEIP_NOT_EXIST": "2", "LICENSE_INACTIVE": "6" }); diff --git a/400-SOURCECODE/AIAHTML5.Web/index.html b/400-SOURCECODE/AIAHTML5.Web/index.html index d80869a..c462c63 100644 --- a/400-SOURCECODE/AIAHTML5.Web/index.html +++ b/400-SOURCECODE/AIAHTML5.Web/index.html @@ -1254,10 +1254,10 @@