diff --git a/Mohem/src/app/app.component.html b/Mohem/src/app/app.component.html index 512b0612..37e31ee2 100644 --- a/Mohem/src/app/app.component.html +++ b/Mohem/src/app/app.component.html @@ -76,7 +76,7 @@ - + @@ -175,7 +175,7 @@ - + diff --git a/Mohem/src/app/authentication/business-card/business-card.component.html b/Mohem/src/app/authentication/business-card/business-card.component.html index 58087cbc..94fb5ef2 100644 --- a/Mohem/src/app/authentication/business-card/business-card.component.html +++ b/Mohem/src/app/authentication/business-card/business-card.component.html @@ -1,5 +1,4 @@ - - + @@ -63,8 +62,7 @@ --> - - + 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 dc119ce4..c869c5ef 100644 --- a/Mohem/src/app/hmg-common/services/connector/connector.service.ts +++ b/Mohem/src/app/hmg-common/services/connector/connector.service.ts @@ -27,8 +27,8 @@ export class ConnectorService { public static retryTimes = 0; public static timeOut = 120 * 1000; - // public static host = 'https://uat.hmgwebservices.com/'; - public static host = 'https://hmgwebservices.com/'; + public static host = 'https://uat.hmgwebservices.com/'; + // public static host = 'https://hmgwebservices.com/'; constructor(public httpClient: HttpClient, public cs: CommonService, 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 ed3c7ca8..b64d7209 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 @@ -53,7 +53,7 @@ export class WorkListReplacementRollComponent implements OnInit { this.P_PAGE_NUM = 1; this.P_PAGE_LIMIT = 50; this.getPassActionMode = this.cs.sharedService.getSharedData('passActionMode', false); - // this.getFavruite(); + this.getFavruite(); this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo', false); this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr', false); this.pQuestion = this.cs.sharedService.getSharedData('pQuestion', false); @@ -442,9 +442,9 @@ export class WorkListReplacementRollComponent implements OnInit { this.selectedType = 1; this.listOfRealted = this.actionHistory; } else if (selectValue === '4') { - if (this.favoriteUserList.length === 0 || this.favoriteUserList === undefined) { + // if (this.favoriteUserList.length === 0 || this.favoriteUserList === undefined) { this.getFavruite(); - } + // } this.isFilter = true; this.selectedType = 4; } else if (selectValue === '2' || selectValue === '3' || selectValue === '5') { @@ -505,11 +505,15 @@ export class WorkListReplacementRollComponent implements OnInit { } }); } - saveUserFavruiteList(request) { + saveUserFavruiteList(request, isFav: boolean) { this.worklistService.saveFavoriteList(request, () => { }).subscribe((result) => { if (this.cs.validResponse(result)) { - this.cs.toastPK("replacementRoll", "favorite-saved"); + if(isFav){ + this.cs.toastPK("replacementRoll", "favorite-saved"); + } else{ + this.cs.toastPK("replacementRoll", "favorite-unsaved"); + } } }) @@ -520,55 +524,42 @@ export class WorkListReplacementRollComponent implements OnInit { selEmp.EMPLOYEE_IMAGE = selEmp.EMPLOYEE_IMAGE ? selEmp.EMPLOYEE_IMAGE : ''; selEmp.EMAIL_ADDRESS = selEmp.EMAIL_ADDRESS ? selEmp.EMAIL_ADDRESS : ''; selEmp.IsFavorite = !selEmp.IsFavorite; - if (this.favoriteUserList.some(x => x['USER_NAME'] === selEmp.USER_NAME)) { - let confirmBoxhtml = `
-

Do you want to add ` + selEmp.EMPLOYEE_DISPLAY_NAME + ` in your favorite list

-
-
-
`; - if (selEmp.EMPLOYEE_IMAGE) { - confirmBoxhtml += '
'; - } - if (!selEmp.EMPLOYEE_IMAGE) { - confirmBoxhtml += '
'; - } + let confirmBoxhtml = `
+

Do you want to add ` + selEmp.EMPLOYEE_DISPLAY_NAME + ` in your favorite list

+
+
+
`; + if (selEmp.EMPLOYEE_IMAGE) { + confirmBoxhtml += '
'; + } + if (!selEmp.EMPLOYEE_IMAGE) { + confirmBoxhtml += '
'; + } - confirmBoxhtml += `
- ` + selEmp.EMPLOYEE_DISPLAY_NAME + ` - -
-
`; - const userIndex = this.favoriteUserList.findIndex(x => x['USER_NAME'] === selEmp.USER_NAME) - if (userIndex === -1) { - this.cs.presentConfirmDialog( - confirmBoxhtml - , () => { - const request = - [ - { - 'USER_NAME': selEmp['USER_NAME'], - 'EMPLOYEE_DISPLAY_NAME': selEmp['EMPLOYEE_DISPLAY_NAME'], - 'EMAIL_ADDRESS': selEmp.EMAIL_ADDRESS, - 'EMPLOYEE_IMAGE': selEmp.EMPLOYEE_IMAGE, - 'IsFavorite': selEmp.IsFavorite - } - ]; + confirmBoxhtml += `
+ ` + selEmp.EMPLOYEE_DISPLAY_NAME + ` + +
+
`; + + const userIndex = this.favoriteUserList.findIndex(x => x['USER_NAME'] === selEmp.USER_NAME) + if (userIndex === -1) { + this.cs.presentConfirmDialog( + confirmBoxhtml + , () => { + const request = + [ + { + 'USER_NAME': selEmp['USER_NAME'], + 'EMPLOYEE_DISPLAY_NAME': selEmp['EMPLOYEE_DISPLAY_NAME'], + 'EMAIL_ADDRESS': selEmp.EMAIL_ADDRESS, + 'EMPLOYEE_IMAGE': selEmp.EMPLOYEE_IMAGE, + 'IsFavorite': selEmp.IsFavorite + } + ]; - this.saveUserFavruiteList(request); - }, () => { }); - } else { - const request = - [ - { - 'USER_NAME': selEmp['USER_NAME'], - 'EMPLOYEE_DISPLAY_NAME': selEmp['EMPLOYEE_DISPLAY_NAME'], - 'EMAIL_ADDRESS': selEmp.EMAIL_ADDRESS, - 'EMPLOYEE_IMAGE': selEmp.EMPLOYEE_IMAGE, - 'IsFavorite': false - } - ]; - this.saveUserFavruiteList(request); - } + this.saveUserFavruiteList(request, selEmp.IsFavorite); + }, () => { }); } else { const request = [ @@ -580,7 +571,7 @@ export class WorkListReplacementRollComponent implements OnInit { 'IsFavorite': false } ]; - this.saveUserFavruiteList(request); + this.saveUserFavruiteList(request, false); } } diff --git a/Mohem/src/app/notification/worklist-main/worklist-main.component.html b/Mohem/src/app/notification/worklist-main/worklist-main.component.html index 7366e112..08aff5a2 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.html +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.html @@ -342,13 +342,10 @@
Note: {{actionHistory.NOTE}} - -
- + (click)="actionHistory.visible = !actionHistory.visible"> + {{actionHistory.visible ? 'Show less': 'Show More' }}