Commit 3d6edc02f2decb6070a303462f234b3b722f2f1a
1 parent
9d30f779
Fix bug get list user with https host and general admin for update modules
Showing
5 changed files
with
63 additions
and
40 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -611,11 +611,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
611 | 611 | } |
612 | 612 | |
613 | 613 | |
614 | - if ($('#daImagePanel').offset().top == 0) | |
615 | - $('#daImagePanel').css("top", '70px'); | |
614 | + // if ($('#daImagePanel').offset().top == 0) | |
615 | + // $('#daImagePanel').css("top", '70px'); | |
616 | 616 | |
617 | - if ($('#daImagePanel').offset().left == 0) | |
618 | - $('#daImagePanel').css("left", '1px'); | |
617 | + //if ($('#daImagePanel').offset().left == 0) | |
618 | + // $('#daImagePanel').css("left", '1px'); | |
619 | 619 | |
620 | 620 | }, 350); |
621 | 621 | } | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -261,8 +261,11 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
261 | 261 | modesty: "Y" |
262 | 262 | } |
263 | 263 | $rootScope.UpdateAndCloseSetting($rootScope.formsetting) |
264 | + | |
265 | + | |
264 | 266 | } |
265 | 267 | //code for modesty setting |
268 | + $rootScope.aiaModesty = $rootScope.formsetting.modesty; | |
266 | 269 | |
267 | 270 | if (typeof result.LoginId != undefined || result.LoginId != "" || result.LoginId != null) { |
268 | 271 | |
... | ... | @@ -639,6 +642,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
639 | 642 | $rootScope.UpdateAndCloseSetting($rootScope.formsetting) |
640 | 643 | } |
641 | 644 | //code for modesty setting |
645 | + $rootScope.aiaModesty = $rootScope.formsetting.modesty; | |
642 | 646 | |
643 | 647 | $rootScope.siteId = result.siteId; |
644 | 648 | |
... | ... | @@ -678,7 +682,13 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
678 | 682 | |
679 | 683 | } |
680 | 684 | else { |
681 | - if (result.LicenseInfo != null ) { | |
685 | + if (result.LicenseInfo != null) { | |
686 | + | |
687 | + // set license id | |
688 | + $scope.UpdateUserExportImageData(result.Id, 'LicenseId', result.LicenseId) | |
689 | + | |
690 | + // set license type :note 5 for demo/test license | |
691 | + $scope.UpdateUserExportImageData(result.Id, 'LicenseTypeId', result.LicenseInfo.LicenseTypeId); | |
682 | 692 | |
683 | 693 | if(result.UserExportImageDetail!=null) |
684 | 694 | { |
... | ... | @@ -5107,6 +5117,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
5107 | 5117 | if (currentmodsetting == 'Y') { |
5108 | 5118 | $rootScope.isModestyOn = true; |
5109 | 5119 | $rootScope.isModestyOff = false; |
5120 | + | |
5110 | 5121 | } |
5111 | 5122 | else { |
5112 | 5123 | $rootScope.isModestyOn = false; |
... | ... | @@ -5158,9 +5169,13 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
5158 | 5169 | |
5159 | 5170 | } |
5160 | 5171 | |
5161 | - $rootScope.ChangeModesty = function (formsetting, modestyValue) { | |
5162 | - formsetting.modesty = modestyValue; | |
5163 | - $rootScope.setModestySettings(formsetting.modesty); | |
5172 | + $rootScope.ChangeModesty = function (modestyValue) { | |
5173 | + //formsetting.modesty = modestyValue; | |
5174 | + $rootScope.setModestySettings(modestyValue); | |
5175 | + | |
5176 | + //code for modesty setting | |
5177 | + $rootScope.formsetting.modesty = modestyValue; | |
5178 | + $rootScope.aiaModesty = $rootScope.formsetting.modesty; | |
5164 | 5179 | |
5165 | 5180 | } |
5166 | 5181 | $rootScope.isApplyBtnClicked = false; |
... | ... | @@ -5296,7 +5311,7 @@ function ($rootScope, $scope, Modules, $log, $location, $timeout, DataService, A |
5296 | 5311 | $rootScope.ChangeEthnicity(setting, setting.ethnicity); |
5297 | 5312 | } |
5298 | 5313 | if (typeof (setting.modesty) !== "undefined" && setting.modesty !== null) { |
5299 | - $rootScope.ChangeModesty(setting, setting.modesty); | |
5314 | + $rootScope.ChangeModesty(setting.modesty); | |
5300 | 5315 | } |
5301 | 5316 | |
5302 | 5317 | //2. | ... | ... |
400-SOURCECODE/AIAHTML5.Web/index.aspx
... | ... | @@ -582,13 +582,13 @@ |
582 | 582 | <img src="~/../content/images/common/adam-leaf.png" alt="" class="pull-left marginR5"> |
583 | 583 | <div class="radio"> |
584 | 584 | <label> |
585 | - <input type="radio" ng-checked="isModestyOn" ng-model="formsetting.modesty" value="Y" name="modestyRadios" id="modon" ng-click="ChangeModesty(formsetting,'Y')"> | |
585 | + <input type="radio" value="Y" ng-model="aiaModesty" name="modestyRadios" id="modon" ng-click="ChangeModesty('Y')"> | |
586 | 586 | <span class="">On</span> |
587 | 587 | </label> |
588 | 588 | </div> |
589 | 589 | <div class="radio"> |
590 | 590 | <label> |
591 | - <input type="radio" ng-checked="isModestyOff" ng-model="formsetting.modesty" value="N" name="modestyRadios" id="modoff" ng-click="ChangeModesty(formsetting,'N')"> | |
591 | + <input type="radio" value="N" ng-model="aiaModesty" name="modestyRadios" id="modoff" ng-click="ChangeModesty('N')"> | |
592 | 592 | <span class="">Off</span> |
593 | 593 | </label> |
594 | 594 | </div> | ... | ... |
400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.ts
... | ... | @@ -73,7 +73,7 @@ export class UsersList implements OnInit, AfterViewChecked { |
73 | 73 | ngOnInit(): void { |
74 | 74 | this.modalTitle = 'LIST USER'; |
75 | 75 | this.alerts = ''; |
76 | - this.NoRecord = this.global.NoRecords; | |
76 | + this.NoRecord = ''; | |
77 | 77 | |
78 | 78 | this.Users = this.fb.group({ |
79 | 79 | FirstName:[''], |
... | ... | @@ -109,8 +109,8 @@ export class UsersList implements OnInit, AfterViewChecked { |
109 | 109 | this.managerightFrm = this.fb.group({ |
110 | 110 | id: [''], |
111 | 111 | UserTypeTitle: [''], |
112 | - checkedRecords: this.fb.array([]), | |
113 | - UncheckedRecords: this.fb.array([]) | |
112 | + checkedRecords: [this.fb.array([])], | |
113 | + UncheckedRecords: [this.fb.array([])] | |
114 | 114 | |
115 | 115 | }); |
116 | 116 | |
... | ... | @@ -153,20 +153,21 @@ export class UsersList implements OnInit, AfterViewChecked { |
153 | 153 | ], |
154 | 154 | sort: true |
155 | 155 | }); |
156 | - document.getElementById("fixed_table_rc").remove(); | |
157 | - var testScript = document.createElement("script"); | |
158 | - testScript.setAttribute("id", "fixed_table_rc"); | |
159 | - testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); | |
160 | - testScript.setAttribute("type", "text/javascript"); | |
161 | - document.body.appendChild(testScript); | |
162 | - | |
156 | + | |
157 | + if(document.getElementById("fixed_table_rc") != null){ | |
158 | + document.getElementById("fixed_table_rc").remove(); | |
159 | + var testScript = document.createElement("script"); | |
160 | + testScript.setAttribute("id", "fixed_table_rc"); | |
161 | + testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); | |
162 | + testScript.setAttribute("type", "text/javascript"); | |
163 | + document.body.appendChild(testScript); | |
164 | + } | |
163 | 165 | |
164 | 166 | this._loadingService.HideLoading("global-loading"); |
165 | 167 | |
166 | 168 | //this.GetUserList(); |
167 | 169 | } |
168 | 170 | handleChange(evt) { |
169 | - debugger; | |
170 | 171 | var target = evt.target; |
171 | 172 | if (target.value == 'true') { |
172 | 173 | this.isActive = true; |
... | ... | @@ -180,7 +181,6 @@ export class UsersList implements OnInit, AfterViewChecked { |
180 | 181 | return this.buttonStatus; |
181 | 182 | } |
182 | 183 | public SetClickedRow(i: number, item: any) { |
183 | - debugger; | |
184 | 184 | this.EditbuttonStatus = true; |
185 | 185 | this.selectedRow = i; |
186 | 186 | this.selectedId = item['Id']; |
... | ... | @@ -238,7 +238,6 @@ export class UsersList implements OnInit, AfterViewChecked { |
238 | 238 | SearchUserList(evt: any) |
239 | 239 | { |
240 | 240 | this.NoRecord = ''; |
241 | - debugger; | |
242 | 241 | this._loadingService.ShowLoading("global-loading"); |
243 | 242 | var tempArr = evt.split(','); |
244 | 243 | this.pageNo = parseInt(tempArr[0]); |
... | ... | @@ -285,7 +284,6 @@ export class UsersList implements OnInit, AfterViewChecked { |
285 | 284 | this.selectedRow = -1; |
286 | 285 | } |
287 | 286 | EditUser() { |
288 | - debugger; | |
289 | 287 | if (this.EditbuttonStatus) { |
290 | 288 | |
291 | 289 | this.Mode = 'Edit'; |
... | ... | @@ -334,7 +332,6 @@ export class UsersList implements OnInit, AfterViewChecked { |
334 | 332 | } |
335 | 333 | EditManageUserRights() { |
336 | 334 | if (this.buttonStatus) { |
337 | - debugger; | |
338 | 335 | this.Mode = 'ManageRight'; |
339 | 336 | this.modalTitle = 'MANAGE USER Right'; |
340 | 337 | this.topPos = '100px'; |
... | ... | @@ -399,7 +396,6 @@ export class UsersList implements OnInit, AfterViewChecked { |
399 | 396 | } |
400 | 397 | } |
401 | 398 | public UpdateManageUserRights() { |
402 | - debugger; | |
403 | 399 | this.alerts = ''; |
404 | 400 | this.managerightFrm.controls['checkedRecords'].setValue(new Array<number>(this.checkedRecords.length)); |
405 | 401 | this.managerightFrm.controls['UncheckedRecords'].setValue(new Array<number>(this.UncheckedRecords.length)); |
... | ... | @@ -447,6 +443,9 @@ export class UsersList implements OnInit, AfterViewChecked { |
447 | 443 | if (data == "Done") { |
448 | 444 | this.alerts = ''; |
449 | 445 | this._confirmService.activate("User Manage Rights Successfully updated.", "alertMsg"); |
446 | + this.checkedRecords = new Array<number>(this.UserManageRightsList.length); | |
447 | + this.UncheckedRecords = new Array<number>(this.UserManageRightsList.length); | |
448 | + | |
450 | 449 | } |
451 | 450 | //if (this.closeflag) { |
452 | 451 | // this.close.emit(null); | ... | ... |
400-SOURCECODE/Admin/src/app/shared/global.ts
... | ... | @@ -23,6 +23,7 @@ export class GlobalService { |
23 | 23 | LicenseId: number; |
24 | 24 | AccLicId: number = 0; |
25 | 25 | LoginId:string=""; |
26 | + ProtocolType:string=""; | |
26 | 27 | RemoveColumns: Array<string> = ["Serial_No", "LicenseId","RowNum"] |
27 | 28 | error; |
28 | 29 | public href: string = ""; |
... | ... | @@ -38,19 +39,28 @@ export class GlobalService { |
38 | 39 | |
39 | 40 | this.NoRecords = 'No Record Found.'; |
40 | 41 | |
41 | - this.hostURL = "http://192.168.81.63:90/API/Adminapi/";//Birendra Machine IP | |
42 | + this.hostURL = "http://192.168.81.63:92/API/Adminapi/";//Birendra Machine IP | |
42 | 43 | this.LiveAPIURL = "http://interactiveanatomy.com/API/Adminapi/"; |
43 | 44 | this.QAAPIURL = "http://qa.beta.interactiveanatomy.com/API/Adminapi/"; |
44 | 45 | this.LocalURL = "http://localhost:4200"; |
45 | 46 | |
46 | - //**** for localhost:4200 *****// | |
47 | - // this.resourceBaseUrl = this.hostURL; | |
48 | - //**** for localhost:4200 *****// | |
49 | - | |
50 | - // get dynamic api hosted url on local,beta and prod iis server | |
51 | - this.resourceBaseUrl = window.location.origin+"/API/Adminapi/"; | |
47 | + // get protocol type | |
48 | + this.ProtocolType = window.location.protocol+"//"; | |
49 | + | |
50 | + if(window.location.hostname=="localhost") | |
51 | + { | |
52 | + //**** for localhost:4200 *****// | |
53 | + this.resourceBaseUrl = this.hostURL; | |
54 | + } | |
55 | + else | |
56 | + { | |
57 | + // get hosted url on uat and prod server | |
58 | + this.resourceBaseUrl = window.location.origin+"/API/Adminapi/"; | |
59 | + | |
60 | + } | |
52 | 61 | |
53 | - if (this.resourceBaseUrl == "http://192.168.81.63:90/API/Adminapi/") { | |
62 | + // local | |
63 | + if (this.resourceBaseUrl == this.ProtocolType+"192.168.81.63:92/API/Adminapi/") { | |
54 | 64 | localStorage.setItem('loggedInUserDetails', JSON.stringify( |
55 | 65 | { |
56 | 66 | "Id": 1, "FirstName": "Maribel", "LastName": "sfsfsfsfsfsfs", "EmailId": "ravi.vishwakarma@ebix.com", "LoginId": "superadmin", "Password": "ebix@2016", "SecurityQuestionId": 1, "SecurityAnswer": "boxer", "CreatorId": 1, "CreationDate": "2009-03-02T00:00:00", "DeactivationDate": null, "ModifierId": 1, "ModifiedDate": "2017-01-24T02:03:19", "UserType": "Super Admin", "UserTypeId": 1, "IsActive": true, "IsCorrectPassword": false, "IncorrectLoginAttemptCount": 0, "IsBlocked": false, "LicenseId": 0, "EditionId": 0, "LoginFailureCauseId": 0, "Modules": [{ "slug": "da-view-list", "name": "Dissectible Anatomy", "id": 1 }, { "slug": "tile-view-list", "name": "Atlas Anatomy", "id": 2 }, { "slug": "3d-anatomy-list", "name": "3D Anatomy", "id": 3 }, { "slug": "clinical-illustrations", "name": "Clinical Illustrations", "id": 4 }, { "slug": "clinical-animations", "name": "Clinical Animations", "id": 5 }, { "slug": "Link/encyclopedia", "name": "Encyclopedia", "id": 6 }, { "slug": "curriculum-builder", "name": "Curriculum Builder", "id": 7 }, { "slug": "anatomy-test", "name": "Anatomy Test", "id": 8 }, { "slug": "Link/IP-10", "name": "IP 10", "id": 9 }, { "slug": "lab-exercises", "name": "Lab Exercises", "id": 10 }, { "slug": "Link/indepth-reports", "name": "In-Depth Reports", "id": 11 }, { "slug": "Link/complementary-and-alternate-medicine", "name": "CAM", "id": 12 }, { "slug": "ADAM-images", "name": "A.D.A.M. Images", "id": 13 }, { "slug": "Link/bodyguide", "name": "Body Guide", "id": 14 }, { "slug": "Link/health-navigator", "name": "Symptom Navigator", "id": 15 }, { "slug": "Link/wellness-tools", "name": "The Wellness Tools", "id": 16 }, { "slug": "Link/aod", "name": "A.D.A.M. OnDemand", "id": 1017 }], "LicenseInfo": [{ "Id": 0, "AccountNumber": "AIAS000319" }], "LicenseSubscriptions": null, "IsSubscriptionExpired": false, "SubscriptionExpirationDate": null, "TermsAndConditionsTitle": null, "TermsAndConditionsText": null |
... | ... | @@ -69,11 +79,10 @@ export class GlobalService { |
69 | 79 | this.AccountNumber = this.loggedInUser.LicenseInfo[0].AccountNumber; |
70 | 80 | } |
71 | 81 | |
72 | - //this.LiveURL = this.LocalURL+"/Admin"; | |
73 | 82 | } |
74 | 83 | // Live |
75 | - if (this.resourceBaseUrl == "http://interactiveanatomy.com/API/Adminapi/") { | |
76 | - this.LiveURL = "http://interactiveanatomy.com"; | |
84 | + if (this.resourceBaseUrl == this.ProtocolType+"interactiveanatomy.com/API/Adminapi/") { | |
85 | + this.LiveURL = this.ProtocolType+"interactiveanatomy.com"; | |
77 | 86 | if (this.UserTypeName == "Client Admin" || this.UserTypeName == "District Admin") { |
78 | 87 | this.AccountNumber = this.loggedInUser.LicenseInfo.AccountNumber |
79 | 88 | this.AccLicId = this.loggedInUser.LicenseInfo.Id; |
... | ... | @@ -90,8 +99,8 @@ export class GlobalService { |
90 | 99 | } |
91 | 100 | |
92 | 101 | // QA |
93 | - if (this.resourceBaseUrl == "http://qa.beta.interactiveanatomy.com/API/Adminapi/") { | |
94 | - this.LiveURL = "http://qa.beta.interactiveanatomy.com"; | |
102 | + if (this.resourceBaseUrl == this.ProtocolType+"qa.beta.interactiveanatomy.com/API/Adminapi/") { | |
103 | + this.LiveURL = this.ProtocolType+"qa.beta.interactiveanatomy.com"; | |
95 | 104 | if (this.UserTypeName == "Client Admin" || this.UserTypeName == "District Admin") { |
96 | 105 | this.AccountNumber = this.loggedInUser.LicenseInfo.AccountNumber |
97 | 106 | this.AccLicId = this.loggedInUser.LicenseInfo.Id; | ... | ... |