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 21058cca..f148197b 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 @@ -159,7 +159,7 @@ export class WorkListMainItgComponent implements OnInit { return '../assets/imgs/mohemm-action/info.png'; } if (actionName === 'ReportGenerated') { - return '../assets/imgs/mohemm-action/info.png'; + return '../assets/imgs/mohemm-action/ReportGenerated.png'; } if (actionName === 'Doable') { return '../assets/imgs/mohemm-action/info.png'; diff --git a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html index ac55c4c9..1a97b1c9 100644 --- a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html +++ b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.html @@ -22,21 +22,20 @@ - {{'addAttach, name' | translate}} + {{'replacementRoll, workflow' | translate}} - - {{'login, username' | translate}} + + {{'replacementRoll, favorite' | translate}} - - {{'general, email' | translate}} + + {{'replacementRoll, employee-id' | translate}} - - {{'replacementRoll, favorite' | translate}} + + {{'replacementRoll, employee-email' | translate}} - @@ -45,11 +44,16 @@ - +
- + + - +
+ +
+ +
diff --git a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.scss b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.scss index f1bde295..b8b6f0bd 100644 --- a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.scss +++ b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.scss @@ -200,4 +200,8 @@ ion-radio{ } .top-radio-row{ font-size: 12px; - } \ No newline at end of file + display: block; + padding-bottom: 25px; + padding-top: 15px; + } + 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 3c2c856e..ef46b8c7 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 @@ -47,6 +47,7 @@ export class WorkListReplacementRollComponent implements OnInit { userSelected: boolean; actionHistory: [] = []; favoriteUserList: [] = []; + isFilter = true; constructor(public worklistService: WorklistService, private cs: CommonService, public ts: TranslatorService, public workListMainService: WorklistMainService, public modalCtrl: ModalController) { this.P_PAGE_NUM = 1; this.P_PAGE_LIMIT = 50; @@ -408,16 +409,29 @@ export class WorkListReplacementRollComponent implements OnInit { closeModal() { this.modalCtrl.dismiss(); } + + selectedType; onChangeSelect(select) { console.log(select.detail.value); let selectValue = select.detail.value; - if (selectValue == "1" || selectValue == "2" || selectValue == "3") { + if (selectValue == '1') { + this.isSelect = true; + this.isFilter = true; + this.selectedType = 1; + this.listOfRealted = this.actionHistory; + } else if(selectValue === '4'){ + this.getFavruite(); + this.isFilter = true; + this.selectedType = 4; + } else if( selectValue === '2' || selectValue === '3'){ this.isSelect = true; - } if(selectValue === '4'){this.getFavruite();} + this.isFilter = false; + this.selectedType = 0; + } else { this.isSelect = false; - + this.selectedType = 0; } } @@ -450,6 +464,7 @@ export class WorkListReplacementRollComponent implements OnInit { if (this.cs.validResponse(result)) { this.cs.stopLoading(); this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList']; + this.listOfFav = this.favoriteUserList; } }) } @@ -518,4 +533,30 @@ export class WorkListReplacementRollComponent implements OnInit { // } // } + + listOfRealted: any = []; + listOfFav: any = []; + + filterList(event){ + const val = event.target.value; + if(this.selectedType === 1){ + if(val === '') { + this.actionHistory = this.listOfRealted; + } else { + this.actionHistory = this.listOfRealted.filter((item) => { + return (item.NAME.toLowerCase().indexOf(val.toLowerCase()) > -1); + }); + } + } else if(this.selectedType === 4) { + if(val === '') { + this.favoriteUserList = this.listOfFav; + } else { + this.favoriteUserList = this.listOfFav.filter((item) => { + return (item.EMPLOYEE_DISPLAY_NAME.toLowerCase().indexOf(val.toLowerCase()) > -1); + }); + } + }else{ + return; + } + } } diff --git a/Mohem/src/assets/imgs/mohemm-action/ReportGenerated.png b/Mohem/src/assets/imgs/mohemm-action/ReportGenerated.png new file mode 100644 index 00000000..27417cb3 Binary files /dev/null and b/Mohem/src/assets/imgs/mohemm-action/ReportGenerated.png differ diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json index 73e8de0d..28933bd8 100644 --- a/Mohem/src/assets/localization/i18n.json +++ b/Mohem/src/assets/localization/i18n.json @@ -2194,8 +2194,8 @@ "ar": "البحث باسم المستخدم" }, "searchbyname": { - "en": "Search by name", - "ar": "البحث عن طريق الإسم" + "en": " Search by name", + "ar": "البحث عن طريق الإسم " }, "searchbyemail": { "en": "Search by email", @@ -2212,7 +2212,24 @@ "favorite": { "en": "Favorite", "ar": "مفضل" + }, + "workflow":{ + "en":"WorkFlow", + "ar":"سير العمل" + }, + "employee-id":{ + "en":"Employee ID", + "ar":"هوية الموظف" + }, + "employee-email":{ + "en":"Employee Email", + "ar":"البريد الإلكتروني للموظف" + }, + "employee-name":{ + "en":"Employee Name", + "ar":"اسم الموظف" } + }, "worklist": { "view": { diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index 1361c890..82e998ab 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -1605,3 +1605,10 @@ ion-segment-button { .searchbar-input.sc-ion-searchbar-md { border-radius: 25px; } + .replacmentSearchBar{ + + + } + .replacmentSearchBar input{ + padding-left: 17px; +} \ No newline at end of file