fixed issue for MOE

SRCA_DEV
umasoodch 4 years ago
parent 231caf5bcd
commit b6d6c49618

@ -35,14 +35,14 @@
{{ts.trPK('userProfile','title')}} {{ts.trPK('userProfile','title')}}
</ion-label> </ion-label>
</ion-item> </ion-item>
<ion-item (click)="performanceEvaluation()"> <!-- <ion-item (click)="performanceEvaluation()">
<ion-thumbnail slot="start" class="menu-thumb"> <ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 24px !important;" src="../assets/icon/bar-chart.svg" item-left> <img style= "height: 24px !important;" src="../assets/icon/bar-chart.svg" item-left>
</ion-thumbnail> </ion-thumbnail>
<ion-label class="profile"> <ion-label class="profile">
{{ts.trPK('userProfile','performance-evaluation')}} {{ts.trPK('userProfile','performance-evaluation')}}
</ion-label> </ion-label>
</ion-item> </ion-item> -->
<ion-item [hidden]="TeamFlag!='true'" (click)="openMyTeamPage()"> <ion-item [hidden]="TeamFlag!='true'" (click)="openMyTeamPage()">
<ion-thumbnail slot="start" class="menu-thumb"> <ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 14px !important;" src="../assets/imgs/my_team_icon.png" item-left> <img style= "height: 14px !important;" src="../assets/imgs/my_team_icon.png" item-left>
@ -72,14 +72,14 @@
</ion-item> </ion-item>
</div> </div>
<ion-item (click)="oepnTransaction()"> <!-- <ion-item (click)="oepnTransaction()">
<ion-thumbnail slot="start" class="menu-thumb"> <ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 20px !important;" src="../assets/imgs/pending-transaction.png" item-left> <img style= "height: 20px !important;" src="../assets/imgs/pending-transaction.png" item-left>
</ion-thumbnail> </ion-thumbnail>
<ion-label class="profile"> <ion-label class="profile">
{{ts.trPK('general','pending-transaction')}} {{ts.trPK('general','pending-transaction')}}
</ion-label> </ion-label>
</ion-item> </ion-item> -->
<!-- <ion-item (click)="openChangePassword()"> --> <!-- <ion-item (click)="openChangePassword()"> -->
<ion-item (click)="openChangePassword()"> <ion-item (click)="openChangePassword()">
@ -159,14 +159,14 @@
{{ts.trPK('userProfile','title')}} {{ts.trPK('userProfile','title')}}
</ion-label> </ion-label>
</ion-item> </ion-item>
<ion-item (click)="performanceEvaluation()"> <!-- <ion-item (click)="performanceEvaluation()">
<ion-thumbnail slot="start" class="menu-thumb"> <ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 24px !important;" src="../assets/icon/bar-chart.svg" item-left> <img style= "height: 24px !important;" src="../assets/icon/bar-chart.svg" item-left>
</ion-thumbnail> </ion-thumbnail>
<ion-label class="profile"> <ion-label class="profile">
{{ts.trPK('userProfile','performance-evaluation')}} {{ts.trPK('userProfile','performance-evaluation')}}
</ion-label> </ion-label>
</ion-item> </ion-item> -->
<ion-item [hidden]="TeamFlag!='true'" (click)="openMyTeamPage()"> <ion-item [hidden]="TeamFlag!='true'" (click)="openMyTeamPage()">
<ion-thumbnail slot="start" class="menu-thumb"> <ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 14px !important;" src="../assets/imgs/my_team_icon.png" item-left> <img style= "height: 14px !important;" src="../assets/imgs/my_team_icon.png" item-left>
@ -195,14 +195,14 @@
</ion-item> </ion-item>
</div> </div>
<ion-item (click)="oepnTransaction()"> <!-- <ion-item (click)="oepnTransaction()">
<ion-thumbnail slot="start" class="menu-thumb"> <ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 20px !important;" src="../assets/imgs/pending-transaction.png" item-left> <img style= "height: 20px !important;" src="../assets/imgs/pending-transaction.png" item-left>
</ion-thumbnail> </ion-thumbnail>
<ion-label class="profile"> <ion-label class="profile">
{{ts.trPK('general','pending-transaction')}} {{ts.trPK('general','pending-transaction')}}
</ion-label> </ion-label>
</ion-item> </ion-item> -->
<ion-item (click)="openChangePassword()"> <ion-item (click)="openChangePassword()">
<ion-thumbnail slot="start" class="menu-thumb"> <ion-thumbnail slot="start" class="menu-thumb">
<img style= "height: 25px !important;" src="../assets/imgs/lock_icon.png" item-left> <img style= "height: 25px !important;" src="../assets/imgs/lock_icon.png" item-left>

