Commit efd5553f097f8aa06a98309b99aaf9cc24ab7092
1 parent
cea38024
bug fixes on prod with www url
Showing
2 changed files
with
71 additions
and
62 deletions
400-SOURCECODE/Admin/src/app/components/UserEntity/adduser.component.ts
... | ... | @@ -70,12 +70,12 @@ export class AddUser implements OnInit, AfterViewInit { |
70 | 70 | UserTypeId: ['', Validators.required], |
71 | 71 | ProductEditionId: ['', Validators.required] |
72 | 72 | }); |
73 | - debugger | |
73 | + | |
74 | 74 | this._loadingService.ShowLoading("global-loading"); |
75 | 75 | this.bindUsers(); |
76 | 76 | this.GetAccountNumber(); |
77 | - this.GetUserTypeByLicenseId(); | |
78 | - this._loadingService.HideLoading("global-loading"); | |
77 | + //this.GetUserTypeByLicenseId(); | |
78 | + | |
79 | 79 | } |
80 | 80 | ngAfterViewInit() { |
81 | 81 | this.CheckDropDownOrUp(this.accountNodiv.nativeElement); |
... | ... | @@ -84,7 +84,6 @@ export class AddUser implements OnInit, AfterViewInit { |
84 | 84 | this.router.navigate(['/']); |
85 | 85 | } |
86 | 86 | GetUserTypeByLicenseId() { |
87 | - debugger; | |
88 | 87 | var Accountnumber = this.adduserFrm.controls['AccountNumberId'].value; |
89 | 88 | if (Accountnumber == "") { Accountnumber = 0 } |
90 | 89 | this.userservice.GetUserTypeByLicenseType({ |
... | ... | @@ -99,7 +98,6 @@ export class AddUser implements OnInit, AfterViewInit { |
99 | 98 | this.loopIdx1 = 0; |
100 | 99 | this.loopIdx2 = 0; |
101 | 100 | this.lastScrollPos = 0; |
102 | - this.tempLstAccountNumbers = []; | |
103 | 101 | if (this.commonService.UserType > 2) { |
104 | 102 | this.accountDropDownText = this.commonService.AccountNumber; |
105 | 103 | this.tempLstAccountNumbers.push(this.accountDropDownText); |
... | ... | @@ -109,7 +107,10 @@ export class AddUser implements OnInit, AfterViewInit { |
109 | 107 | for (var i = 0; i < 50; i++) { |
110 | 108 | this.tempLstAccountNumbers.push(this.AccountNumberList[this.loopIdx2++]); |
111 | 109 | } |
110 | + | |
111 | + this._loadingService.HideLoading("global-loading"); | |
112 | 112 | } |
113 | + | |
113 | 114 | }, |
114 | 115 | error => this.error = <any>error); |
115 | 116 | } |
... | ... | @@ -118,14 +119,15 @@ export class AddUser implements OnInit, AfterViewInit { |
118 | 119 | this.userservice.GetProductEdition({ |
119 | 120 | AccountNumberId: this.adduserFrm.controls['AccountNumberId'].value |
120 | 121 | }) |
121 | - .subscribe(x => { console.log(x); this.ProductEditionList = x }, error => this.error = <any>error); | |
122 | + .subscribe(x => { | |
123 | + console.log(x); | |
124 | + this.ProductEditionList = x ; | |
125 | + this._loadingService.HideLoading("global-loading"); | |
126 | + }, error => this.error = <any>error); | |
122 | 127 | } |
123 | - //BindUserTypeAndProductEdition(deviceValue) { | |
124 | - //this.GetUserTypeByLicenseId(); | |
125 | - //this.GetProductEdition(); | |
126 | - //} | |
128 | + | |
127 | 129 | AccountNumberChanged(LicenseId: number, SelectText: string) { |
128 | - | |
130 | + this._loadingService.ShowLoading("global-loading"); | |
129 | 131 | this.accountDropDownText = SelectText; |
130 | 132 | this.adduserFrm.controls['AccountNumberId'].setValue(LicenseId); |
131 | 133 | this.GetUserTypeByLicenseId(); |
... | ... | @@ -135,7 +137,6 @@ export class AddUser implements OnInit, AfterViewInit { |
135 | 137 | .subscribe(st => { |
136 | 138 | this.license = st; |
137 | 139 | this.LicenseTypeId=this.license.LicenseTypeId; |
138 | - | |
139 | 140 | }, |
140 | 141 | error => this.error = <any>error); |
141 | 142 | |
... | ... | @@ -281,7 +282,7 @@ export class AddUser implements OnInit, AfterViewInit { |
281 | 282 | @HostListener('window:scroll', ['$event']) |
282 | 283 | onWindowScroll(event) { |
283 | 284 | // console.debug("Scroll Event", document.body.scrollTop); |
284 | - // see András Szepesházi's comment below | |
285 | + // see Andr�s Szepesh�zi's comment below | |
285 | 286 | //console.debug("Scroll Event", window.pageYOffset ); |
286 | 287 | this.CheckDropDownOrUp(this.accountNodiv.nativeElement); |
287 | 288 | } | ... | ... |
400-SOURCECODE/Admin/src/app/shared/global.ts
... | ... | @@ -44,48 +44,34 @@ export class GlobalService { |
44 | 44 | this.QAAPIURL = "http://qa.beta.interactiveanatomy.com/API/Adminapi/"; |
45 | 45 | this.LocalURL = "http://localhost:4200"; |
46 | 46 | |
47 | - // get protocol type | |
47 | + // get protocol type | |
48 | 48 | this.ProtocolType = window.location.protocol+"//"; |
49 | 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 | - } | |
61 | - | |
62 | - // local | |
63 | - if (this.resourceBaseUrl == this.ProtocolType+"192.168.81.63:92/API/Adminapi/") { | |
64 | - localStorage.setItem('loggedInUserDetails', JSON.stringify( | |
65 | - { | |
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 | |
67 | - })); | |
68 | - this.loggedInUser = JSON.parse(localStorage.getItem("loggedInUserDetails")); | |
69 | - if (this.UserTypeName == "Client Admin" || this.UserTypeName == "District Admin") { | |
70 | - this.AccountNumber = this.loggedInUser.LicenseInfo[0].AccountNumber | |
50 | + if(window.location.hostname=="localhost") | |
51 | + { | |
52 | + //**** for localhost:4200 *****// | |
53 | + this.resourceBaseUrl = this.hostURL; | |
71 | 54 | } |
72 | - if (this.loggedInUser.LicenseInfo == null) { | |
73 | - this.AccLicId = 0; | |
74 | - this.AccountNumber = ''; | |
75 | - | |
76 | - } | |
77 | - else { | |
78 | - this.AccLicId = this.loggedInUser.LicenseInfo[0].Id; | |
79 | - this.AccountNumber = this.loggedInUser.LicenseInfo[0].AccountNumber; | |
55 | + else | |
56 | + { | |
57 | + // get hosted url on uat and prod server | |
58 | + this.resourceBaseUrl = window.location.origin+"/API/Adminapi/"; | |
59 | + | |
80 | 60 | } |
81 | 61 | |
82 | - } | |
83 | - // Live | |
84 | - if (this.resourceBaseUrl == this.ProtocolType+"interactiveanatomy.com/API/Adminapi/") { | |
85 | - this.LiveURL = this.ProtocolType+"interactiveanatomy.com"; | |
62 | + if (this.resourceBaseUrl == this.ProtocolType+"192.168.81.63:92/API/Adminapi/") { | |
63 | + if(window.location.hostname=="localhost") | |
64 | + { | |
65 | + //**** for localhost:4200 *****// | |
66 | + localStorage.setItem('loggedInUserDetails', JSON.stringify( | |
67 | + { | |
68 | + "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 | + })); | |
70 | + } | |
71 | + | |
72 | + this.loggedInUser = JSON.parse(localStorage.getItem("loggedInUserDetails")); | |
86 | 73 | if (this.UserTypeName == "Client Admin" || this.UserTypeName == "District Admin") { |
87 | 74 | this.AccountNumber = this.loggedInUser.LicenseInfo.AccountNumber |
88 | - this.AccLicId = this.loggedInUser.LicenseInfo.Id; | |
89 | 75 | } |
90 | 76 | if (this.loggedInUser.LicenseInfo == null) { |
91 | 77 | this.AccLicId = 0; |
... | ... | @@ -96,25 +82,47 @@ export class GlobalService { |
96 | 82 | this.AccLicId = this.loggedInUser.LicenseInfo.Id; |
97 | 83 | this.AccountNumber = this.loggedInUser.LicenseInfo.AccountNumber; |
98 | 84 | } |
85 | + | |
99 | 86 | } |
87 | + // Live | |
88 | + if ((this.resourceBaseUrl == this.ProtocolType+"interactiveanatomy.com/API/Adminapi/") | |
89 | + ||(this.resourceBaseUrl == this.ProtocolType+"www.interactiveanatomy.com/API/Adminapi/")) | |
90 | + { | |
91 | + this.LiveURL = this.ProtocolType+"interactiveanatomy.com"; | |
92 | + if (this.UserTypeName == "Client Admin" || this.UserTypeName == "District Admin") { | |
93 | + this.AccountNumber = this.loggedInUser.LicenseInfo.AccountNumber | |
94 | + this.AccLicId = this.loggedInUser.LicenseInfo.Id; | |
95 | + } | |
96 | + if (this.loggedInUser.LicenseInfo == null) { | |
97 | + this.AccLicId = 0; | |
98 | + this.AccountNumber = ''; | |
99 | + | |
100 | + } | |
101 | + else { | |
102 | + this.AccLicId = this.loggedInUser.LicenseInfo.Id; | |
103 | + this.AccountNumber = this.loggedInUser.LicenseInfo.AccountNumber; | |
104 | + } | |
105 | + } | |
100 | 106 | |
101 | 107 | // QA |
102 | - if (this.resourceBaseUrl == this.ProtocolType+"qa.beta.interactiveanatomy.com/API/Adminapi/") { | |
103 | - this.LiveURL = this.ProtocolType+"qa.beta.interactiveanatomy.com"; | |
104 | - if (this.UserTypeName == "Client Admin" || this.UserTypeName == "District Admin") { | |
105 | - this.AccountNumber = this.loggedInUser.LicenseInfo.AccountNumber | |
106 | - this.AccLicId = this.loggedInUser.LicenseInfo.Id; | |
107 | - } | |
108 | - if (this.loggedInUser.LicenseInfo == null) { | |
109 | - this.AccLicId = 0; | |
110 | - this.AccountNumber = ''; | |
108 | + if ((this.resourceBaseUrl == this.ProtocolType+"qa.beta.interactiveanatomy.com/API/Adminapi/") | |
109 | + || (this.resourceBaseUrl == this.ProtocolType+"www.qa.beta.interactiveanatomy.com/API/Adminapi/")) | |
110 | + { | |
111 | + this.LiveURL = this.ProtocolType+"qa.beta.interactiveanatomy.com"; | |
112 | + if (this.UserTypeName == "Client Admin" || this.UserTypeName == "District Admin") { | |
113 | + this.AccountNumber = this.loggedInUser.LicenseInfo.AccountNumber | |
114 | + this.AccLicId = this.loggedInUser.LicenseInfo.Id; | |
115 | + } | |
116 | + if (this.loggedInUser.LicenseInfo == null) { | |
117 | + this.AccLicId = 0; | |
118 | + this.AccountNumber = ''; | |
111 | 119 | |
120 | + } | |
121 | + else { | |
122 | + this.AccLicId = this.loggedInUser.LicenseInfo.Id; | |
123 | + this.AccountNumber = this.loggedInUser.LicenseInfo.AccountNumber; | |
124 | + } | |
112 | 125 | } |
113 | - else { | |
114 | - this.AccLicId = this.loggedInUser.LicenseInfo.Id; | |
115 | - this.AccountNumber = this.loggedInUser.LicenseInfo.AccountNumber; | |
116 | - } | |
117 | - } | |
118 | 126 | |
119 | 127 | |
120 | 128 | } | ... | ... |