diff --git a/Mohem/src/app/absence/absence-replacement-list/absence-replacement-list.component.ts b/Mohem/src/app/absence/absence-replacement-list/absence-replacement-list.component.ts index 0fcacdb7..d2ef54b6 100644 --- a/Mohem/src/app/absence/absence-replacement-list/absence-replacement-list.component.ts +++ b/Mohem/src/app/absence/absence-replacement-list/absence-replacement-list.component.ts @@ -32,7 +32,7 @@ export class AbsenceReplacementListComponent implements OnInit { P_PAGE_NUM: number; P_PAGE_LIMIT: number; ReplacementList: any = []; - searchBy: string = ""; + searchBy: string = "2"; IsReachEnd: boolean = false; ReplacmentListRes: WorKListReplacmentEmployeeResponse; private WorkListReplacmentEmployeeObj: WorkListReplacmentEmployeeRequest = new WorkListReplacmentEmployeeRequest(); diff --git a/Mohem/src/app/erm-channel/home/home.component.ts b/Mohem/src/app/erm-channel/home/home.component.ts index 5bec5386..6d621078 100644 --- a/Mohem/src/app/erm-channel/home/home.component.ts +++ b/Mohem/src/app/erm-channel/home/home.component.ts @@ -60,9 +60,14 @@ export class HomeComponent implements OnInit { }, ( ) => { }, this.ts.trPK('general', 'ok')).subscribe((result) => { - CommonService.SKIP = true; - this.cs.openHome(); - }) + if (this.cs.validResponse(result)){ + this.cs.greenToastPK("erm-channel", "viedo-success"); + CommonService.SKIP = true; + this.cs.openHome(); + }else{ + this.cs.redToastPK("erm-channel", "erm-failed"); + } + }); } } diff --git a/Mohem/src/app/erm-channel/survey/survey.component.ts b/Mohem/src/app/erm-channel/survey/survey.component.ts index b547457b..a5a6d759 100644 --- a/Mohem/src/app/erm-channel/survey/survey.component.ts +++ b/Mohem/src/app/erm-channel/survey/survey.component.ts @@ -52,9 +52,14 @@ export class SurveyComponent implements OnInit { this.authService.saveAdsStatus(request, () => { }, this.ts.trPK('general', 'ok')).subscribe((result) => { - CommonService.SKIP = true; - this.cs.openHome(); - }) + if (this.cs.validResponse(result)){ + this.cs.greenToastPK("erm-channel", "survey-success"); + CommonService.SKIP = true; + this.cs.openHome(); + }else{ + this.cs.redToastPK("erm-channel", "erm-failed"); + } + }); } select(rating) { this.satisfied = rating; diff --git a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts index 7cd149d4..f31cf456 100644 --- a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts +++ b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts @@ -149,16 +149,16 @@ export class WorkListMainItgComponent implements OnInit { return '../assets/imgs/mohemm-action/info.png'; } if (actionName === 'Grant') { - return '../assets/imgs/mohemm-action/info.png'; + return '../assets/imgs/mohemm-action/grant.png'; } if (actionName === 'Delegate') { return '../assets/imgs/mohemm-action/delegate.png'; } if (actionName === 'Answer') { - return '../assets/imgs/mohemm-action/info.png'; + return '../assets/imgs/mohemm-action/answer.png'; } if (actionName === 'Question') { - return '../assets/imgs/mohemm-action/info.png'; + return '../assets/imgs/mohemm-action/question.png'; } if (actionName === 'ReportGenerated') { return '../assets/imgs/mohemm-action/ReportGenerated.png'; @@ -170,7 +170,7 @@ export class WorkListMainItgComponent implements OnInit { return '../assets/imgs/mohemm-action/notDoable.png'; } if (actionName === 'DataCorrected') { - return '../assets/imgs/mohemm-action/info.png'; + return '../assets/imgs/mohemm-action/data-corrected.png'; } } diff --git a/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.ts b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.ts index 3f6f35c9..9426bf97 100644 --- a/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.ts +++ b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.ts @@ -300,10 +300,10 @@ export class WorkListReplacementItgComponent implements OnInit { const userIndex = this.favoriteUserList.findIndex(x => x['USER_NAME'] === userID); console.log(userIndex); if (userIndex === -1) { - selEmp.IsFavorite = !selEmp.IsFavorite; this.cs.presentConfirmDialog( confirmBoxhtml , () => { + selEmp.IsFavorite = !selEmp.IsFavorite; const request = [ { diff --git a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts index 9f3fad7f..0e2a6346 100644 --- a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts +++ b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts @@ -445,27 +445,26 @@ export class WorkListReplacementRollComponent implements OnInit { counter = 0; onChangeSelect(select) { let selectValue = select.detail.value; - if (selectValue == '1') { this.isSelect = true; this.isFilter = true; this.selectedType = 1; this.listOfRealted = this.actionHistory; - if (this.counter > 0) { - this.actionHistory.forEach((obj, i) => { - if (this.favoriteUserList.find(x => x['USER_NAME'] === obj.USER_NAME)) { - this.actionHistory[i].IsFavorite = true; - } else { - this.actionHistory[i].IsFavorite = false; - } - }); - } + // if (this.counter > 0) { + this.actionHistory.forEach((obj, i) => { + if (this.favoriteUserList.find(x => x['USER_NAME'] === obj.USER_NAME)) { + this.actionHistory[i].IsFavorite = true; + } else { + this.actionHistory[i].IsFavorite = false; + } + }); + // } this.counter = 1; } else if (selectValue === '4') { // if (this.favoriteUserList.length === 0 || this.favoriteUserList === undefined) { this.getFavruite(); // } - this.isFilter = true; + this.isFilter = true; this.selectedType = 4; } else if (selectValue === '2' || selectValue === '3' || selectValue === '5') { this.isSelect = true; @@ -523,7 +522,9 @@ export class WorkListReplacementRollComponent implements OnInit { }); this.favLetter.forEach((obj, index) => { - if (this.activeSelectedLetter) { } + if (this.activeSelectedLetter) { + this.selectedLetter(this.activeSelectedLetter); + } if (index === 0) { // this.selectedLetter(obj); this.favIsActive.push(true); @@ -531,150 +532,154 @@ export class WorkListReplacementRollComponent implements OnInit { this.favIsActive.push(false); } }); - console.log(this.favLetter); - console.log(this.favIsActive); - } + console.log(this.favLetter); + console.log(this.favIsActive); + } }); - // this.worklistService.getFavorite({}, () => { - - // }).subscribe((result) => { - // if (this.cs.validResponse(result)) { - // this.cs.stopLoading(); - // this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList']; - // this.listOfFav = this.favoriteUserList; - // this.favoriteUserList.forEach((obj) => { - // obj.IsFavorite = true; - // }); - // } - // }); -} + // this.worklistService.getFavorite({}, () => { + + // }).subscribe((result) => { + // if (this.cs.validResponse(result)) { + // this.cs.stopLoading(); + // this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList']; + // this.listOfFav = this.favoriteUserList; + // this.favoriteUserList.forEach((obj) => { + // obj.IsFavorite = true; + // }); + // } + // }); + } -saveUserFavruiteList(request, isFav: boolean) { - this.worklistService.saveFavoriteList(request, () => { - }).subscribe((result) => { - if (this.cs.validResponse(result)) { - if (isFav) { - this.cs.greenToastPK("replacementRoll", "favorite-saved"); - } else { - this.cs.redToastPK("replacementRoll", "favorite-unsaved"); + saveUserFavruiteList(request, isFav: boolean) { + this.worklistService.saveFavoriteList(request, () => { + }).subscribe((result) => { + if (this.cs.validResponse(result)) { + if (isFav) { + this.cs.greenToastPK("replacementRoll", "favorite-saved"); + } else { + this.cs.redToastPK("replacementRoll", "favorite-unsaved"); + } + this.getFavruite(); } - this.getFavruite(); - } - }); -} + }); + } -setFavorite(selEmp) { - selEmp.EMPLOYEE_DISPLAY_NAME = selEmp.EMPLOYEE_DISPLAY_NAME ? selEmp.EMPLOYEE_DISPLAY_NAME : selEmp.NAME; - selEmp.EMPLOYEE_IMAGE = selEmp.EMPLOYEE_IMAGE ? selEmp.EMPLOYEE_IMAGE : ''; - selEmp.EMAIL_ADDRESS = selEmp.EMAIL_ADDRESS ? selEmp.EMAIL_ADDRESS : ''; - selEmp.IsFavorite = !selEmp.IsFavorite; - let confirmBoxhtml = `