@ -108,12 +108,13 @@ export class AuthenticationService {
this.setPublicFields(request); this.setPublicFields(request);
const user = this.getAuthenticatedUser(); const user = this.getAuthenticatedUser();
if (user) { if (user) {
const userName = this.cs.sharedService.getSharedData(LoginRequest.SHARED_DATA, false);
request.P_SESSION_ID = user.P_SESSION_ID; request.P_SESSION_ID = user.P_SESSION_ID;
request.MobileNumber = user.EMPLOYEE_MOBILE_NUMBER; request.MobileNumber = user.EMPLOYEE_MOBILE_NUMBER;
request.LogInTokenID = user.LogInTokenID; request.LogInTokenID = user.LogInTokenID;
request.TokenID = user.TokenID; request.TokenID = user.TokenID;
request.P_USER_NAME = user.EMPLOYEE_NUMBER; request.P_USER_NAME = userName; // '1100313582' ALWAYS USER NAME
request.UserName = user.EMPLOYEE_NUMBER; request.UserName = userName; // '1100313582'
request.P_EMAIL_ADDRESS = user.EMPLOYEE_EMAIL_ADDRESS; request.P_EMAIL_ADDRESS = user.EMPLOYEE_EMAIL_ADDRESS;
if (AuthenticationService.requireRelogin) { if (AuthenticationService.requireRelogin) {
this.sessionTimeOutDialog(); this.sessionTimeOutDialog();

@ -29,7 +29,7 @@ export class ConnectorService {
//public static host = 'https://uat.hmgwebservices.com/'; //public static host = 'https://uat.hmgwebservices.com/';
// public static host = 'https://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, constructor(public httpClient: HttpClient,
public cs: CommonService, public cs: CommonService,
private events: Events, private events: Events,

@ -374,7 +374,7 @@ export class HomePage implements OnInit {
this.getMenu(); this.getMenu();
this.setServicesPrivilage(); this.setServicesPrivilage();
if (this.common.getTotalNumberOfWorklistRequest()) { if (this.common.getTotalNumberOfWorklistRequest()) {
this.statsButtons[1].statsValue = this.common.getTotalNumberOfWorklistRequest(); this.statsButtons[0].statsValue = this.common.getTotalNumberOfWorklistRequest();
this.showLoader = false; this.showLoader = false;
} else { } else {
this.openNotificationsDashbored(); this.openNotificationsDashbored();
@ -458,10 +458,12 @@ export class HomePage implements OnInit {
if (item.MENU_TYPE === 'S') { if (item.MENU_TYPE === 'S') {
request.P_SELECTED_RESP_ID = item.RESP_ID; request.P_SELECTED_RESP_ID = item.RESP_ID;
} else { } else {
selEmpNo = this.common.sharedService.getSharedData( // selEmpNo = this.common.sharedService.getSharedData(
LoginRequest.SHARED_DATA, // LoginRequest.SHARED_DATA,
false // false
); // );
console.log(this.userData);
selEmpNo = this.userData.EMPLOYEE_NUMBER;
} }
nationality = this.common.sharedService.getSharedData( nationality = this.common.sharedService.getSharedData(
LoginRequest.NATIONALITY_CODE, LoginRequest.NATIONALITY_CODE,
@ -665,6 +667,8 @@ export class HomePage implements OnInit {
if (this.common.validResponse(result)) { if (this.common.validResponse(result)) {
const key = 'P_OPEN_NTF_NUMBER'; const key = 'P_OPEN_NTF_NUMBER';
this.countAllNotification = result[key]; this.countAllNotification = result[key];
this.statsButtons[0].statsValue = this.countAllNotification;
this.common.stopLoading();
//this.ITGCountAllNotification(); //this.ITGCountAllNotification();
this.common.sharedService.setSharedData( this.common.sharedService.setSharedData(
result, result,

@ -1,7 +1,6 @@
<app-generic-header <app-generic-header
showBack="true" showBack="true"
backLink="/home" backLink="/home"
[worklistSetting] ='true'
[headerText]="'home, worklist' | translate"> [headerText]="'home, worklist' | translate">
</app-generic-header> </app-generic-header>

@ -236,7 +236,7 @@ export class HomeComponent implements OnInit {
callWorkListServices() { callWorkListServices() {
// if (this.countChanged) { // if (this.countChanged) {
this.Count(); // this.Count();
// } // }
this.getAllPushNotificationFun(); this.getAllPushNotificationFun();
} }
@ -707,7 +707,7 @@ export class HomeComponent implements OnInit {
if (this.common.validResponse(result)) { if (this.common.validResponse(result)) {
const key = 'P_OPEN_NTF_NUMBER'; const key = 'P_OPEN_NTF_NUMBER';
// this.totalRequestCount = ; // this.totalRequestCount = ;
this.ITGCountAllNotification(result[key]); // this.ITGCountAllNotification(result[key]);
this.common.sharedService.setSharedData( this.common.sharedService.setSharedData(
result, result,
'worklistNotifications' 'worklistNotifications'

@ -54,7 +54,8 @@ export class ConatactComponent implements OnInit {
getObjectValue() { getObjectValue() {
this.profileService.getObjectValue({ this.profileService.getObjectValue({
'P_OBJECT_TYPE': 'LOOKUP', '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) => { }, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => {
if (this.cs.validResponse(response)) { if (this.cs.validResponse(response)) {
console.log(response); console.log(response);
@ -69,8 +70,8 @@ export class ConatactComponent implements OnInit {
} }
}); });
} }
updatePhone() {
updatePhone() {
this.setIsDeletedStatus(); this.setIsDeletedStatus();
console.log(this.phoneNumbers); console.log(this.phoneNumbers);
this.submitrequest = { 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_SELECTED_RESP_ID: this.respID, //this.selMenu.List_Menu.RESP_ID,//-999,
P_FUNCTION_NAME: this.selMenu.GetMenuEntriesList.FUNCTION_NAME, P_FUNCTION_NAME: this.selMenu.GetMenuEntriesList.FUNCTION_NAME,
P_MBL_PHONES_TBL: this.phoneNumbers, P_MBL_PHONES_TBL: this.phoneNumbers,
P_SELECTED_EMPLOYEE_NUMBER: this.selEmp
}; };
this.profileService.submitPhoneTransaction(this.submitrequest, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => { this.profileService.submitPhoneTransaction(this.submitrequest, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => {
if (this.cs.validResponse(response)) { if (this.cs.validResponse(response)) {

@ -219,10 +219,10 @@
</ion-label> </ion-label>
</ion-col> </ion-col>
<ion-col size="2" *ngIf="addressSubMenu && addressSubMenu.UPDATE_BUTTON === 'Y'" (click)="allowEdit('contact')"> <ion-col size="2" *ngIf="phoneSubMenu && phoneSubMenu.UPDATE_BUTTON === 'Y'" (click)="allowEdit('contact')">
<img style="width: 18px; height: 18px;" src="../assets/imgs/profile-icons/editing@2x.png"> <img style="width: 18px; height: 18px;" src="../assets/imgs/profile-icons/editing@2x.png">
</ion-col> </ion-col>
<ion-col size="2" *ngIf="addressSubMenu && addressSubMenu.ADD_BUTTON === 'Y'" (click)="allowEdit('contact')"> <ion-col size="2" *ngIf="phoneSubMenu && phoneSubMenu.ADD_BUTTON === 'Y'" (click)="allowEdit('contact')">
<ion-icon class="add-icon-styling" name="add"></ion-icon> <ion-icon class="add-icon-styling" name="add"></ion-icon>
</ion-col> </ion-col>
</ion-row> </ion-row>

@ -44,6 +44,7 @@ export class HomeComponent implements OnInit {
public menuEntries: any; public menuEntries: any;
public basicDetailsSubMenu: any; public basicDetailsSubMenu: any;
public addressSubMenu: any; public addressSubMenu: any;
public phoneSubMenu: any;
public dependentDetails: any; public dependentDetails: any;
public transactionNo = 0; public transactionNo = 0;
public address: any; public address: any;
@ -85,17 +86,18 @@ export class HomeComponent implements OnInit {
this.addressSegment = false; this.addressSegment = false;
this.familyMemberSegment = false; this.familyMemberSegment = false;
this.contactSegment = false; this.contactSegment = false;
this.familyMemberSegment = false;
} else if (this.targetValue === 'basicDetails') { } else if (this.targetValue === 'basicDetails') {
this.personalInfoSegment = false; this.personalInfoSegment = false;
this.basicDetailsSegment = true; this.basicDetailsSegment = true;
this.addressSegment = false; this.addressSegment = false;
this.familyMemberSegment = false; this.familyMemberSegment = false;
this.contactSegment = false;
} else if (this.targetValue === 'family') { } else if (this.targetValue === 'family') {
this.personalInfoSegment = false; this.personalInfoSegment = false;
this.basicDetailsSegment = false; this.basicDetailsSegment = false;
this.addressSegment = false; this.addressSegment = false;
this.familyMemberSegment = true; this.familyMemberSegment = true;
this.contactSegment = false;
} else if (this.targetValue == 'contact') { } else if (this.targetValue == 'contact') {
this.personalInfoSegment = false; this.personalInfoSegment = false;
@ -129,41 +131,27 @@ export class HomeComponent implements OnInit {
let personalInformationChildren: any; let personalInformationChildren: any;
let personalInfoNestedChildren: any; let personalInfoNestedChildren: any;
console.log(this.menuEntries);
//if (this.targetValue === 'sideMenu') { //if (this.targetValue === 'sideMenu') {
for (let i = 0; i < this.menuEntries.length; i++) { 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; personalInformationChildren = this.menuEntries[i].children;
for (let j = 0; j < personalInformationChildren.length; j++) { for (let j = 0; j < personalInformationChildren.length; j++) {
if (personalInformationChildren[j].MENU_NAME = 'MBL_PERINFO_SS' && personalInformationChildren[j].ENTRY_SEQUENCE === 15) { if (personalInformationChildren[j].REQUEST_TYPE === 'BASIC_DETAILS') {
personalInfoNestedChildren = personalInformationChildren[j].children; this.basicDetailsSubMenu = personalInformationChildren[j];
for (let k = 0; k < personalInfoNestedChildren.length; k++) {
if (personalInfoNestedChildren[k].REQUEST_TYPE === 'BASIC_DETAILS') {
this.basicDetailsSubMenu = personalInfoNestedChildren[k];
} }
if (personalInfoNestedChildren[k].REQUEST_TYPE === 'ADDRESS') { if (personalInformationChildren[j].REQUEST_TYPE === 'ADDRESS') {
this.addressSubMenu = personalInfoNestedChildren[k]; this.addressSubMenu = personalInformationChildren[j];
} }
if (personalInfoNestedChildren[k].REQUEST_TYPE === 'CONTACT') { if (personalInformationChildren[j].REQUEST_TYPE === 'CONTACT') {
this.dependentDetails = personalInfoNestedChildren[k]; 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.basicDetailsSubMenu);
console.log(this.addressSubMenu); console.log(this.addressSubMenu);
@ -400,6 +388,7 @@ export class HomeComponent implements OnInit {
getPhoneNumbers() { getPhoneNumbers() {
this.cs.startLoading(); this.cs.startLoading();
this.profileService.getPhoneNumbers({ this.profileService.getPhoneNumbers({
P_SELECTED_EMPLOYEE_NUMBER: this.personalInfo.EMPLOYEE_NUMBER,
P_MENU_TYPE: "E", P_MENU_TYPE: "E",
P_SELECTED_RESP_ID: -999 P_SELECTED_RESP_ID: -999
}, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => { }, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => {
@ -415,6 +404,7 @@ export class HomeComponent implements OnInit {
getContactInfo() { getContactInfo() {
this.profileService.getContactInfo({ this.profileService.getContactInfo({
P_SELECTED_EMPLOYEE_NUMBER: this.personalInfo.EMPLOYEE_NUMBER,
P_MENU_TYPE: "E", P_MENU_TYPE: "E",
P_SELECTED_RESP_ID: -999 P_SELECTED_RESP_ID: -999
}, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => { }, () => { }, this.ts.trPK('general', 'retry')).subscribe((response) => {

@ -165,21 +165,19 @@ export class ProfileService {
public getObjectValue(request: any, onError?: any, errorLabel?: string): Observable<any> { public getObjectValue(request: any, onError?: any, errorLabel?: string): Observable<any> {
this.authService.authenticateRequest(request); this.authService.authenticateRequest(request);
request.P_SELECTED_EMPLOYEE_NUMBER = request.P_USER_NAME;
return this.con.post(ProfileService.getObjectValues, request, onError, errorLabel); return this.con.post(ProfileService.getObjectValues, request, onError, errorLabel);
} }
public getPhoneNumbers(request: any, onError?: any, errorLabel?: string): Observable<any> { public getPhoneNumbers(request: any, onError?: any, errorLabel?: string): Observable<any> {
this.authService.authenticateRequest(request); this.authService.authenticateRequest(request);
request.P_SELECTED_EMPLOYEE_NUMBER = request.P_USER_NAME;
return this.con.post(ProfileService.getPhoneNumbers, request, onError, errorLabel); return this.con.post(ProfileService.getPhoneNumbers, request, onError, errorLabel);
} }
public submitPhoneTransaction(request: any, onError?: any, errorLabel?: string): Observable<any> { public submitPhoneTransaction(request: any, onError?: any, errorLabel?: string): Observable<any> {
this.authService.authenticateRequest(request); 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); 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<any> { public getContactInfo(request: any, onError?: any, errorLabel?: string): Observable<any> {
this.authService.authenticateRequest(request); this.authService.authenticateRequest(request);
request.P_SELECTED_EMPLOYEE_NUMBER = request.P_USER_NAME;
return this.con.post(ProfileService.getContactInfo, request, onError, errorLabel); return this.con.post(ProfileService.getContactInfo, request, onError, errorLabel);
} }

Loading…
Cancel
Save