diff --git a/Mohem/src/app/app.component.html b/Mohem/src/app/app.component.html index 2c601296..d327d588 100644 --- a/Mohem/src/app/app.component.html +++ b/Mohem/src/app/app.component.html @@ -35,14 +35,14 @@ {{ts.trPK('userProfile','title')}} - + @@ -72,14 +72,14 @@ - + @@ -159,14 +159,14 @@ {{ts.trPK('userProfile','title')}} - + @@ -195,14 +195,14 @@ - + diff --git a/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts b/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts index 6d3d299e..0a876022 100644 --- a/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts +++ b/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts @@ -108,12 +108,13 @@ export class AuthenticationService { this.setPublicFields(request); const user = this.getAuthenticatedUser(); if (user) { + const userName = this.cs.sharedService.getSharedData(LoginRequest.SHARED_DATA, false); request.P_SESSION_ID = user.P_SESSION_ID; request.MobileNumber = user.EMPLOYEE_MOBILE_NUMBER; request.LogInTokenID = user.LogInTokenID; request.TokenID = user.TokenID; - request.P_USER_NAME = user.EMPLOYEE_NUMBER; - request.UserName = user.EMPLOYEE_NUMBER; + request.P_USER_NAME = userName; // '1100313582' ALWAYS USER NAME + request.UserName = userName; // '1100313582' request.P_EMAIL_ADDRESS = user.EMPLOYEE_EMAIL_ADDRESS; if (AuthenticationService.requireRelogin) { this.sessionTimeOutDialog(); diff --git a/Mohem/src/app/hmg-common/services/connector/connector.service.ts b/Mohem/src/app/hmg-common/services/connector/connector.service.ts index 3b4ce09a..04f3a8ac 100644 --- a/Mohem/src/app/hmg-common/services/connector/connector.service.ts +++ b/Mohem/src/app/hmg-common/services/connector/connector.service.ts @@ -29,7 +29,7 @@ export class ConnectorService { //public static host = 'https://uat.hmgwebservices.com/'; // public static host = 'https://hmgwebservices.com/'; - public static host = 'http://10.201.204.124:5818/' //MOES + public static host = 'http://riyt-mohemm1:1010/' //MOE constructor(public httpClient: HttpClient, public cs: CommonService, private events: Events, diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index 3ec8afc6..6e8deb5f 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -374,7 +374,7 @@ export class HomePage implements OnInit { this.getMenu(); this.setServicesPrivilage(); if (this.common.getTotalNumberOfWorklistRequest()) { - this.statsButtons[1].statsValue = this.common.getTotalNumberOfWorklistRequest(); + this.statsButtons[0].statsValue = this.common.getTotalNumberOfWorklistRequest(); this.showLoader = false; } else { this.openNotificationsDashbored(); @@ -458,10 +458,12 @@ export class HomePage implements OnInit { if (item.MENU_TYPE === 'S') { request.P_SELECTED_RESP_ID = item.RESP_ID; } else { - selEmpNo = this.common.sharedService.getSharedData( - LoginRequest.SHARED_DATA, - false - ); + // selEmpNo = this.common.sharedService.getSharedData( + // LoginRequest.SHARED_DATA, + // false + // ); + console.log(this.userData); + selEmpNo = this.userData.EMPLOYEE_NUMBER; } nationality = this.common.sharedService.getSharedData( LoginRequest.NATIONALITY_CODE, @@ -665,6 +667,8 @@ export class HomePage implements OnInit { if (this.common.validResponse(result)) { const key = 'P_OPEN_NTF_NUMBER'; this.countAllNotification = result[key]; + this.statsButtons[0].statsValue = this.countAllNotification; + this.common.stopLoading(); //this.ITGCountAllNotification(); this.common.sharedService.setSharedData( result, diff --git a/Mohem/src/app/notification/home/home.component.html b/Mohem/src/app/notification/home/home.component.html index 31eda5f2..d363a9f7 100644 --- a/Mohem/src/app/notification/home/home.component.html +++ b/Mohem/src/app/notification/home/home.component.html @@ -1,7 +1,6 @@ diff --git a/Mohem/src/app/notification/home/home.component.ts b/Mohem/src/app/notification/home/home.component.ts index 0ec194c5..0954aea8 100644 --- a/Mohem/src/app/notification/home/home.component.ts +++ b/Mohem/src/app/notification/home/home.component.ts @@ -236,7 +236,7 @@ export class HomeComponent implements OnInit { callWorkListServices() { // if (this.countChanged) { - this.Count(); + // this.Count(); // } this.getAllPushNotificationFun(); } @@ -707,7 +707,7 @@ export class HomeComponent implements OnInit { if (this.common.validResponse(result)) { const key = 'P_OPEN_NTF_NUMBER'; // this.totalRequestCount = ; - this.ITGCountAllNotification(result[key]); + // this.ITGCountAllNotification(result[key]); this.common.sharedService.setSharedData( result, 'worklistNotifications' diff --git a/Mohem/src/app/profile/contact/contact.component.ts b/Mohem/src/app/profile/contact/contact.component.ts index 26f814b0..5df72271 100644 --- a/Mohem/src/app/profile/contact/contact.component.ts +++ b/Mohem/src/app/profile/contact/contact.component.ts @@ -54,7 +54,8 @@ export class ConatactComponent implements OnInit { getObjectValue() { this.profileService.getObjectValue({ 'P_OBJECT_TYPE': 'LOOKUP', - 'P_OBJECT_NAME': 'PHONE_TYPE' + 'P_OBJECT_NAME': 'PHONE_TYPE', + P_SELECTED_EMPLOYEE_NUMBER: this.selEmp }, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => { if (this.cs.validResponse(response)) { console.log(response); @@ -69,8 +70,8 @@ export class ConatactComponent implements OnInit { } }); } - updatePhone() { + updatePhone() { this.setIsDeletedStatus(); console.log(this.phoneNumbers); this.submitrequest = { @@ -78,6 +79,7 @@ export class ConatactComponent implements OnInit { P_SELECTED_RESP_ID: this.respID, //this.selMenu.List_Menu.RESP_ID,//-999, P_FUNCTION_NAME: this.selMenu.GetMenuEntriesList.FUNCTION_NAME, P_MBL_PHONES_TBL: this.phoneNumbers, + P_SELECTED_EMPLOYEE_NUMBER: this.selEmp }; this.profileService.submitPhoneTransaction(this.submitrequest, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => { if (this.cs.validResponse(response)) { diff --git a/Mohem/src/app/profile/home/home.component.html b/Mohem/src/app/profile/home/home.component.html index cd3bbece..9c04ca73 100644 --- a/Mohem/src/app/profile/home/home.component.html +++ b/Mohem/src/app/profile/home/home.component.html @@ -219,10 +219,10 @@ - + - + diff --git a/Mohem/src/app/profile/home/home.component.ts b/Mohem/src/app/profile/home/home.component.ts index a5cc44e6..f701812b 100644 --- a/Mohem/src/app/profile/home/home.component.ts +++ b/Mohem/src/app/profile/home/home.component.ts @@ -44,6 +44,7 @@ export class HomeComponent implements OnInit { public menuEntries: any; public basicDetailsSubMenu: any; public addressSubMenu: any; + public phoneSubMenu: any; public dependentDetails: any; public transactionNo = 0; public address: any; @@ -85,17 +86,18 @@ export class HomeComponent implements OnInit { this.addressSegment = false; this.familyMemberSegment = false; this.contactSegment = false; - this.familyMemberSegment = false; } else if (this.targetValue === 'basicDetails') { this.personalInfoSegment = false; this.basicDetailsSegment = true; this.addressSegment = false; this.familyMemberSegment = false; + this.contactSegment = false; } else if (this.targetValue === 'family') { this.personalInfoSegment = false; this.basicDetailsSegment = false; this.addressSegment = false; this.familyMemberSegment = true; + this.contactSegment = false; } else if (this.targetValue == 'contact') { this.personalInfoSegment = false; @@ -129,41 +131,27 @@ export class HomeComponent implements OnInit { let personalInformationChildren: any; let personalInfoNestedChildren: any; + console.log(this.menuEntries); + //if (this.targetValue === 'sideMenu') { for (let i = 0; i < this.menuEntries.length; i++) { - if (this.menuEntries[i].MENU_NAME === 'MBL_E_PROFESSIONALS_01') { + if (this.menuEntries[i].MENU_NAME === 'MBL_EMP_PROFILE') { personalInformationChildren = this.menuEntries[i].children; for (let j = 0; j < personalInformationChildren.length; j++) { - if (personalInformationChildren[j].MENU_NAME = 'MBL_PERINFO_SS' && personalInformationChildren[j].ENTRY_SEQUENCE === 15) { - personalInfoNestedChildren = personalInformationChildren[j].children; - for (let k = 0; k < personalInfoNestedChildren.length; k++) { - if (personalInfoNestedChildren[k].REQUEST_TYPE === 'BASIC_DETAILS') { - this.basicDetailsSubMenu = personalInfoNestedChildren[k]; + if (personalInformationChildren[j].REQUEST_TYPE === 'BASIC_DETAILS') { + this.basicDetailsSubMenu = personalInformationChildren[j]; } - if (personalInfoNestedChildren[k].REQUEST_TYPE === 'ADDRESS') { - this.addressSubMenu = personalInfoNestedChildren[k]; + if (personalInformationChildren[j].REQUEST_TYPE === 'ADDRESS') { + this.addressSubMenu = personalInformationChildren[j]; } - if (personalInfoNestedChildren[k].REQUEST_TYPE === 'CONTACT') { - this.dependentDetails = personalInfoNestedChildren[k]; + if (personalInformationChildren[j].REQUEST_TYPE === 'CONTACT') { + this.dependentDetails = personalInformationChildren[j]; + } + if (personalInformationChildren[j].REQUEST_TYPE === 'PHONE_NUMBERS') { + this.phoneSubMenu = personalInformationChildren[j]; } - } - } } } - // } - //} else { - // const menuEntriesLocalArray: any = this.menuEntries.children; - // for (let i = 0; i < menuEntriesLocalArray.length; i++) { - // if (menuEntriesLocalArray[i].REQUEST_TYPE === 'BASIC_DETAILS') { - // this.basicDetailsSubMenu = menuEntriesLocalArray[i]; - // } - // if (menuEntriesLocalArray[i].REQUEST_TYPE === 'ADDRESS') { - // this.addressSubMenu = menuEntriesLocalArray[i]; - // } - // if (menuEntriesLocalArray[i].REQUEST_TYPE === 'CONTACT') { - // this.dependentDetails = menuEntriesLocalArray[i]; - // } - //} } console.log(this.basicDetailsSubMenu); console.log(this.addressSubMenu); @@ -400,6 +388,7 @@ export class HomeComponent implements OnInit { getPhoneNumbers() { this.cs.startLoading(); this.profileService.getPhoneNumbers({ + P_SELECTED_EMPLOYEE_NUMBER: this.personalInfo.EMPLOYEE_NUMBER, P_MENU_TYPE: "E", P_SELECTED_RESP_ID: -999 }, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => { @@ -415,6 +404,7 @@ export class HomeComponent implements OnInit { getContactInfo() { this.profileService.getContactInfo({ + P_SELECTED_EMPLOYEE_NUMBER: this.personalInfo.EMPLOYEE_NUMBER, P_MENU_TYPE: "E", P_SELECTED_RESP_ID: -999 }, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => { diff --git a/Mohem/src/app/profile/service/profile.service.ts b/Mohem/src/app/profile/service/profile.service.ts index 141d8e04..ec79d825 100644 --- a/Mohem/src/app/profile/service/profile.service.ts +++ b/Mohem/src/app/profile/service/profile.service.ts @@ -165,21 +165,19 @@ export class ProfileService { public getObjectValue(request: any, onError?: any, errorLabel?: string): Observable { this.authService.authenticateRequest(request); - request.P_SELECTED_EMPLOYEE_NUMBER = request.P_USER_NAME; return this.con.post(ProfileService.getObjectValues, request, onError, errorLabel); } public getPhoneNumbers(request: any, onError?: any, errorLabel?: string): Observable { this.authService.authenticateRequest(request); - request.P_SELECTED_EMPLOYEE_NUMBER = request.P_USER_NAME; return this.con.post(ProfileService.getPhoneNumbers, request, onError, errorLabel); } public submitPhoneTransaction(request: any, onError?: any, errorLabel?: string): Observable { this.authService.authenticateRequest(request); - request.P_SELECTED_EMPLOYEE_NUMBER = request.P_USER_NAME; + // request.P_SELECTED_EMPLOYEE_NUMBER = request.P_USER_NAME; return this.con.post(ProfileService.submitPhoneTransaction, request, onError, errorLabel); } @@ -187,7 +185,6 @@ export class ProfileService { public getContactInfo(request: any, onError?: any, errorLabel?: string): Observable { this.authService.authenticateRequest(request); - request.P_SELECTED_EMPLOYEE_NUMBER = request.P_USER_NAME; return this.con.post(ProfileService.getContactInfo, request, onError, errorLabel); }