From 2397fc1482b841e419759ea5254930964aba1bf1 Mon Sep 17 00:00:00 2001 From: ashwaq Date: Mon, 9 Mar 2020 14:59:38 +0300 Subject: [PATCH 01/19] fix bug --- .../change-password.component.html | 23 +++++--- .../change-password.component.scss | 4 ++ .../change-password.component.ts | 52 ++++++++++++++++++- .../services/common/common.service.ts | 4 ++ .../worklist-main/worklist-main.component.ts | 1 + 5 files changed, 76 insertions(+), 8 deletions(-) diff --git a/Mohem/src/app/authentication/change-password/change-password.component.html b/Mohem/src/app/authentication/change-password/change-password.component.html index 29eb0d85..9e7c2ecb 100644 --- a/Mohem/src/app/authentication/change-password/change-password.component.html +++ b/Mohem/src/app/authentication/change-password/change-password.component.html @@ -27,33 +27,42 @@ - +

{{'changePassword,newPassword' | translate}}

- - + + + - +
- + +
\ No newline at end of file diff --git a/Mohem/src/app/authentication/change-password/change-password.component.scss b/Mohem/src/app/authentication/change-password/change-password.component.scss index baffb4ff..727737ed 100644 --- a/Mohem/src/app/authentication/change-password/change-password.component.scss +++ b/Mohem/src/app/authentication/change-password/change-password.component.scss @@ -29,3 +29,7 @@ width: 315px; } +.disabledButton{ + opacity:.5; + +} diff --git a/Mohem/src/app/authentication/change-password/change-password.component.ts b/Mohem/src/app/authentication/change-password/change-password.component.ts index 455ffffb..c7449268 100644 --- a/Mohem/src/app/authentication/change-password/change-password.component.ts +++ b/Mohem/src/app/authentication/change-password/change-password.component.ts @@ -12,6 +12,7 @@ import { SharedDataService } from 'src/app/hmg-common/services/shared-data-servi import {LoginComponent} from "src/app/authentication/login/login.component"; import { Password } from '../models/password'; import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user"; +//import { FormBuilder, FormGroup, Validators } from '@angular/forms'; @Component({ selector: 'app-change-password', @@ -28,6 +29,11 @@ export class ChangePasswordComponent implements OnInit { userData: any = {}; public isExpiredPwd: boolean = false; + public NEW_PASSWORD: boolean = false; + public Confirm_NEW_PASSWORD: boolean = false; + public OLD_PASSWORD: boolean = false; + //public profile_form: FormGroup; + constructor( public cs: CommonService, public authService: AuthenticationService, @@ -36,7 +42,9 @@ export class ChangePasswordComponent implements OnInit { public ts: TranslatorService, public smsService: SmsReaderService, public changeDetector: ChangeDetectorRef, - public sharedData: SharedDataService) { + public sharedData: SharedDataService, + // public formBuilder: FormBuilder, + ) { console.log("change password constructor"); } @@ -48,6 +56,11 @@ export class ChangePasswordComponent implements OnInit { this.P_USER_NAME =data.P_USER_NAME; console.log(this.isExpiredPwd); console.log(this.P_USER_NAME); + + + // this.profile_form = this.formBuilder.group({ + // password: ['', Validators.compose([Validators.minLength(8)])] + // }); // this.authService // .loadAuthenticatedUser() // .subscribe((user: AuthenticatedUser) => { @@ -119,6 +132,43 @@ export class ChangePasswordComponent implements OnInit { } }); } + onChangeCNP(){ +// in UAT Alow to the length of password less than 8 +// so if we ready to go life change it to >= 8 + if (this.P_Confirm_NEW_PASSWORD.length >= 3) { + this.Confirm_NEW_PASSWORD=true; + + }else{ + this.Confirm_NEW_PASSWORD=false; + + } } + +onChangeNP(){ +// in UAT Alow to the length of password less than 8 +// so if we ready to go life change it to >= 8 + if (this.P_NEW_PASSWORD.length >= 3) { + this.NEW_PASSWORD=true; + +}else{ + this.NEW_PASSWORD=false; + +} + +} +onChangeOP(){ +// in UAT Alow to the length of password less than 8 +// so if we ready to go life change it to >= 8 + if (this.P_OLD_PASSWORD.length >= 3) { + this.OLD_PASSWORD=true; + +}else{ + this.OLD_PASSWORD=false; + +} + +} + +} diff --git a/Mohem/src/app/hmg-common/services/common/common.service.ts b/Mohem/src/app/hmg-common/services/common/common.service.ts index 08163c91..17992c66 100644 --- a/Mohem/src/app/hmg-common/services/common/common.service.ts +++ b/Mohem/src/app/hmg-common/services/common/common.service.ts @@ -1211,6 +1211,10 @@ public getMonthNameAr(value: number): string { public openPerformanceevaluation() { this.nav.navigateForward(["/profile/performanceevaluation"]); } + public eitUpdate() { + this.nav.navigateForward(["/eit/eit-update-list"]); + } + public navigatePage(path) { diff --git a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts index 916d0c59..5f15674a 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts @@ -542,6 +542,7 @@ export class WorklistMainComponent implements OnInit { EITNotificatonBodyResponse.NOT_WORKLIST ); // this.navCtrl.push("EitUpdateListPage"); + this.common.eitUpdate();// must be test } else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") { this.common.sharedService.setSharedData( this.notificationBodyRes, From 8c1b6dce0e805f4e67e8b9515a58698ee1848b6d Mon Sep 17 00:00:00 2001 From: enadhilal Date: Mon, 9 Mar 2020 16:58:00 +0300 Subject: [PATCH 02/19] add all for ITG --- .../app/notification/home/home.component.html | 24 +- .../app/notification/home/home.component.ts | 321 ++++++++++-------- .../work-list-main-itg.component.ts | 58 +++- 3 files changed, 243 insertions(+), 160 deletions(-) diff --git a/Mohem/src/app/notification/home/home.component.html b/Mohem/src/app/notification/home/home.component.html index 3a4e61fb..a38715ab 100644 --- a/Mohem/src/app/notification/home/home.component.html +++ b/Mohem/src/app/notification/home/home.component.html @@ -49,7 +49,7 @@ showing {{newWorkListResponse.length}} of {{filters[0].value}} --> - + @@ -72,11 +72,25 @@
-
- {{segmentInfo.ModifiedDate |date}} -
-

{{segmentInfo.Title}}

+ +
+ +
+ {{segmentInfo.ModifiedDate |date}} +
+

{{segmentInfo.Title}}

+
+ +
+
+ {{data.ModifiedDate | date}} +
+

{{data.Title}}

+
+
+
+
diff --git a/Mohem/src/app/notification/home/home.component.ts b/Mohem/src/app/notification/home/home.component.ts index 7b9e3d72..ec592f0c 100644 --- a/Mohem/src/app/notification/home/home.component.ts +++ b/Mohem/src/app/notification/home/home.component.ts @@ -21,6 +21,8 @@ export class HomeComponent implements OnInit { public static ALL_REQUEST = 'all_request'; public static NOTIFICATION_DATA = 'notification_data'; public static NOTIFICATION_ARR = 'notification_arr'; + public static NAMES_ALL_iTEMS = 'names-all-items'; + public static IS_ALL_NAME = 'is_all_names'; @ViewChild(IonInfiniteScroll) infiniteScroll: IonInfiniteScroll; private WorkListObj: WorkListRequest; WorkListResObj: any; @@ -47,10 +49,11 @@ export class HomeComponent implements OnInit { public isSearch = false; public direction = 'ltr'; public ITGCount = 0; - public ITGSegment: {name: string, code: any, data: any, style: boolean} [] = []; + public ITGSegment: { name: string, code: any, data: any, style: boolean, names?: any }[] = []; public ITGAllItem: any = []; public selectedITGToActive = false; public ITGItem: any = []; + public ITGAllItems: any = []; public activeSegment: any; public currentActiveIndex = 0; @@ -69,17 +72,17 @@ export class HomeComponent implements OnInit { }; public data = { datasets: [ - { - data: [0, 0, 0, 0, 0], - backgroundColor: [ - '#18a169', - '#38c9b3', - '#114475', - '#3cb9d5', - '#cc3232' - ], - borderWidth: 5 - }] + { + data: [0, 0, 0, 0, 0], + backgroundColor: [ + '#18a169', + '#38c9b3', + '#114475', + '#3cb9d5', + '#cc3232' + ], + borderWidth: 5 + }] }; public filters = [ { @@ -136,20 +139,20 @@ export class HomeComponent implements OnInit { spaceBetween: 10 }; constructor( - public common: CommonService, - public ts: TranslatorService, - public WorklistService: WorklistService, - public workListService: WorklistMainService, - public modalController: ModalController - ) { - this.WorkListObj = new WorkListRequest(); - this.WorkListObj.P_NOTIFICATION_TYPE = '1'; - this.WorkListObj.P_SEARCH_FROM_USER = ''; - this.WorkListObj.P_SEARCH_SUBJECT = ''; - this.WorkListObj.P_SEARCH_SENT_DATE = ''; - this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = ''; - this.WorkListObj.P_PAGE_NUM = 0; - this.WorkListObj.P_PAGE_LIMIT = 50; + public common: CommonService, + public ts: TranslatorService, + public WorklistService: WorklistService, + public workListService: WorklistMainService, + public modalController: ModalController + ) { + this.WorkListObj = new WorkListRequest(); + this.WorkListObj.P_NOTIFICATION_TYPE = '1'; + this.WorkListObj.P_SEARCH_FROM_USER = ''; + this.WorkListObj.P_SEARCH_SUBJECT = ''; + this.WorkListObj.P_SEARCH_SENT_DATE = ''; + this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = ''; + this.WorkListObj.P_PAGE_NUM = 0; + this.WorkListObj.P_PAGE_LIMIT = 50; } ngOnInit() { @@ -167,21 +170,21 @@ export class HomeComponent implements OnInit { const openNotificationsArray = this.worklistNotifications.GetOpenNotificationsList; for (const notification of openNotificationsArray) { if (notification.ITEM_TYPE === 'HRSSA') { - this.filters[1].value = notification.OPEN_NTF_NUMBER; - this.data.datasets[0].data[0] = notification.OPEN_NTF_NUMBER; + this.filters[1].value = notification.OPEN_NTF_NUMBER; + this.data.datasets[0].data[0] = notification.OPEN_NTF_NUMBER; } else if (notification.ITEM_TYPE === 'POAPPRV') { - this.filters[2].value = notification.OPEN_NTF_NUMBER; - this.data.datasets[0].data[1] = notification.OPEN_NTF_NUMBER; + this.filters[2].value = notification.OPEN_NTF_NUMBER; + this.data.datasets[0].data[1] = notification.OPEN_NTF_NUMBER; } else if (notification.ITEM_TYPE === 'REQAPPRV') { - this.filters[3].value = notification.OPEN_NTF_NUMBER; - this.data.datasets[0].data[2] = notification.OPEN_NTF_NUMBER; + this.filters[3].value = notification.OPEN_NTF_NUMBER; + this.data.datasets[0].data[2] = notification.OPEN_NTF_NUMBER; } else if (notification.ITEM_TYPE === 'INVMOA') { - this.filters[4].value = notification.OPEN_NTF_NUMBER; - this.data.datasets[0].data[3] = notification.OPEN_NTF_NUMBER; + this.filters[4].value = notification.OPEN_NTF_NUMBER; + this.data.datasets[0].data[3] = notification.OPEN_NTF_NUMBER; } else if (notification.ITEM_TYPE === 'ITG') { this.filters[5].value = notification.OPEN_NTF_NUMBER; this.data.datasets[0].data[4] = notification.OPEN_NTF_NUMBER; - } + } } } @@ -195,10 +198,10 @@ export class HomeComponent implements OnInit { this.filters[this.previousActiveIndex].active = false; this.filters[this.currentActiveIndex].active = true; if (this.filters[this.currentActiveIndex].value !== 0) { - const selectedKey = this.filters[this.currentActiveIndex].key; - this.resetData(); - this.itemType = (selectedKey !== 'ITG' && selectedKey !== 'ALL') ? this.filters[this.currentActiveIndex].key : ''; - this.getAllPushNotificationFun(); + const selectedKey = this.filters[this.currentActiveIndex].key; + this.resetData(); + this.itemType = (selectedKey !== 'ITG' && selectedKey !== 'ALL') ? this.filters[this.currentActiveIndex].key : ''; + this.getAllPushNotificationFun(); } this.selectedFilter = this.filters[this.currentActiveIndex].key; } @@ -211,15 +214,15 @@ export class HomeComponent implements OnInit { disableFilters() { for (const filter of this.filters) { if (filter.key === this.itemType) { - filter.disable = false; - filter.active = true; - this.selectedFilter = filter.name; + filter.disable = false; + filter.active = true; + this.selectedFilter = filter.name; } else if (this.itemType === '') { filter.disable = false; filter.active = false; } else { - filter.disable = true; - filter.active = false; + filter.disable = true; + filter.active = false; } } if (this.itemType === '') { @@ -237,24 +240,24 @@ export class HomeComponent implements OnInit { modal.onDidDismiss().then(result => { if (result.data) { if (result.data.notificationType !== '' || result.data.selectedValue !== '' || result.data.itemType !== '') { - this.showSearchButton = true; - this.itemType = result.data.itemType; - this.notificationType = result.data.notificationType; - this.selectedValue = result.data.selectedValue; - this.inputDate = result.data.inputDate; - this.inputSearch = result.data.inputSearch; - this.WorkListObj.P_PAGE_NUM = 1; - this.newWorkListResponse = []; - this.showFormattedData = {}; - this.selectedFilter = 'ALL'; - this.filters[this.currentActiveIndex].active = false; - this.currentActiveIndex = 0; - this.previousActiveIndex = 0; - this.filters[this.currentActiveIndex].active = true; - if (this.itemType !== '') { - this.disableFilters(); - } - this.getAllPushNotificationFun(); + this.showSearchButton = true; + this.itemType = result.data.itemType; + this.notificationType = result.data.notificationType; + this.selectedValue = result.data.selectedValue; + this.inputDate = result.data.inputDate; + this.inputSearch = result.data.inputSearch; + this.WorkListObj.P_PAGE_NUM = 1; + this.newWorkListResponse = []; + this.showFormattedData = {}; + this.selectedFilter = 'ALL'; + this.filters[this.currentActiveIndex].active = false; + this.currentActiveIndex = 0; + this.previousActiveIndex = 0; + this.filters[this.currentActiveIndex].active = true; + if (this.itemType !== '') { + this.disableFilters(); + } + this.getAllPushNotificationFun(); } } }); @@ -262,48 +265,48 @@ export class HomeComponent implements OnInit { } getAllPushNotificationFun() { - this.WorkListObj.P_PAGE_NUM = 1; - this.isReachEnd = false; - this.WorkListObj.P_SEARCH_FROM_USER = this.selectedValue === '1' ? this.inputSearch : ''; - this.WorkListObj.P_SEARCH_SUBJECT = this.selectedValue === '2' ? this.inputSearch : ''; - this.WorkListObj.P_SEARCH_SENT_DATE = (this.inputDate && this.selectedValue === '3') - ? moment(this.inputDate).format('DD-MMM-YYYY') : ''; - this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = this.selectedValue === '4' ? this.inputSearch : ''; ; - this.WorkListObj.P_ITEM_TYPE = this.itemType !== '' ? this.itemType : ''; - this.WorkListObj.P_NOTIFICATION_TYPE = this.notificationType !== '' ? this.notificationType : '1'; - if (this.selectedValue === '5') { - this.WorkListObj.P_SEARCH_FROM_USER = ''; - this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = ''; - this.WorkListObj.P_SEARCH_SENT_DATE = ''; - this.WorkListObj.P_SEARCH_SUBJECT = ''; - } + this.WorkListObj.P_PAGE_NUM = 1; + this.isReachEnd = false; + this.WorkListObj.P_SEARCH_FROM_USER = this.selectedValue === '1' ? this.inputSearch : ''; + this.WorkListObj.P_SEARCH_SUBJECT = this.selectedValue === '2' ? this.inputSearch : ''; + this.WorkListObj.P_SEARCH_SENT_DATE = (this.inputDate && this.selectedValue === '3') + ? moment(this.inputDate).format('DD-MMM-YYYY') : ''; + this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = this.selectedValue === '4' ? this.inputSearch : '';; + this.WorkListObj.P_ITEM_TYPE = this.itemType !== '' ? this.itemType : ''; + this.WorkListObj.P_NOTIFICATION_TYPE = this.notificationType !== '' ? this.notificationType : '1'; + if (this.selectedValue === '5') { + this.WorkListObj.P_SEARCH_FROM_USER = ''; + this.WorkListObj.P_SEARCH_ITEM_TYPE_DSP_NAME = ''; + this.WorkListObj.P_SEARCH_SENT_DATE = ''; + this.WorkListObj.P_SEARCH_SUBJECT = ''; + } - this.WorklistService.getWorkList(this.WorkListObj).subscribe((result) => { - if (this.common.validResponse(result)) { - this.handleWorkListResult(result.GetWorkList); - } - } - ); + this.WorklistService.getWorkList(this.WorkListObj).subscribe((result) => { + if (this.common.validResponse(result)) { + this.handleWorkListResult(result.GetWorkList); + } + } + ); } categorizeData(arrayToCategorize: any) { - const datePipe = new DatePipe('en-US'); - const formattedData = {}; - for (const workList of arrayToCategorize) { - workList.FORMATTED_DATE = datePipe.transform(new Date(workList.BEGIN_DATE), 'MMMM dd, y'); - if (!(workList.FORMATTED_DATE in formattedData)) { - formattedData[workList.FORMATTED_DATE] = new Array(); - formattedData[workList.FORMATTED_DATE].push(workList); - } else { - formattedData[workList.FORMATTED_DATE].push(workList); - } + const datePipe = new DatePipe('en-US'); + const formattedData = {}; + for (const workList of arrayToCategorize) { + workList.FORMATTED_DATE = datePipe.transform(new Date(workList.BEGIN_DATE), 'MMMM dd, y'); + if (!(workList.FORMATTED_DATE in formattedData)) { + formattedData[workList.FORMATTED_DATE] = new Array(); + formattedData[workList.FORMATTED_DATE].push(workList); + } else { + formattedData[workList.FORMATTED_DATE].push(workList); } - return formattedData; + } + return formattedData; } sortArray(arrayToSort: any) { return arrayToSort.sort((a: any, b: any) => - new Date(b.BEGIN_DATE).getTime() - new Date(a.BEGIN_DATE).getTime() + new Date(b.BEGIN_DATE).getTime() - new Date(a.BEGIN_DATE).getTime() ); } @@ -340,16 +343,16 @@ export class HomeComponent implements OnInit { } openNotificationDetail(obj) { - this.common.sharedService.setSharedData(obj[0], HomeComponent.NOTIFICATION_DATA); - if (obj.REQUEST_TYPE === 'PR') { + this.common.sharedService.setSharedData(obj[0], HomeComponent.NOTIFICATION_DATA); + if (obj.REQUEST_TYPE === 'PR') { this.common.openWorklistMainPRPage(); - } else if (obj[0].REQUEST_TYPE === 'PO') { - this.common.openWorklistMainPOPage(); - } else if (obj[0].REQUEST_TYPE === 'MO') { - this.common.openWorklistMainMRPage(); - } else { - this.common.openWorklistMainPage(); - } + } else if (obj[0].REQUEST_TYPE === 'PO') { + this.common.openWorklistMainPOPage(); + } else if (obj[0].REQUEST_TYPE === 'MO') { + this.common.openWorklistMainMRPage(); + } else { + this.common.openWorklistMainPage(); + } } isEmptyObject() { @@ -382,54 +385,66 @@ export class HomeComponent implements OnInit { } doInfinite(infiniteScroll) { - if (!this.isReachEnd && this.selectedFilter !== 'ITG') { - this.WorklistService.getWorkList(this.WorkListObj).subscribe((result) => { - if (this.common.validResponse(result)) { - this.handleWorkListResult(result.GetWorkList); - } - }); - } else { - if (this.infiniteScroll) { - this.infiniteScroll.complete(); + if (!this.isReachEnd && this.selectedFilter !== 'ITG') { + this.WorklistService.getWorkList(this.WorkListObj).subscribe((result) => { + if (this.common.validResponse(result)) { + this.handleWorkListResult(result.GetWorkList); } + }); + } else { + if (this.infiniteScroll) { + this.infiniteScroll.complete(); } + } } Count() { - this.workListService.getITGCount() - .subscribe((result: any) => { - for (let i = 0; i < result.RequestType.length; i++) { - this.ITGSegment[i] = { - name: result.RequestType[i].RequestTypeName, - code: result.RequestType[i].RequestTypeCode, - data: result.RequestType[i].RequestDetails, - style: false - }; - } - this.setActive(this.ITGSegment[0].code); - }); + let datas =[]; + let names =[]; + this.ITGSegment[0] = { + name: 'All', + code: 'All', + data: null, + style: false + }; + this.workListService.getITGCount() + .subscribe((result: any) => { + for (let i = 1; i < result.RequestType.length; i++) { + this.ITGSegment[i] = { + name: result.RequestType[i].RequestTypeName, + code: result.RequestType[i].RequestTypeCode, + data: result.RequestType[i].RequestDetails, + style: false + }; + datas[i] = result.RequestType[i].RequestDetails; + names[i] = result.RequestType[i].RequestTypeCode; + } + this.ITGSegment[0].data = datas; + this.ITGSegment[0].names = names; + this.setActive(this.ITGSegment[0].code); + }); } Details() { - this.workListService.getITGDetails() - .subscribe((result: any) => { - this.totalRequestCount = this.totalRequestCount + result.TotalCount; - this.filters[5].value = result.TotalCount; - }); + this.workListService.getITGDetails() + .subscribe((result: any) => { + this.totalRequestCount = this.totalRequestCount + result.TotalCount; + this.filters[5].value = result.TotalCount; + }); } ITGNotification() { - // this.Details(); - this.isAll = false; - this.isPR = false; - this.isPO = false; - this.isMR = false; - this.isHR = false; - this.isITG = true; + // this.Details(); + this.isAll = false; + this.isPR = false; + this.isPO = false; + this.isMR = false; + this.isHR = false; + this.isITG = true; } searchBtn() { - this.isSearch = !this.isSearch; + this.isSearch = !this.isSearch; } setActive(selectedSegment) { @@ -442,17 +457,41 @@ export class HomeComponent implements OnInit { this.ITGSegment[i].style = true; this.ITGItem[count] = this.ITGSegment[i].data; count++; - } else { + }else{ this.ITGSegment[i].style = false; } } + console.log(this.ITGSegment) } - openITG(segmentInfo) { + openITG(segmentInfo, name?) { + if(name){ + this.common.sharedService.setSharedData(name, HomeComponent.REQUSET_NAME); + this.common.sharedService.setSharedData(this.ITGSegment, HomeComponent.NAMES_ALL_iTEMS); + this.common.sharedService.setSharedData(true, HomeComponent.IS_ALL_NAME); + }else{ + this.common.sharedService.setSharedData(this.activeSegment, HomeComponent.REQUSET_NAME); + this.common.sharedService.setSharedData(false, HomeComponent.IS_ALL_NAME); + } this.common.sharedService.setSharedData(segmentInfo, HomeComponent.REQUSET_INFO); - this.common.sharedService.setSharedData(this.activeSegment, HomeComponent.REQUSET_NAME); this.common.sharedService.setSharedData(this.ITGItem, HomeComponent.ALL_REQUEST); this.common.openWorklistITGPage(); } + + openITGAll(id, item){ + let count =0; + let ITEM: any; + let NAME: any; + for (let i = 1; i < this.ITGSegment.length; i++) { + for(let j =0; j< this.ITGSegment[i].data.length; j++){ + if (this.ITGSegment[i].data[j].ID === id && this.ITGSegment[i].data[j].ItemID === item) { + ITEM = this.ITGSegment[i].data[j]; + NAME = this.ITGSegment[i].code; + count++; + } + } + } + this.openITG(ITEM, NAME) + } } 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 96518745..f0c54c8b 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 @@ -26,6 +26,8 @@ export class WorkListMainItgComponent implements OnInit { public request_info: any; public request_name: any; public all_request: any; + public all_request_names: any; + public is_all_items_sents: any; public request = new itgRequest(); public activeSegment: any = "info"; public request_details: any; @@ -49,6 +51,7 @@ export class WorkListMainItgComponent implements OnInit { public ExchangeServerSelected: any; public ExchangeServerDBSelected: any; public actionBTN: { name: string, image: string, isAvailable: boolean }[] = []; + index2: number; constructor( public common: CommonService, public ts: TranslatorService, @@ -59,6 +62,8 @@ export class WorkListMainItgComponent implements OnInit { this.request_info = this.common.sharedService.getSharedData(HomeComponent.REQUSET_INFO); this.request_name = this.common.sharedService.getSharedData(HomeComponent.REQUSET_NAME); this.all_request = this.common.sharedService.getSharedData(HomeComponent.ALL_REQUEST); + this.all_request_names = this.common.sharedService.getSharedData(HomeComponent.NAMES_ALL_iTEMS); + this.is_all_items_sents = this.common.sharedService.getSharedData(HomeComponent.IS_ALL_NAME); this.all_request = this.all_request[0]; this.changeITGForm(this.request_info, this.request_name); } @@ -76,10 +81,9 @@ export class WorkListMainItgComponent implements OnInit { this.workListService.getITGFormDetails(this.request).subscribe((result: any) => { this.request_details = result.ITGRequest; this.grantInfo = result.ITGRequest.GrantFields; - let count = 0; for (let i = 0; i < result.ITGRequest.FieldGoups.length; i++) { this.segmentsArray[i] = { name: result.ITGRequest.FieldGoups[i].Title, number: i }; - this.segmentData[i] = { name: result.ITGRequest.FieldGoups[i].Title, data: result.ITGRequest.FieldGoups[i].Fields} + this.segmentData[i] = { name: result.ITGRequest.FieldGoups[i].Title, data: result.ITGRequest.FieldGoups[i].Fields } } this.segmentsArray[this.segmentsArray.length] = { name: 'Approval Level', number: this.segmentsArray.length } this.workList = this.request_details.WFHistory; @@ -87,7 +91,9 @@ export class WorkListMainItgComponent implements OnInit { this.activeSegment = this.segmentsArray[0].name; for (let i = 0; i < this.options.length; i++) { this.imageURL(this.options[i].Action); - this.actionBTN[i] = { name: this.options[i].Action, image: this.imageURL(this.options[i].Action), isAvailable: this.options[i].IsAvailable } + this.actionBTN[i] = { + name: this.options[i].Action, image: this.imageURL(this.options[i].Action), isAvailable: this.options[i].IsAvailable + }; } if (this.grantInfo) { @@ -134,20 +140,44 @@ export class WorkListMainItgComponent implements OnInit { } skip() { - for (let i = 0; i < this.all_request.length; i++) { // search for the request that clicked on all request - if (this.request_info.ID == this.all_request[i].ID) { // check if the ID for the request is found. - this.index = i + 1; - if (this.index !== this.all_request.length) { // check if its last one to redirecte to home otherwise to next request. - this.clearDataArray(); - this.changeITGForm(this.all_request[this.index], this.request_name); - break; + if (this.is_all_items_sents) { + for (let i = 1; i < this.all_request_names.length; i++) { + for (let j = 0; j < this.all_request_names[i].data.length; j++) { + if (this.request_info.ID === this.all_request_names[i].data[j].ID + && this.request_info.ItemID === this.all_request_names[i].data[j].ItemID) { + this.index2 = j + 1; + this.index = i + 1; + if (this.all_request_names[i].data.length !== this.index2) {// if there is another request with same type + this.clearDataArray(); + this.changeITGForm(this.all_request_names[i].data[this.index2], this.all_request_names[i].code); + return false; + } else if (this.index !== this.all_request_names.length) { // if there is another deffernet type. + this.clearDataArray(); + this.changeITGForm(this.all_request_names[this.index].data[j], this.all_request_names[this.index].code); + return false; + } + } else if (this.index === this.all_request_names.length) { //if its the end request redirecte to worklist home + this.common.openNotificationPage(); + return false; + } + } + } + } else { + for (let i = 0; i < this.all_request.length; i++) { // search for the request that clicked on all request + if (this.request_info.ID == this.all_request[i].ID) { // check if the ID for the request is found. + this.index = i + 1; + if (this.index !== this.all_request.length) { // check if its last one to redirecte to home otherwise to next request. + this.clearDataArray(); + this.changeITGForm(this.all_request[this.index], this.request_name); + break + } else { + this.common.openNotificationPage(); + break + } } else { this.common.openNotificationPage(); - break; + break } - } else { - this.common.openNotificationPage(); - break; } } } From b3fae94a1cf390f076001074ecb5dbf0cf68d67c Mon Sep 17 00:00:00 2001 From: umasoodch Date: Tue, 10 Mar 2020 11:26:39 +0300 Subject: [PATCH 03/19] MM-96 MM-95 issues fixed --- .../hmg-common/services/connector/connector.service.ts | 2 ++ .../date-info-modal/date-info-modal.component.html | 2 +- .../date-info-modal/date-info-modal.component.scss | 4 ++++ Mohem/src/app/my-team/details/details.component.html | 2 +- Mohem/src/theme/styles.scss | 10 +++++++++- 5 files changed, 17 insertions(+), 3 deletions(-) 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 1335e79d..a3e4b9cc 100644 --- a/Mohem/src/app/hmg-common/services/connector/connector.service.ts +++ b/Mohem/src/app/hmg-common/services/connector/connector.service.ts @@ -174,7 +174,9 @@ public static host = 'https://uat.hmgwebservices.com/'; return false; } else if (result.ErrorType === 2 || result.ErrorType === 4) { // console.log("error expired"); + this.cs.stopLoading(); } else { + this.cs.stopLoading(); this.cs.showErrorMessageDialog( onError, errorLabel, diff --git a/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.html b/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.html index 1715fb1c..4d57dbb9 100644 --- a/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.html +++ b/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.html @@ -1,5 +1,5 @@ - + diff --git a/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.scss b/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.scss index 7f648459..dc54a457 100644 --- a/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.scss +++ b/Mohem/src/app/hmg-common/ui/circle-calendar/date-info-modal/date-info-modal.component.scss @@ -133,4 +133,8 @@ height: 360px !important; padding-bottom: 21px; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; + } + + .slider-container { + padding-bottom: 20px; } \ No newline at end of file diff --git a/Mohem/src/app/my-team/details/details.component.html b/Mohem/src/app/my-team/details/details.component.html index af154d2f..0fb04cdb 100644 --- a/Mohem/src/app/my-team/details/details.component.html +++ b/Mohem/src/app/my-team/details/details.component.html @@ -159,7 +159,7 @@
{{ts.trPK('attendance-tracking','non-analyzed')}} -

{{timeCardSummaryData.UNAUTHORIZED_LEAVE}}

+

{{timeCardSummaryData.NOT_ANALYZED_DAYS}}

diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index 47dcda26..f8bd788e 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -1284,7 +1284,7 @@ border:0px } .calendar-modal { - --height: 13.5cm !important; + --height: 14.5cm !important; --width: 88% !important; --border-radius: 0.4cm; } @@ -1422,3 +1422,11 @@ table.monthview-datetable th small { // --border-radius: 0.4cm; // } + +.calendar-modal .swiper-container-horizontal > .swiper-pagination-bullets{ + top: auto; + bottom: -8px; + .swiper-pagination-bullet-active { + background: #094875; + } +} From 5aeab4b08cf5ccbcbb897a76811aec3cefb0d898 Mon Sep 17 00:00:00 2001 From: ashwaq Date: Tue, 10 Mar 2020 12:18:29 +0300 Subject: [PATCH 04/19] add MO item History --- .../services/common/common.service.ts | 5 + .../item-history/item-history.component.html | 2 +- .../mo-item-history.component.html | 226 ++++++++++++++++++ .../mo-item-history.component.scss | 20 ++ .../mo-item-history.component.spec.ts | 27 +++ .../mo-item-history.component.ts | 123 ++++++++++ .../app/notification/notification.module.ts | 10 +- .../service/work-list.main.service.ts | 2 +- .../worklist-main-mr.component.html | 19 ++ .../worklist-main-mr.component.ts | 53 +++- Mohem/src/assets/localization/i18n.json | 4 + 11 files changed, 486 insertions(+), 5 deletions(-) create mode 100644 Mohem/src/app/notification/mo-item-history/mo-item-history.component.html create mode 100644 Mohem/src/app/notification/mo-item-history/mo-item-history.component.scss create mode 100644 Mohem/src/app/notification/mo-item-history/mo-item-history.component.spec.ts create mode 100644 Mohem/src/app/notification/mo-item-history/mo-item-history.component.ts diff --git a/Mohem/src/app/hmg-common/services/common/common.service.ts b/Mohem/src/app/hmg-common/services/common/common.service.ts index 17992c66..792c5131 100644 --- a/Mohem/src/app/hmg-common/services/common/common.service.ts +++ b/Mohem/src/app/hmg-common/services/common/common.service.ts @@ -1171,6 +1171,11 @@ public getMonthNameAr(value: number): string { public openItemHistoryPage() { this.nav.navigateForward(['/notification/item-history-PO']); } + + public openMOItemHistoryPage(){ + this.nav.navigateForward(["/notification/item-history-MO"]); + + } public openQutationAnalysisPage() { this.nav.navigateForward(['/notification/qutation-analysis-PO']); } diff --git a/Mohem/src/app/notification/item-history/item-history.component.html b/Mohem/src/app/notification/item-history/item-history.component.html index 1ac2132a..f462abf7 100644 --- a/Mohem/src/app/notification/item-history/item-history.component.html +++ b/Mohem/src/app/notification/item-history/item-history.component.html @@ -1,5 +1,5 @@ - + {{ts.trPK('worklistMain','ITEM_HIS')}} diff --git a/Mohem/src/app/notification/mo-item-history/mo-item-history.component.html b/Mohem/src/app/notification/mo-item-history/mo-item-history.component.html new file mode 100644 index 00000000..cc1a2b58 --- /dev/null +++ b/Mohem/src/app/notification/mo-item-history/mo-item-history.component.html @@ -0,0 +1,226 @@ + + + + + {{ts.trPK('worklistMain','ITEM_HIS')}} + + + + + + + + + + + + + +
+

{{ 'general, empty' | translate}}

+
+ + + + +
+ + + + + + + + + + + + +
+ + {{itemHistory.REQUEST_NUMBER}} +
+ + + + +
+ + {{itemHistory.UNIT_OF_MEASURE}} +
+
+ + + + +
+ + {{itemHistory.QUANTITY}} +
+ + + + +
+ + {{itemHistory.DATE_REQUIRED}} + +
+
+ + + + + +
+ + {{itemHistory.LINE_STATUS_DIS}} +
+ + + + + +
+ + {{itemHistory.STATUS_DATE}} +
+ +
+ + + + + +
+ + {{itemHistory.TRANSACTION_TYPE_NAME}} +
+ + + + + +
+ + {{itemHistory.ORGANIZATION_NAME}} +
+ +
+ + + + + +
+ + {{itemHistory.ORGANIZATION_CODE}} +
+ + + + + +
+ + {{itemHistory.OPERATING_UNIT_NAME}} +
+ +
+ + + + + +
+ + {{itemHistory.FROM_SUBINVENTORY_CODE}} +
+ + + + + +
+ + {{itemHistory.FROM_LOCATOR}} +
+ +
+ + + + + +
+ + {{itemHistory.TO_SUBINVENTORY_CODE}} +
+ + + + + +
+ + {{itemHistory.TO_LOCATOR}} +
+ +
+ + + + + +
+ + {{itemHistory.SHIP_TO_LOCATION}} +
+ + +
+
+ +
+ +
+
+ + + + + +
\ No newline at end of file diff --git a/Mohem/src/app/notification/mo-item-history/mo-item-history.component.scss b/Mohem/src/app/notification/mo-item-history/mo-item-history.component.scss new file mode 100644 index 00000000..95c01568 --- /dev/null +++ b/Mohem/src/app/notification/mo-item-history/mo-item-history.component.scss @@ -0,0 +1,20 @@ +.itemeHistoryist { + background: #f0efef; + padding: 6px; + /* margin-top: 20px; */ + /* width: 100%;*/ +} +ion-label.labelValue.sc-ion-label-ios-h.sc-ion-label-ios-s.ios.hydrated, +ion-label.labelValue.sc-ion-label-md-h.sc-ion-label-md-s.md.hydrated +{ + white-space: pre-wrap !important; + --color: initial; + display: block; + color: var(--color); + font-family: var(--ion-font-family,inherit); + font-size: inherit; + text-overflow: ellipsis; + overflow: hidden; + -webkit-box-sizing: border-box; + box-sizing: border-box +} \ No newline at end of file diff --git a/Mohem/src/app/notification/mo-item-history/mo-item-history.component.spec.ts b/Mohem/src/app/notification/mo-item-history/mo-item-history.component.spec.ts new file mode 100644 index 00000000..00e6b861 --- /dev/null +++ b/Mohem/src/app/notification/mo-item-history/mo-item-history.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { MoItemHistoryComponent } from './mo-item-history.component'; + +describe('MoItemHistoryComponent', () => { + let component: MoItemHistoryComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ MoItemHistoryComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(MoItemHistoryComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/notification/mo-item-history/mo-item-history.component.ts b/Mohem/src/app/notification/mo-item-history/mo-item-history.component.ts new file mode 100644 index 00000000..f67d319d --- /dev/null +++ b/Mohem/src/app/notification/mo-item-history/mo-item-history.component.ts @@ -0,0 +1,123 @@ +import { Component, OnInit } from '@angular/core'; +import { WorklistMainService } from '../service/work-list.main.service'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { ModalController } from '@ionic/angular'; +import { WorklistService } from '../service/worklist.service'; +import { MOItemHistoryReq } from '../models/MOItemHistoryReq'; +import { MOItemHistoryRes } from '../models/MOItemHistoryRes'; + +@Component({ + selector: 'app-mo-item-history', + templateUrl: './mo-item-history.component.html', + styleUrls: ['./mo-item-history.component.scss'], +}) +export class MoItemHistoryComponent implements OnInit { + getPassMOInfo: any; + itemHistoryRes: any; + IsReachEnd: boolean = false; + P_PAGE_NUM: number = 1; + P_PAGE_LIMIT: number = 50; + MOItemHistoryReq: any; + + constructor( + public worklistMainService: WorklistMainService, + private cs: CommonService, + private ts: TranslatorService, + public worklistService: WorklistService + ) { + this.getPassMOInfo = this.cs.sharedService.getSharedData('passMOReq'); + + this.MOItemHistoryReq = new MOItemHistoryReq(); + this.MOItemHistoryReq.P_PAGE_NUM = this.P_PAGE_NUM; + this.MOItemHistoryReq.P_PAGE_LIMIT = this.P_PAGE_LIMIT; + this.MOItemHistoryReq.P_ITEM_ID= this.getPassMOInfo.P_ITEM_ID; + this.MOItemHistoryReq.P_ORG_ID= this.getPassMOInfo.P_ORG_ID; + + } + + ngOnInit() { + + this.getMOItemHistory(this.getPassMOInfo.P_ITEM_ID,this.getPassMOInfo.P_ORG_ID); + + + + } + + getMOItemHistory(itemID ,orgID) { + console.log(itemID); + this.IsReachEnd = false; + const request = new MOItemHistoryReq(); + request.P_ITEM_ID = parseInt(itemID); + request.P_PAGE_LIMIT = 100; + request.P_PAGE_NUM = 1; + request.P_ORG_ID= parseInt(orgID); + + + + this.worklistMainService.getMOItemHistory(request). + subscribe((result: MOItemHistoryRes) => { + + this.handleItemHistoryResult(result); + }); + } + + + handleItemHistoryResult(result) { + if (this.cs.validResponse(result)) { + if (this.cs.hasData(result.GetMoItemHistoryList)) { + this.itemHistoryRes = result.GetMoItemHistoryList; + this.P_PAGE_NUM++; + this.MOItemHistoryReq.P_PAGE_NUM = this.P_PAGE_NUM; + let lastItemIndex = this.itemHistoryRes.length - 1; + if (result.GetMoItemHistoryList[lastItemIndex]) { + let lastitem = result.GetMoItemHistoryList[lastItemIndex]; + if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) { + this.IsReachEnd = true; + } else { + this.IsReachEnd = false; + } + } + } + + + } + +} + + +doInfinite(infiniteScroll) { + if (!this.IsReachEnd) { + // this.POItemHistoryReq.P_PAGE_NUM = this.P_PAGE_NUM; + this.worklistMainService.getMOItemHistory(this.MOItemHistoryReq). + subscribe((result: any) => { + if (this.cs.validResponse(result)) { + if (result.GetMoItemHistoryList != undefined) { + this.MOItemHistoryReq.P_PAGE_NUM=this.P_PAGE_NUM++; + (result.GetMoItemHistoryList).forEach(element => { + if (element.ROW_NUM == element.NO_OF_ROWS) { + this.IsReachEnd = true; + } else { + this.IsReachEnd = false; + } + this.itemHistoryRes.push(element); + }, (Error) => console.log(Error), () => infiniteScroll.target.complete()); + }// if list length >0 + else { + this.IsReachEnd = true; + } + }// if response == 1 + //this.pageNum++; + infiniteScroll.target.complete(); + + }); + } else { + if (infiniteScroll) + infiniteScroll.target.complete(); + } +}//end infiniteScroll + + + + +} diff --git a/Mohem/src/app/notification/notification.module.ts b/Mohem/src/app/notification/notification.module.ts index caa8cc34..4935cb92 100644 --- a/Mohem/src/app/notification/notification.module.ts +++ b/Mohem/src/app/notification/notification.module.ts @@ -31,6 +31,7 @@ import { WorkListMainItgComponent } from './work-list-main-itg/work-list-main-it // import { WorklistMainComponent } from './worklist-main/worklist-main.component'; import {MoreActionModalComponent} from './more-action-modal/more-action-modal.component' import { WorkListReplacementItgComponent } from './work-list-replacement-itg/work-list-replacement-itg.component'; +import { MoItemHistoryComponent } from './mo-item-history/mo-item-history.component'; const routes: Routes = [ @@ -114,7 +115,11 @@ const routes: Routes = [ { path: 'worklist-replacement-itg', component: WorkListReplacementItgComponent - } + }, + { + path: 'item-history-MO', + component: MoItemHistoryComponent + } ] } ]; @@ -148,7 +153,8 @@ const routes: Routes = [ WorklistMainMRComponent, WorklistAdvancedSearchComponent, WorkListMainItgComponent, - WorkListReplacementItgComponent + WorkListReplacementItgComponent, + MoItemHistoryComponent // WorklistMainComponent ], entryComponents: [ diff --git a/Mohem/src/app/notification/service/work-list.main.service.ts b/Mohem/src/app/notification/service/work-list.main.service.ts index 720f5c1e..3b55cffd 100644 --- a/Mohem/src/app/notification/service/work-list.main.service.ts +++ b/Mohem/src/app/notification/service/work-list.main.service.ts @@ -34,7 +34,7 @@ export class WorklistMainService { public static getPRNotificationBody = "Services/ERP.svc/REST/GET_PR_NOTIFICATION_BODY"; public static getPOItemHistory = "Services/ERP.svc/REST/GET_PO_ITEM_HISTORY"; - public static getMOItemHistory = "GET_MO_ITEM_HISTORY"; + public static getMOItemHistory = "Services/ERP.svc/REST/GET_MO_ITEM_HISTORY"; public static getNotificationButtons = "Services/ERP.svc/REST/GET_NOTIFICATION_BUTTONS"; public static getUserInfo = "Services/ERP.svc/REST/Get_UserInformation"; diff --git a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html index e4f7e7a5..5d633db5 100644 --- a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html +++ b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html @@ -408,6 +408,25 @@
+ + + + +
+ + +
+ + +
+
+ + diff --git a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts index edffe2f5..15585a23 100644 --- a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts +++ b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts @@ -31,6 +31,8 @@ import { ApplyActionModalComponent } from '../apply-action-modal/apply-action-mo import { MoreActionModalComponent } from '../more-action-modal/more-action-modal.component'; import { WorkListReplacementRollComponent } from '../work-list-replacement-roll/work-list-replacement-roll.component'; import { WorkListRfcComponent } from '../work-list-rfc/work-list-rfc.component'; +import { MOItemHistoryRes } from '../models/MOItemHistoryRes'; +import { MOItemHistoryReq } from '../models/MOItemHistoryReq'; @Component({ selector: 'app-worklist-main-mr', @@ -99,6 +101,7 @@ export class WorklistMainMRComponent implements OnInit { approveDis: boolean = false; rejectDis: boolean = false; requestDis: boolean = false; + public static PASS_MO_REQ = "passMOReq"; @@ -233,7 +236,7 @@ export class WorklistMainMRComponent implements OnInit { } handleWorkListBodyResult(result, Type) { - this.notificationBodyRes = {}; + this.notificationBodyRes = []; if (this.common.validResponse(result)) { this.pInformation = result.P_INFORMATION; this.pQuestion = result.P_QUESTION; @@ -1026,4 +1029,52 @@ export class WorklistMainMRComponent implements OnInit { } + getMOItemHistory(itemID ,orgID) { + console.log(itemID); + this.IsReachEnd = false; + const request = new MOItemHistoryReq(); + request.P_ITEM_ID = parseInt(itemID); + request.P_PAGE_LIMIT = 100; + request.P_PAGE_NUM = 1; + request.P_ORG_ID= parseInt(orgID); + + + + this.worklistMainService.getMOItemHistory(request). + subscribe((result: MOItemHistoryRes) => { + // this.common.sharedService.setSharedData( + // result.GetItemHistoryList, + // WorklistMainPoComponent.ItemHistoryList + // ); + this.common.sharedService.setSharedData( + request, + WorklistMainMRComponent.PASS_MO_REQ + ); + //open page + // this.common.openItemHistoryPage(); + this.handleItemHistoryResult(result); + }); + } + + + handleItemHistoryResult(result) { + if (this.common.validResponse(result)) { + if (this.common.hasData(result.GetMoItemHistoryList)) { + this.common.openMOItemHistoryPage(); + + } + } + else { + this.common.presentAlert( + this.ts.trPK("general", "empty") + ); + } + + } + + } + + + + diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json index 33d6dac0..79891a78 100644 --- a/Mohem/src/assets/localization/i18n.json +++ b/Mohem/src/assets/localization/i18n.json @@ -2184,6 +2184,10 @@ "line_details":{ "en": "Line Details", "ar":"Line Details" + }, + "request_number":{ + "en": "Request Number", + "ar":"Request Number" } }, From 30bfa05c2d9b29ed4194376b019d64d381773957 Mon Sep 17 00:00:00 2001 From: ashwaq Date: Tue, 10 Mar 2020 12:51:44 +0300 Subject: [PATCH 05/19] fix MO item History --- .../mo-item-history.component.scss | 25 +++++++++++++------ Mohem/src/theme/worklist.scss | 1 + 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/Mohem/src/app/notification/mo-item-history/mo-item-history.component.scss b/Mohem/src/app/notification/mo-item-history/mo-item-history.component.scss index 95c01568..ae11a4d9 100644 --- a/Mohem/src/app/notification/mo-item-history/mo-item-history.component.scss +++ b/Mohem/src/app/notification/mo-item-history/mo-item-history.component.scss @@ -7,14 +7,25 @@ ion-label.labelValue.sc-ion-label-ios-h.sc-ion-label-ios-s.ios.hydrated, ion-label.labelValue.sc-ion-label-md-h.sc-ion-label-md-s.md.hydrated { - white-space: pre-wrap !important; + // white-space: pre-wrap !important; + // --color: initial; + // display: block; + // color: var(--color); + // font-family: var(--ion-font-family,inherit); + // font-size: inherit; + // text-overflow: ellipsis; + // overflow: hidden; + // -webkit-box-sizing: border-box; + // box-sizing: border-box + + + --color: initial; - display: block; - color: var(--color); - font-family: var(--ion-font-family,inherit); + display: contents !important; + font-family: var(--ion-font-family, inherit); font-size: inherit; - text-overflow: ellipsis; + text-overflow: ellipsis !important; + white-space: pre; overflow: hidden; - -webkit-box-sizing: border-box; - box-sizing: border-box + box-sizing: border-box; } \ No newline at end of file diff --git a/Mohem/src/theme/worklist.scss b/Mohem/src/theme/worklist.scss index 57aa1748..28a013ce 100644 --- a/Mohem/src/theme/worklist.scss +++ b/Mohem/src/theme/worklist.scss @@ -33,6 +33,7 @@ } .itemReqDiv{ padding:10px; + width: 100%; // padding-bottom: 10px; // padding-top: 10px; } From fcbeae462e8e46f5749d03821e4f487eb54b8df2 Mon Sep 17 00:00:00 2001 From: umasoodch Date: Tue, 10 Mar 2020 14:39:21 +0300 Subject: [PATCH 06/19] fixed MM-134 --- Mohem/src/app/home/home.page.html | 15 --------------- Mohem/src/assets/localization/i18n.json | 4 ++-- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/Mohem/src/app/home/home.page.html b/Mohem/src/app/home/home.page.html index a9ac7a02..332d8088 100644 --- a/Mohem/src/app/home/home.page.html +++ b/Mohem/src/app/home/home.page.html @@ -23,19 +23,6 @@
- - @@ -69,8 +56,6 @@ icon="assets/icon/new-design/vacation_rules_icon.png"> - -
diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json index 33d6dac0..521a5b94 100644 --- a/Mohem/src/assets/localization/i18n.json +++ b/Mohem/src/assets/localization/i18n.json @@ -2360,8 +2360,8 @@ "ar":" check out" }, "confirm-alert3":{ - "en":"You did't complate today shift", - "ar":"You did't complate today shift" + "en":"You didn't complete today shift", + "ar":"You didn't complete today shift" }, "shift-time":{ "en":"Shift Time", From 6db87b693017d43d6d40c015269c859d0a0be93f Mon Sep 17 00:00:00 2001 From: umasoodch Date: Tue, 10 Mar 2020 17:52:16 +0300 Subject: [PATCH 07/19] fixed issue MM-46 --- .../circle-calendar.component.ts | 4 +-- .../app/my-team/details/details.component.ts | 19 +++++----- .../time-card/service/time-card.service.ts | 36 ++++++++++++++----- .../time-card-details.component.ts | 15 ++++---- 4 files changed, 44 insertions(+), 30 deletions(-) diff --git a/Mohem/src/app/hmg-common/ui/circle-calendar/circle-calendar.component.ts b/Mohem/src/app/hmg-common/ui/circle-calendar/circle-calendar.component.ts index 842cbd83..03f29490 100644 --- a/Mohem/src/app/hmg-common/ui/circle-calendar/circle-calendar.component.ts +++ b/Mohem/src/app/hmg-common/ui/circle-calendar/circle-calendar.component.ts @@ -69,8 +69,7 @@ export class CircleCalendarComponent implements OnInit { @ViewChild('slider') slides: ElementRef; ngOnInit() { - this.reRenderCalendar(); - console.log(this.currentDateParent); + // this.reRenderCalendar(); } // tslint:disable-next-line: use-life-cycle-interface @@ -118,6 +117,7 @@ export class CircleCalendarComponent implements OnInit { } }); }); + this.common.stopLoading(); } onDayClicked(event) { diff --git a/Mohem/src/app/my-team/details/details.component.ts b/Mohem/src/app/my-team/details/details.component.ts index a5e58229..087df5da 100644 --- a/Mohem/src/app/my-team/details/details.component.ts +++ b/Mohem/src/app/my-team/details/details.component.ts @@ -75,7 +75,7 @@ export class DetailsComponent implements OnInit { }; public data = {}; - + public isPostNoLoad = true; public previousActiveIndex = 0; public currentActiveIndex = 0; public searchNameOrUserName = ''; @@ -96,11 +96,13 @@ export class DetailsComponent implements OnInit { ) { } ngOnInit() { + this.common.startLoading(); this.intializeMemberDetail(); this.showAttendanceTracking(); } showAttendanceTracking() { + this.common.startLoading(); this.employee = this.common.sharedService.getSharedData(MyTeamService.EMPLOYEE_SHARED_DATA, false); const request = { P_SELECTED_EMPLOYEE_NUMBER: this.employee.EMPLOYEE_NUMBER @@ -116,6 +118,7 @@ export class DetailsComponent implements OnInit { public segmentChanged(event: any) { this.activeSegment = event.detail.value; if (this.activeSegment === 'Attendance') { + this.common.startLoading(); this.initAttendance(); } } @@ -139,7 +142,6 @@ export class DetailsComponent implements OnInit { } public getDayHoursTypeDetails(month?, year?) { - console.log('getDayHoursTypeDetails'); const dayAndHoursReqObj = new GetDayAndHoursDetailsRequest(); this.monthName = month; this.yearDate = year; @@ -156,17 +158,17 @@ export class DetailsComponent implements OnInit { dayAndHoursReqObj.P_PAGE_NUM = this.dayAndHoursPageNumber; dayAndHoursReqObj.P_PAGE_LIMIT = 100; - this.timeCardService.getDayHoursTypeDetails(dayAndHoursReqObj).subscribe((result) => { + this.timeCardService.getDayHoursTypeDetails(dayAndHoursReqObj, '', '', this.isPostNoLoad).subscribe((result) => { if (this.common.validResponse(result)) { console.log(result.GetDayHoursTypeDetailsList); this.common.sharedService.setSharedData(result.GetDayHoursTypeDetailsList, 'RTP_IDs'); this.countAllAttendDays(result.GetDayHoursTypeDetailsList); } }); - } nextSlide() { + this.common.startLoading(); if (this.currentMonthName !== this.month) { this.showData = false; if (this.nextMonth > 12) { @@ -181,6 +183,7 @@ export class DetailsComponent implements OnInit { } previousSlide() { + this.common.startLoading(); this.showData = false; if (this.preMonth === 0) { this.currentYear = this.currentYear - 1; @@ -255,17 +258,11 @@ export class DetailsComponent implements OnInit { timeCardSummaryReqObj.SearchMonth = this.monthName; timeCardSummaryReqObj.SearchYear = this.yearDate; - this.timeCardService.getTimeCardSummary(timeCardSummaryReqObj).subscribe((result) => { + this.timeCardService.getTimeCardSummary(timeCardSummaryReqObj, '', '', this.isPostNoLoad).subscribe((result) => { if (this.common.validResponse(result)) { - this.timeCardSummaryData = result.GetTimeCardSummaryList[0]; this.absentDays = this.timeCardSummaryData.ABSENT_DAYS; this.attendedDays = this.timeCardSummaryData.ATTENDED_DAYS; - - // this.totalAttendancePrecentage = this.timeCardSummaryData.PERIOD_DAYS - this.timeCardSummaryData.OFF_DAYS; - // if (this.absentDays === 0 && this.attendedDays === 0) { - // this.futrueDays = this.totalAttendancePrecentage; - // } this.totalAttendancePrecentage = this.absentDays + this.attendedDays; if (this.totalAttendancePrecentage > 0) { this.data = { diff --git a/Mohem/src/app/time-card/service/time-card.service.ts b/Mohem/src/app/time-card/service/time-card.service.ts index b4fba9fe..d42b10db 100644 --- a/Mohem/src/app/time-card/service/time-card.service.ts +++ b/Mohem/src/app/time-card/service/time-card.service.ts @@ -45,31 +45,51 @@ export class TimeCardService { public getTimeCardSummary( timeCardSummaryReq, onError?: any, - errorLabel?: string + errorLabel?: string, + isPostNoLoad = false ): Observable { const request = timeCardSummaryReq; this.authService.authenticateRequest(request); + if (isPostNoLoad) { + return this.con.postNoLoad( + TimeCardService.getTimeCardSummaryUrl, + request, + onError, + errorLabel + ); + } else { return this.con.post( TimeCardService.getTimeCardSummaryUrl, request, onError, errorLabel ); + } } public getDayHoursTypeDetails( dayHoursDetailsReq, onError?: any, - errorLabel?: string + errorLabel?: string, + isPostNoLoad = false ): Observable { const request = dayHoursDetailsReq; this.authService.authenticateRequest(request); - return this.con.post( - TimeCardService.getDayHourDetailsUrl, - request, - onError, - errorLabel - ); + if (isPostNoLoad) { + return this.con.postNoLoad( + TimeCardService.getDayHourDetailsUrl, + request, + onError, + errorLabel + ); + } else { + return this.con.post( + TimeCardService.getDayHourDetailsUrl, + request, + onError, + errorLabel + ); + } } public getShiftDetail( diff --git a/Mohem/src/app/time-card/time-card-details/time-card-details.component.ts b/Mohem/src/app/time-card/time-card-details/time-card-details.component.ts index 377dfbd3..d8078337 100644 --- a/Mohem/src/app/time-card/time-card-details/time-card-details.component.ts +++ b/Mohem/src/app/time-card/time-card-details/time-card-details.component.ts @@ -3,7 +3,6 @@ import { TimeCardService } from 'src/app/time-card/service/time-card.service'; import { CommonService } from 'src/app/hmg-common/services/common/common.service'; import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service'; import { ModalController, IonSlides } from '@ionic/angular'; -import { SelectPeriodComponent } from '../select-period/select-period.component'; import { GetDayAndHoursDetailsRequest } from 'src/app/time-card/service/models/get-day-hours-type-details.request'; import { GetTimeCardSummaryRequest } from 'src/app/time-card/service/models/get-time-card-summary.request'; import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response'; @@ -62,6 +61,7 @@ export class TimeCardDetailsComponent implements OnInit { public currentYear = new Date().getFullYear(); public dayHoursTypeDetailsList = []; public currentDate = new Date(); + public isPostNoLoad = true; public options = { cutoutPercentage: 80, tooltips: { enabled: false }, @@ -70,6 +70,7 @@ export class TimeCardDetailsComponent implements OnInit { public data = {}; ngOnInit() { + this.common.startLoading(); this.showData = false; this.nextMonth = new Date().getMonth() + 2; this.preMonth = new Date().getMonth(); @@ -101,7 +102,7 @@ export class TimeCardDetailsComponent implements OnInit { dayAndHoursReqObj.P_PAGE_NUM = this.dayAndHoursPageNumber; dayAndHoursReqObj.P_PAGE_LIMIT = 100; - this.timeCardService.getDayHoursTypeDetails(dayAndHoursReqObj).subscribe((result) => { + this.timeCardService.getDayHoursTypeDetails(dayAndHoursReqObj, '', '', this.isPostNoLoad).subscribe((result) => { if (this.common.validResponse(result)) { console.log(result.GetDayHoursTypeDetailsList); this.common.sharedService.setSharedData(result.GetDayHoursTypeDetailsList, 'RTP_IDs'); @@ -163,17 +164,11 @@ export class TimeCardDetailsComponent implements OnInit { timeCardSummaryReqObj.SearchMonth = this.monthName; timeCardSummaryReqObj.SearchYear = this.yearDate; - this.timeCardService.getTimeCardSummary(timeCardSummaryReqObj).subscribe((result) => { + this.timeCardService.getTimeCardSummary(timeCardSummaryReqObj, '', '', this.isPostNoLoad).subscribe((result) => { if (this.common.validResponse(result)) { - this.timeCardSummaryData = result.GetTimeCardSummaryList[0]; this.absentDays = this.timeCardSummaryData.ABSENT_DAYS; this.attendedDays = this.timeCardSummaryData.ATTENDED_DAYS; - - // this.totalAttendancePrecentage = this.timeCardSummaryData.PERIOD_DAYS - this.timeCardSummaryData.OFF_DAYS; - // if (this.absentDays === 0 && this.attendedDays === 0) { - // this.futrueDays = this.totalAttendancePrecentage; - // } this.totalAttendancePrecentage = this.absentDays + this.attendedDays; if (this.totalAttendancePrecentage > 0) { this.data = { @@ -193,6 +188,7 @@ export class TimeCardDetailsComponent implements OnInit { } nextSlide() { + this.common.startLoading(); if (this.currentMonthName !== this.month) { this.showData = false; if (this.nextMonth > 12) { @@ -207,6 +203,7 @@ export class TimeCardDetailsComponent implements OnInit { } previousSlide() { + this.common.startLoading(); this.showData = false; if (this.preMonth === 0) { this.currentYear = this.currentYear - 1; From e7d476fc2ec49148269fc2ed5843ca515248be8b Mon Sep 17 00:00:00 2001 From: umasoodch Date: Wed, 11 Mar 2020 16:48:57 +0300 Subject: [PATCH 08/19] fixed MM-139 MM-134 MM-123 MM-47 --- .../device-permissions.service.ts | 54 ++++++++++--------- Mohem/src/app/home/home.page.html | 2 +- Mohem/src/app/home/home.page.ts | 23 +++----- Mohem/src/assets/localization/i18n.json | 4 ++ 4 files changed, 40 insertions(+), 43 deletions(-) diff --git a/Mohem/src/app/hmg-common/services/device-permissions/device-permissions.service.ts b/Mohem/src/app/hmg-common/services/device-permissions/device-permissions.service.ts index b34ae6a3..01f7a2b9 100644 --- a/Mohem/src/app/hmg-common/services/device-permissions/device-permissions.service.ts +++ b/Mohem/src/app/hmg-common/services/device-permissions/device-permissions.service.ts @@ -13,22 +13,25 @@ import { OpenNativeSettings } from '@ionic-native/open-native-settings/ngx'; providedIn: 'root' }) export class DevicePermissionsService { + + constructor( + public diagnostic: Diagnostic, + public cs: CommonService, + public nativeStorage: NativeStorage, + public ts: TranslatorService, + public nativeSettings: OpenNativeSettings) { } public static GRANTED = 'GRANTED'; public static DENIED_ALWAYS = 'DENIED_ALWAYS'; public static CAMERA_MIC = 'camera_mic_permission'; public static LOCATION = 'location_permission'; + + public static APP_SETTINGS = 'application_details'; + public onSucess; public onerror; - constructor( - public diagnostic: Diagnostic, - public cs: CommonService, - public nativeStorage: NativeStorage, - public ts: TranslatorService, - public nativeSettings: OpenNativeSettings) { } - public requestCameraPermission(): Observable { return Observable.create(observer => { @@ -37,16 +40,17 @@ export class DevicePermissionsService { } private requestCamera(observer: any) { - //console.log("Camera permission????????") this.hasCameraPermission().then((isAvailable) => { if (isAvailable) { // this.requestMicophonePermission(observer); this.observerDone(observer, true); } else { this.diagnostic.requestCameraAuthorization(true).then((value) => { + // tslint:disable-next-line: triple-equals if (value == DevicePermissionsService.GRANTED) { - //this.requestMicophonePermission(observer); + // this.requestMicophonePermission(observer); this.observerDone(observer, true); + // tslint:disable-next-line: triple-equals } else if (value == DevicePermissionsService.DENIED_ALWAYS) { // this.setAlwaysDenied(DevicePermissionsService.CAMERA_MIC, true); this.observerDone(observer, false); @@ -77,8 +81,10 @@ export class DevicePermissionsService { this.observerDone(observer, true); } else { this.diagnostic.requestMicrophoneAuthorization().then((value) => { + // tslint:disable-next-line: triple-equals if (value == DevicePermissionsService.GRANTED) { this.observerDone(observer, true); + // tslint:disable-next-line: triple-equals } else if (value == DevicePermissionsService.DENIED_ALWAYS) { this.setAlwaysDenied(DevicePermissionsService.CAMERA_MIC, true); this.observerDone(observer, false); @@ -112,8 +118,8 @@ export class DevicePermissionsService { } public async hasCameraAndMicPermissions(): Promise { - let camera = await this.hasCameraPermission(); - //let mic = await this.diagnostic.isMicrophoneAuthorized(); + const camera = await this.hasCameraPermission(); + // let mic = await this.diagnostic.isMicrophoneAuthorized(); if (camera) { // await this.setAlwaysDenied(DevicePermissionsService.CAMERA_MIC, false); return true; @@ -128,7 +134,7 @@ export class DevicePermissionsService { resolve(true); }, this.ts.trPK('general', 'accept'), () => { - resolve(false) + resolve(false); }, this.ts.trPK('general', 'not-now'), this.ts.trPK('general', 'confirm'), message ); }); @@ -140,15 +146,12 @@ export class DevicePermissionsService { resolve(true); }, this.ts.trPK('general', 'settings'), () => { - resolve(false) + resolve(false); }, this.ts.trPK('general', 'not-now'), this.ts.trPK('general', 'confirm'), message ); }); } - - public static APP_SETTINGS = 'application_details'; - public async openApplicationSettings() { // return new Promise((resolver, reject) => { // this.nativeSettings.open(DevicePermissionsService.APP_SETTINGS).then(result => { @@ -208,13 +211,13 @@ export class DevicePermissionsService { if (await this.hasCameraAndMicPermissions()) { return true; } else { - let message = this.ts.trPK('permissions', 'camera'); + const message = this.ts.trPK('permissions', 'camera'); // if (await this.isPermissionAlwaysDenied(DevicePermissionsService.CAMERA_MIC)) { // if (await this.permissionSettingsDialog(message)) { // return this.openCameraAndMicSettings(); // } // } else { - if (await this.permissionRequestDialog(message)) { + if (await this.permissionRequestDialog(message)) { return this.requestCameraPermission().toPromise(); } // } @@ -227,17 +230,16 @@ export class DevicePermissionsService { public async requestLocationAutherization() { if ( await this.isLocationEnabled()) { - if (await this.hasLocationPermissions()) { return true; } else { - let message = this.ts.trPK('permissions', 'location'); + const message = this.ts.trPK('permissions', 'location'); // if (await this.isPermissionAlwaysDenied(DevicePermissionsService.LOCATION)) { // if (await this.permissionSettingsDialog(message)) { // return this.openLocationSettings(); // } // } else { - if (await this.permissionRequestDialog(message)) { + if (await this.permissionRequestDialog(message)) { return this.requestLocationPermission(); } // } @@ -249,7 +251,7 @@ export class DevicePermissionsService { } private async isLocationEnabled() { - let isAvailable = await this.diagnostic.isLocationEnabled(); + const isAvailable = await this.diagnostic.isLocationEnabled(); if (!isAvailable) { this.cs.presentAlert(this.ts.trPK('permissions', 'enable-location'), () => { }); @@ -258,7 +260,7 @@ export class DevicePermissionsService { } public async hasLocationPermissions(): Promise { - let location = await this.diagnostic.isLocationAvailable(); + const location = await this.diagnostic.isLocationAvailable(); if (location) { await this.setAlwaysDenied(DevicePermissionsService.LOCATION, false); return true; @@ -280,12 +282,14 @@ export class DevicePermissionsService { private async requestLocationPermission() { - let hasPermissions = await this.hasLocationPermissions(); + const hasPermissions = await this.hasLocationPermissions(); if (!hasPermissions) { - let value = await this.diagnostic.requestLocationAuthorization(); + const value = await this.diagnostic.requestLocationAuthorization(); + // tslint:disable-next-line: triple-equals if (value == DevicePermissionsService.GRANTED) { return true; + // tslint:disable-next-line: triple-equals } else if (value == DevicePermissionsService.DENIED_ALWAYS) { this.setAlwaysDenied(DevicePermissionsService.LOCATION, true); } diff --git a/Mohem/src/app/home/home.page.html b/Mohem/src/app/home/home.page.html index 332d8088..28c51af5 100644 --- a/Mohem/src/app/home/home.page.html +++ b/Mohem/src/app/home/home.page.html @@ -85,7 +85,7 @@
- +
diff --git a/Mohem/src/app/home/home.page.ts b/Mohem/src/app/home/home.page.ts index cd93537b..31754b32 100644 --- a/Mohem/src/app/home/home.page.ts +++ b/Mohem/src/app/home/home.page.ts @@ -234,7 +234,7 @@ export class HomePage implements OnInit { this.attendance(); }) .catch(error => { - console.log('Error getting location', error); + this.common.presentAlert(this.ts.trPK('home', 'position-error')); }); } else { return false; @@ -268,18 +268,6 @@ export class HomePage implements OnInit { // }); // } - ionViewDidEnter() { - this.geolocation - .getCurrentPosition() - .then(resp => { - this.lat = resp.coords.latitude; - this.longt = resp.coords.longitude; - }) - .catch(error => { - console.log('Error getting location', error); - }); - } - private openMenu() { this.menu.toggle(); } @@ -316,7 +304,6 @@ export class HomePage implements OnInit { this.showOpenMissingSwipes(); this.showAttendanceTracking(); this.getAccrualBalance(); - // this.common.stopLoading(); } public Vacation_Rule() { @@ -472,9 +459,11 @@ export class HomePage implements OnInit { this.barcodeScanner .scan() .then(barcodeData => { - this.scannedResult = barcodeData; - this.deviceID = this.device.uuid; - this.swipeAttendance(); + if (!barcodeData.cancelled) { + this.scannedResult = barcodeData; + this.deviceID = this.device.uuid; + this.swipeAttendance(); + } }) .catch(err => { console.log('Error', err); diff --git a/Mohem/src/assets/localization/i18n.json b/Mohem/src/assets/localization/i18n.json index 521a5b94..07a95bef 100644 --- a/Mohem/src/assets/localization/i18n.json +++ b/Mohem/src/assets/localization/i18n.json @@ -868,6 +868,10 @@ } }, "home": { + "position-error": { + "en": "Error getting your location. Please try again!", + "ar": "Error getting your location. Please try again!" + }, "dashboard": { "en": "My Dashboard", "ar": "الرئيسية" From 270506a31cfd0c998cbffeec8a90c5ca9971fc42 Mon Sep 17 00:00:00 2001 From: umasoodch Date: Thu, 12 Mar 2020 09:58:11 +0300 Subject: [PATCH 09/19] fixed multiple popup issues --- .../attend-services/attend-scan.service.ts | 87 +++++++++---------- 1 file changed, 43 insertions(+), 44 deletions(-) diff --git a/Mohem/src/app/hmg-common/services/attend-services/attend-scan.service.ts b/Mohem/src/app/hmg-common/services/attend-services/attend-scan.service.ts index dc780d83..2dbbe194 100644 --- a/Mohem/src/app/hmg-common/services/attend-services/attend-scan.service.ts +++ b/Mohem/src/app/hmg-common/services/attend-services/attend-scan.service.ts @@ -5,15 +5,15 @@ import { SharedDataService } from '../shared-data-service/shared-data.service'; import { BarcodeScanner } from '@ionic-native/barcode-scanner/ngx'; import { AttendanceService } from 'src/app/home/services/attendance.services'; import { ZBar } from '@ionic-native/zbar/ngx'; -import { Geolocation } from "@ionic-native/geolocation/ngx"; +import { Geolocation } from '@ionic-native/geolocation/ngx'; import { attendanceSwipeScannerRequest } from 'src/app/home/models/attendanceSwipe.Request'; import { AuthenticatedUser } from '../authentication/models/authenticated-user'; import { CommonService } from '../common/common.service'; import { TranslatorService } from '../translator/translator.service'; -import { Response } from "src/app/hmg-common/services/models/response"; -import { Camera, CameraOptions,PictureSourceType} from "@ionic-native/Camera/ngx"; -import { DevicePermissionsService } from '../../services/device-permissions/device-permissions.service' -import { Device } from "@ionic-native/device/ngx"; +import { Response } from 'src/app/hmg-common/services/models/response'; +import { Camera, CameraOptions, PictureSourceType} from '@ionic-native/Camera/ngx'; +import { DevicePermissionsService } from '../../services/device-permissions/device-permissions.service'; +import { Device } from '@ionic-native/device/ngx'; @Injectable({ @@ -28,50 +28,49 @@ export class AttendScanService { scannedResult: any; userData: any = {}; constructor(private device: Device, - private zbar: ZBar, - private geolocation: Geolocation, - private attendance_service: AttendanceService, - private barcodeScanner: BarcodeScanner, - private cameraController: Camera, - public sharedData: SharedDataService, - private sanitizer: DomSanitizer, - private permissions: DevicePermissionsService, - public common:CommonService, - public ts: TranslatorService,) { - this.userData =this.common.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA,false); + private zbar: ZBar, + private geolocation: Geolocation, + private attendance_service: AttendanceService, + private barcodeScanner: BarcodeScanner, + private cameraController: Camera, + public sharedData: SharedDataService, + private sanitizer: DomSanitizer, + private permissions: DevicePermissionsService, + public common: CommonService, + public ts: TranslatorService, ) { + this.userData = this.common.sharedService.getSharedData(AuthenticatedUser.SHARED_DATA, false); } public getDeviceLocation() { - let isVirtual = this.device.isVirtual; - if(isVirtual==true){ - alert("emulater>>>>>>>"+isVirtual); - alert("You are using virtual device"); + const isVirtual = this.device.isVirtual; + // tslint:disable-next-line: triple-equals + if (isVirtual == true) { + alert('emulater>>>>>>>' + isVirtual); + alert('You are using virtual device'); return false; } - + this.permissions.requestLocationAutherization().then(granted => { this.location = granted as boolean; if (this.location) { this.geolocation .getCurrentPosition({ maximumAge: 3000, timeout: 10000, enableHighAccuracy: true }) .then(resp => { - // console.log(resp.coords.latitude); - // console.log(resp.coords.longitude); this.lat = resp.coords.latitude; this.longt = resp.coords.longitude; this.attendance(); }) .catch(error => { - console.log("Error getting location", error); + console.log('Error getting location', error); }); - + } else { return false; } }); - + } - + public attendance() { this.permissions.requestCameraAutherization().then(granted => { this.camera = granted as boolean; @@ -81,43 +80,43 @@ export class AttendScanService { } ); } - - + + public scanCode() { this.barcodeScanner.scan().then(barcodeData => { - console.log('Barcode data', barcodeData); - // let strResult = JSON.parse(barcodeData); - // console.log(strResult.QRValue); - this.scannedResult = barcodeData; - this.deviceID = this.device.uuid; - this.swipeAttendance(); + if (!barcodeData.cancelled) { + this.scannedResult = barcodeData; + this.deviceID = this.device.uuid; + this.swipeAttendance(); + } }).catch(err => { console.log('Error', err); }); } - - + + public swipeAttendance() { - let request: attendanceSwipeScannerRequest = new attendanceSwipeScannerRequest(); + const request: attendanceSwipeScannerRequest = new attendanceSwipeScannerRequest(); request.Latitude = this.lat; request.Longitude = this.longt; request.QRValue = this.scannedResult.text; request.UID = this.deviceID; request.UserName = this.userData.EMPLOYEE_NUMBER; - console.log("request"); + console.log('request'); console.log(JSON.stringify(request)); this.attendance_service .attendanceSwipeScanner(request, () => { - console.log("Error inside in swipe attendance"); + console.log('Error inside in swipe attendance'); }) .subscribe((result: Response) => { if (this.common.validResponse(result)) { - console.log("response"); + console.log('response'); console.log(result); - this.common.presentAlert(this.ts.trPK("home", "swipeAlertSuccess")); - } else { - this.common.presentAlert(this.ts.trPK("home", "swipeAlertFailed")); + this.common.presentAlert(this.ts.trPK('home', 'swipeAlertSuccess')); } + // else { + // this.common.presentAlert(this.ts.trPK("home", "swipeAlertFailed")); + // } }); } } From 47054eca843815c7d0cbaf242f0738fe9549c294 Mon Sep 17 00:00:00 2001 From: ashwaq Date: Thu, 12 Mar 2020 10:00:39 +0300 Subject: [PATCH 10/19] fix vacation-rule issue --- .../change-password.component.ts | 6 ++-- .../work-list-replacement-roll.component.html | 6 ++-- .../work-list-replacement-roll.component.scss | 6 ++++ .../work-list-replacement-roll.component.ts | 23 ++++++++++++++ .../replacement-list.component.html | 10 +++--- .../replacement-list.component.scss | 3 ++ .../replacement-list.component.ts | 31 ++++++++++++++++++- 7 files changed, 73 insertions(+), 12 deletions(-) diff --git a/Mohem/src/app/authentication/change-password/change-password.component.ts b/Mohem/src/app/authentication/change-password/change-password.component.ts index c7449268..6ad7b9be 100644 --- a/Mohem/src/app/authentication/change-password/change-password.component.ts +++ b/Mohem/src/app/authentication/change-password/change-password.component.ts @@ -21,9 +21,9 @@ import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/mo }) export class ChangePasswordComponent implements OnInit { private loginData = new LoginModel(); - public P_NEW_PASSWORD: string; - public P_Confirm_NEW_PASSWORD : string; - public P_OLD_PASSWORD : string; + public P_NEW_PASSWORD: string = ""; + public P_Confirm_NEW_PASSWORD : string = ""; + public P_OLD_PASSWORD : string = ""; public P_USER_NAME : string; public logo = "assets/icon/login/lock.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 b4edfb82..0016e66f 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 @@ -11,7 +11,7 @@ {{'replacementRoll, searchBy' | translate}} + [(ngModel)]="searchBy" (ionChange)="onChangeSelect($event)"> {{'addAttach, name' | translate}} {{'login, username' | translate}} {{'general, email' | translate}} @@ -19,11 +19,11 @@ - + - + - +
diff --git a/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.scss b/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.scss index 31ba8d46..8212dc68 100644 --- a/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.scss +++ b/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.scss @@ -164,4 +164,7 @@ button.item-button.button.button-md.button-clear.button-clear-md { border: #dedede solid 1px; } +.disabledButton{ + opacity:.5; +} diff --git a/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.ts b/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.ts index d136c2a1..731fe21d 100644 --- a/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.ts +++ b/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.ts @@ -29,12 +29,18 @@ export class ReplacementListComponent implements OnInit { isAbs: boolean = false; isSave: boolean = false; active: any; + isSelect: boolean =false; + searchKeyEnter: boolean = false; constructor(public vacationRuleService: VacationRuleServiceService, public ts: TranslatorService, public cs: CommonService, public modalController: ModalController) { } - ngOnInit() { } + ngOnInit() { + + } SearchReplacementList() { + console.log("this.searchKeySelect" + this.searchKeySelect); + this.ReplacementList = []; this.IsReachEnd = false; this.P_PAGE_NUM = 1; @@ -198,4 +204,27 @@ export class ReplacementListComponent implements OnInit { infiniteScroll.target.complete(); } } + + onChangeSelect(select){ + console.log(select.detail.value); + let selectValue= select.detail.value; + + if(selectValue == "1" || selectValue == "2" ||selectValue == "3"){ + this.isSelect=true; + } + else{ + this.isSelect=false; + + } + } + + onChangeInput(){ + if (this.searchKey.length >0) { + this.searchKeyEnter=true; + + }else{ + this.searchKeyEnter=false; + + } + } } From 7f32c91f5c9b613f4f63cf8c16a02f89981441fc Mon Sep 17 00:00:00 2001 From: umasoodch Date: Thu, 12 Mar 2020 11:42:28 +0300 Subject: [PATCH 11/19] fixed loading issue at worklist --- .../app/notification/home/home.component.ts | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/Mohem/src/app/notification/home/home.component.ts b/Mohem/src/app/notification/home/home.component.ts index 91d0f40a..99ea0022 100644 --- a/Mohem/src/app/notification/home/home.component.ts +++ b/Mohem/src/app/notification/home/home.component.ts @@ -11,6 +11,7 @@ import { WorklistAdvancedSearchComponent } from '../worklist-advanced-search/wor import { DatePipe } from '@angular/common'; import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbored/models/GetOpenNotificationsResponse'; import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service'; +import { timeout } from 'rxjs/operators'; @Component({ selector: 'app-home', @@ -175,9 +176,9 @@ export class HomeComponent implements OnInit { this.worklistNotifications = this.common.sharedService.getSharedData('worklistNotifications', false); } ngOnInit() { + this.common.startLoading(); this.direction = TranslatorService.getCurrentLanguageName(); this.worklistNotifications = this.common.sharedService.getSharedData('worklistNotifications', false); - this.common.startLoading(); this.openNotificationsDashboard(); } @@ -423,12 +424,15 @@ export class HomeComponent implements OnInit { } else { this.newWorkListResponse = this.newWorkListResponse.concat(result); } - const categorizedWorkListResponse = this.categorizeData(this.newWorkListResponse); - this.assignDataToFilters(); - this.showFormattedData = this.sortArray(categorizedWorkListResponse); - this.allFormattedData = this.showFormattedData; - this.common.sharedService.setSharedData(this.newWorkListResponse, HomeComponent.NOTIFICATION_ARR); - this.common.stopLoading(); + let categorizedWorkListResponse = []; + categorizedWorkListResponse = this.categorizeData(this.newWorkListResponse); + if (categorizedWorkListResponse.length > 0) { + this.assignDataToFilters(); + this.showFormattedData = this.sortArray(categorizedWorkListResponse); + this.allFormattedData = this.showFormattedData; + this.common.sharedService.setSharedData(this.newWorkListResponse, HomeComponent.NOTIFICATION_ARR); + this.common.stopLoading(); + } } else { this.newWorkListResponse = []; } @@ -477,7 +481,8 @@ export class HomeComponent implements OnInit { doInfinite(infiniteScroll) { if (!this.isReachEnd && this.selectedFilter !== 'ITG') { - this.WorklistService.getWorkList(this.WorkListObj).subscribe((result) => { + this.common.startLoading(); + this.WorklistService.getWorkList(this.WorkListObj, '', '', this.isPostNoLoad).subscribe((result) => { if (this.common.validResponse(result)) { this.handleWorkListResult(result.GetWorkList); } @@ -498,7 +503,7 @@ export class HomeComponent implements OnInit { data: null, style: false }; - this.workListService.getITGCount() + this.workListService.getITGCount('', '', this.isPostNoLoad) .subscribe((result: any) => { for (let i = 1; i < result.RequestType.length; i++) { this.ITGSegment[i] = { @@ -517,7 +522,7 @@ export class HomeComponent implements OnInit { } Details() { - this.workListService.getITGDetails() + this.workListService.getITGDetails('', '', this.isPostNoLoad) .subscribe((result: any) => { this.totalRequestCount = this.totalRequestCount + result.TotalCount; this.filters[5].value = result.TotalCount; From 38ebbec6f1f828ba6063d25c17fcd121efe501b9 Mon Sep 17 00:00:00 2001 From: Salman Afzal Date: Thu, 12 Mar 2020 12:19:56 +0300 Subject: [PATCH 12/19] fixed loading issues --- Mohem/src/app/notification/home/home.component.html | 2 +- Mohem/src/app/notification/home/home.component.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Mohem/src/app/notification/home/home.component.html b/Mohem/src/app/notification/home/home.component.html index f7ddcbba..8aa54534 100644 --- a/Mohem/src/app/notification/home/home.component.html +++ b/Mohem/src/app/notification/home/home.component.html @@ -25,7 +25,7 @@
- + 0) { - this.assignDataToFilters(); this.showFormattedData = this.sortArray(categorizedWorkListResponse); this.allFormattedData = this.showFormattedData; this.common.sharedService.setSharedData(this.newWorkListResponse, HomeComponent.NOTIFICATION_ARR); - this.common.stopLoading(); + this.assignDataToFilters(); } } else { this.newWorkListResponse = []; From 4e3d0b029855fdf626b4c9e703b71050d3595af3 Mon Sep 17 00:00:00 2001 From: umasoodch Date: Thu, 12 Mar 2020 12:34:46 +0300 Subject: [PATCH 13/19] fixed minor issues of worklist --- Mohem/src/app/notification/home/home.component.html | 2 +- .../worklist-advanced-search.component.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Mohem/src/app/notification/home/home.component.html b/Mohem/src/app/notification/home/home.component.html index 8aa54534..e2a26be5 100644 --- a/Mohem/src/app/notification/home/home.component.html +++ b/Mohem/src/app/notification/home/home.component.html @@ -63,7 +63,7 @@
-
+
{{formattedData.date}}
diff --git a/Mohem/src/app/notification/worklist-advanced-search/worklist-advanced-search.component.html b/Mohem/src/app/notification/worklist-advanced-search/worklist-advanced-search.component.html index 63dd8f94..030fd170 100644 --- a/Mohem/src/app/notification/worklist-advanced-search/worklist-advanced-search.component.html +++ b/Mohem/src/app/notification/worklist-advanced-search/worklist-advanced-search.component.html @@ -1,6 +1,6 @@
-

{{ts.trPK('general','sadvanced-search')}}

+

{{ts.trPK('general','advanced-search')}}

From 1b875b8bc452fc1d29521d39798aecbbc438de5e Mon Sep 17 00:00:00 2001 From: ashwaq Date: Sun, 15 Mar 2020 10:46:53 +0300 Subject: [PATCH 14/19] fix replacment inif --- .../replacement-list.component.ts | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.ts b/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.ts index 731fe21d..b583fae8 100644 --- a/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.ts +++ b/Mohem/src/app/vacation-rule/replacement-list/replacement-list.component.ts @@ -31,10 +31,12 @@ export class ReplacementListComponent implements OnInit { active: any; isSelect: boolean =false; searchKeyEnter: boolean = false; + request: ReplacementServiceRequest; constructor(public vacationRuleService: VacationRuleServiceService, public ts: TranslatorService, public cs: CommonService, public modalController: ModalController) { } ngOnInit() { + this.request = new ReplacementServiceRequest(); } @@ -79,15 +81,15 @@ export class ReplacementListComponent implements OnInit { this.P_SEARCH_EMAIL_ADDRESS = ""; } - const request = new ReplacementServiceRequest(); - request.P_SEARCH_USER_NAME = this.P_SEARCH_USER_NAME; - request.P_SEARCH_EMPLOYEE_DISPLAY_NAME = this.P_SEARCH_EMPLOYEE_DISPLAY_NAME; - request.P_SEARCH_EMAIL_ADDRESS = this.P_SEARCH_EMAIL_ADDRESS; - request.P_PAGE_NUM = this.P_PAGE_NUM; - request.P_PAGE_LIMIT = this.P_PAGE_LIMIT; - request.P_SELECTED_EMPLOYEE_NUMBER = this.selEmp; + // const request = new ReplacementServiceRequest(); + this.request.P_SEARCH_USER_NAME = this.P_SEARCH_USER_NAME; + this.request.P_SEARCH_EMPLOYEE_DISPLAY_NAME = this.P_SEARCH_EMPLOYEE_DISPLAY_NAME; + this.request.P_SEARCH_EMAIL_ADDRESS = this.P_SEARCH_EMAIL_ADDRESS; + this.request.P_PAGE_NUM = this.P_PAGE_NUM; + this.request.P_PAGE_LIMIT = this.P_PAGE_LIMIT; + this.request.P_SELECTED_EMPLOYEE_NUMBER = this.selEmp; - this.vacationRuleService.getReplacementList(request). + this.vacationRuleService.getReplacementList(this.request). subscribe((result: any) => { this.handleReplacment(result); }); @@ -167,13 +169,14 @@ export class ReplacementListComponent implements OnInit { if (!this.IsReachEnd) { - const request = new ReplacementServiceRequest(); - request.P_PAGE_NUM = this.P_PAGE_NUM; - request.P_PAGE_LIMIT = this.P_PAGE_LIMIT; + ///const request = new ReplacementServiceRequest(); + console.log(this.request.P_SEARCH_USER_NAME + "-" + this.request.P_SEARCH_EMAIL_ADDRESS + "-" + this.request.P_SEARCH_EMPLOYEE_DISPLAY_NAME ) + this.request.P_PAGE_NUM = this.P_PAGE_NUM; + this.request.P_PAGE_LIMIT = this.P_PAGE_LIMIT; // request.P_SELECTED_EMPLOYEE_NUMBER=this.selEmp; - this.vacationRuleService.getReplacementList(request). + this.vacationRuleService.getReplacementList(this.request). subscribe((result: any) => { if (this.cs.validResponse(result)) { if (this.cs.hasData(result.ReplacementList)) { From 18f54941ee1b8a158c019f609fa8fd5725eaf461 Mon Sep 17 00:00:00 2001 From: ashwaq Date: Sun, 15 Mar 2020 12:04:37 +0300 Subject: [PATCH 15/19] fix update/continue notification + action name --- .../submit-absence.component.ts | 5 ++- .../src/app/eit/add-eit/add-eit.component.ts | 10 ++++-- .../confirm-add-eit.component.ts | 7 ++-- .../app/eit/eit-list/eit-list.component.html | 4 +-- .../eit-update-list.component.html | 35 ++++++++++++++----- .../eit-update-list.component.scss | 17 +++++++++ .../eit-update-list.component.ts | 17 +++++---- .../services/common/common.service.ts | 4 ++- .../worklist-main-mr.component.ts | 20 +++++++---- .../worklist-main-po.component.html | 2 +- .../worklist-main-po.component.ts | 8 +++++ .../worklist-main-pr.component.html | 2 +- .../worklist-main-pr.component.ts | 7 ++++ .../worklist-main.component.html | 2 +- .../worklist-main.component.scss | 1 + .../worklist-main/worklist-main.component.ts | 18 ++++++++-- 16 files changed, 124 insertions(+), 35 deletions(-) diff --git a/Mohem/src/app/absence/submit-absence/submit-absence.component.ts b/Mohem/src/app/absence/submit-absence/submit-absence.component.ts index cd019974..ffe60b9f 100644 --- a/Mohem/src/app/absence/submit-absence/submit-absence.component.ts +++ b/Mohem/src/app/absence/submit-absence/submit-absence.component.ts @@ -27,6 +27,7 @@ import {ReplacementListComponent} from "../../vacation-rule/replacement-list/rep import {ReplacmentResponse} from "../models/replacment-response"; import { AbsenceResponse } from '../models/absence.response'; import { AbsenceReplacementListComponent } from '../absence-replacement-list/absence-replacement-list.component'; +import { AbsenceNotificatonBodyResponse } from 'src/app/notification/models/AbsenceNotificationBodyRes'; @Component({ selector: "app-submit-absence", templateUrl: "./submit-absence.component.html", @@ -88,6 +89,8 @@ export class SubmitAbsenceComponent implements OnInit { ) { ////*new add*///// /**********resubmit************ */ + this.getPassNotificationDetails = this.common.sharedService.getSharedData(AbsenceNotificatonBodyResponse.NOT_WORKLIST, true); + this.getPassdirfromNotifiPage = this.common.sharedService.getSharedData('dirfromNotificationPage'); //this.getPassNotificationDetails = this.common.sharedService.getSharedData(AbsenceNotificatonBodyResponse.NOT_WORKLIST, true); // this.getPassdirfromNotifiPage = this.navParams.get('dirfromNotificationPage'); if (this.getPassdirfromNotifiPage) { @@ -97,7 +100,7 @@ export class SubmitAbsenceComponent implements OnInit { this.notificationId = this.getPassNotificationDetails.NOTIFICATION_ID; this.selEmp = this.getPassNotificationDetails.SELECTED_EMPLOYEE_NUMBER; this.respID = -999; - //this.submitAbsObjList = this.navParams.get('submitAbsObjList'); + this.submitAbsObjList = this.common.sharedService.getSharedData('submitAbsObjList'); } else { this.action = "CREATE"; this.selEmp = this.common.sharedService.getSharedData( diff --git a/Mohem/src/app/eit/add-eit/add-eit.component.ts b/Mohem/src/app/eit/add-eit/add-eit.component.ts index 81cc100e..409d2ef9 100644 --- a/Mohem/src/app/eit/add-eit/add-eit.component.ts +++ b/Mohem/src/app/eit/add-eit/add-eit.component.ts @@ -21,6 +21,8 @@ import { DatePicker } from "@ionic-native/date-picker/ngx"; import { EIT_ACTION } from "../models/submit.eit.action"; import { AddEitResponse } from "../models/add.eit.response"; import { element } from '@angular/core/src/render3'; +// import { EITNotificatonBodyResponse } from 'src/app/notification/models/EITNotificationBodyRes'; +import { EITNotificatonBodyResponse } from "../models/EITNotificationBodyRes"; @Component({ selector: "app-add-eit", @@ -87,6 +89,8 @@ export class AddEitComponent implements OnInit { false ); this.addEITData = this.cs.sharedService.getSharedData("AddEITData", false); + console.log("addEITData: " + this.addEITData); + console.log("dirfromNotificationPage: " + this.addEITData.dirfromNotificationPage); this.eitRequest = new EitRequest(); @@ -94,7 +98,7 @@ export class AddEitComponent implements OnInit { ////*new add*///// /**********resubmit************ */ - // this.getPassNotificationDetails = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, true); + this.getPassNotificationDetails = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, false);//WARINING this.getPassdirfromNotifiPage = this.addEITData.dirfromNotificationPage; if (this.getPassdirfromNotifiPage) { this.functionName = this.getPassNotificationDetails.FUNCTION_NAME; //;this.getPassNotificationDetails.NOTIFICATION_NAME; @@ -1551,6 +1555,7 @@ export class AddEitComponent implements OnInit { validateEITTransaction() { // let EITTransactionValues:any= []; + this.arrValues = this.getElementsValues(); if (this.arrValues) { this.eitRequest = { @@ -1582,7 +1587,8 @@ export class AddEitComponent implements OnInit { data.eitRequest = this.eitRequest; data.updated = this.updatedValues; // this.viewCtrl.dismiss(data); - this.closemodal(); + this.modalController.dismiss(data); + // this.closemodal(); } else { this.submitEit(); // this.navCtrl.push("ConfirmAddEitPage"); diff --git a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts index 608e2308..ea71f13d 100644 --- a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts +++ b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts @@ -76,11 +76,12 @@ export class ConfirmAddEitComponent implements OnInit { this.eitRequest = this.cs.sharedService.getSharedData(EitRequest.SHARED_DATA, false); this.isResubmitEIT = this.cs.sharedService.getSharedData('confirmAddEITData', false).isResubmit; if (this.isResubmitEIT) { - this.getPassNotificationDetails = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, true); + this.getPassNotificationDetails = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, false); //WARINING ** // console.log("this.getPassNotificationDetails: " + this.getPassNotificationDetails); this.P_TransactionID = this.cs.sharedService.getSharedData("TransactionIDResubmit", true); - let notification = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, true); - this.itemKey = notification.ITEM_KEY; + // let notification = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, true); + + this.itemKey = this.getPassNotificationDetails.ITEM_KEY; this.pActionMode = "RESUBMIT"; this.menuType = "E"; this.respID = -999; diff --git a/Mohem/src/app/eit/eit-list/eit-list.component.html b/Mohem/src/app/eit/eit-list/eit-list.component.html index 36b2b14c..84a09573 100644 --- a/Mohem/src/app/eit/eit-list/eit-list.component.html +++ b/Mohem/src/app/eit/eit-list/eit-list.component.html @@ -121,7 +121,7 @@ --> @@ -201,7 +201,7 @@ --> - +
diff --git a/Mohem/src/app/eit/eit-update-list/eit-update-list.component.html b/Mohem/src/app/eit/eit-update-list/eit-update-list.component.html index 5c562226..5ea12523 100644 --- a/Mohem/src/app/eit/eit-update-list/eit-update-list.component.html +++ b/Mohem/src/app/eit/eit-update-list/eit-update-list.component.html @@ -1,5 +1,5 @@ - + {{'eit, update-title' | translate}} @@ -11,34 +11,51 @@ -
{{'workListMain, notfDetails' | translate}}
+
{{'worklistMain, notfDetails' | translate}}
- +
+ + + -
+ +
- - - - + + +
+ +
+
+ +
+ + + + + + +
- + {{ 'general, next' | translate }}
\ No newline at end of file diff --git a/Mohem/src/app/eit/eit-update-list/eit-update-list.component.scss b/Mohem/src/app/eit/eit-update-list/eit-update-list.component.scss index e69de29b..8b091c54 100644 --- a/Mohem/src/app/eit/eit-update-list/eit-update-list.component.scss +++ b/Mohem/src/app/eit/eit-update-list/eit-update-list.component.scss @@ -0,0 +1,17 @@ +.addEitOkButton{ + white-space: normal !important; + text-transform: capitalize !important; + min-height: 45px !important; + min-width: 5px !important; + margin: 8px !important; + background-color: #22c6b3; + width: 80% !important; + color: white!important; + border-radius: 16px !important; + } + + .editIconDiv{ + right: 10px; + position: absolute; + top: 10px; + } \ No newline at end of file diff --git a/Mohem/src/app/eit/eit-update-list/eit-update-list.component.ts b/Mohem/src/app/eit/eit-update-list/eit-update-list.component.ts index 7218ba91..6a8681bf 100644 --- a/Mohem/src/app/eit/eit-update-list/eit-update-list.component.ts +++ b/Mohem/src/app/eit/eit-update-list/eit-update-list.component.ts @@ -25,8 +25,8 @@ export class EitUpdateListComponent implements OnInit { private descFlex: string; constructor(public cs: CommonService, public eitService: EitService, public modalController: ModalController) { - this.notificationBodyRes = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.SHARED_DATA, true); - let notification = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, true); + this.notificationBodyRes = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.SHARED_DATA, false); + let notification = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, false); this.itemKey = notification.ITEM_KEY; this.notificationId = notification.NOTIFICATION_ID; this.functionName = notification.FUNCTION_NAME; @@ -35,7 +35,7 @@ export class EitUpdateListComponent implements OnInit { this.fillEitTransactionTable(); } - ngOnInit() { } + ngOnInit() { console.log("ngOnInit");} async updateEitNot(index) { let item = this.notificationBodyRes[index].Collection_Notification; @@ -46,10 +46,15 @@ export class EitUpdateListComponent implements OnInit { modal.onDidDismiss() .then((data: any) => { + console.log("data" + data); + console.log("data" + data.data.updated); + console.log("data" + data.data.eitRequest.EITTransactionTBL); + + if (data) { - this.updatedData = this.updatedData ? this.updatedData.concat(data.updated) : data.updated; - this.notificationBodyRes[index].Collection_Notification = data.updated; - this.updateTransactionList(data.eitRequest.EITTransactionTBL); + this.updatedData = this.updatedData ? this.updatedData.concat(data.data.updated) : data.data.updated; + this.notificationBodyRes[index].Collection_Notification = data.data.updated; + this.updateTransactionList(data.data.eitRequest.EITTransactionTBL); } }); diff --git a/Mohem/src/app/hmg-common/services/common/common.service.ts b/Mohem/src/app/hmg-common/services/common/common.service.ts index 08163c91..5516192d 100644 --- a/Mohem/src/app/hmg-common/services/common/common.service.ts +++ b/Mohem/src/app/hmg-common/services/common/common.service.ts @@ -1212,7 +1212,9 @@ public getMonthNameAr(value: number): string { this.nav.navigateForward(["/profile/performanceevaluation"]); } - + public eitUpdate() { + this.nav.navigateForward(["/eit/eit-update-list"]); + } public navigatePage(path) { this.nav.navigateForward([path]); } diff --git a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts index f6a26e04..53e565e9 100644 --- a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts +++ b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts @@ -99,6 +99,7 @@ export class WorklistMainMRComponent implements OnInit { approveDis: boolean = false; rejectDis: boolean = false; requestDis: boolean = false; + moreDisabled: boolean = true; @@ -264,15 +265,22 @@ export class WorklistMainMRComponent implements OnInit { this.common.sharedService.setSharedData(this.notificationButtonRes, "passActionMore"); console.log("test" + this.notificationButtonRes.length); for (let i = 0; i < this.notificationButtonRes.length; i++) { - if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVE") { + if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVED" ) { this.approveDis = true; } else - if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECT") { + if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECTED" ) { this.rejectDis = true; } else if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") { this.requestDis = true; } // if result == null + else if( + this.notificationButtonRes[i].BUTTON_ACTION != "APPROVED" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECTED" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO") + { + this.moreDisabled = false; + + } + } // valid it } // if result == null @@ -356,8 +364,8 @@ export class WorklistMainMRComponent implements OnInit { this.P_RESPOND_ATTRIBUTES_TBL.push(obj); } if ( - ButtonAction == "APPROVE" || - ButtonAction == "REJECT" || + ButtonAction == "APPROVED" || + ButtonAction == "REJECTED" || ButtonAction == "DEL" || ButtonAction == "CLOSE" ) { @@ -373,10 +381,10 @@ export class WorklistMainMRComponent implements OnInit { ); ///////////////////////////////////////////// - if (ButtonAction == "APPROVE") { + if (ButtonAction == "APPROVED") { this.confirmMsg = this.ts.trPK('worklistMain', 'approveMsg') } - else if (ButtonAction == "REJECT") { + else if (ButtonAction == "REJECTED") { this.confirmMsg = this.ts.trPK('worklistMain', 'rejectMsg') } diff --git a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html index 09677388..9aaf82aa 100644 --- a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html +++ b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html @@ -796,7 +796,7 @@ Skip - + More diff --git a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts index 17440190..9495adab 100644 --- a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts +++ b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts @@ -115,6 +115,7 @@ export class WorklistMainPoComponent implements OnInit { approveDis: boolean = false; rejectDis: boolean = false; requestDis: boolean = false; + moreDisabled: boolean = true; constructor( @@ -305,6 +306,13 @@ export class WorklistMainPoComponent implements OnInit { if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") { this.requestDis = true; } // if result == null + else if ( + this.notificationButtonRes[i].BUTTON_ACTION != "APPROVE" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECT" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO") + { + this.moreDisabled = false; + + } + } // valid it } // valid it diff --git a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html index bcec9dc7..ad5f9853 100644 --- a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html +++ b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html @@ -508,7 +508,7 @@ Skip - + More diff --git a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts index acc3c674..665be0cd 100644 --- a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts +++ b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts @@ -100,6 +100,7 @@ export class WorklistMainPRComponent implements OnInit { approveDis: boolean; rejectDis: boolean; requestDis: boolean; + moreDisabled: boolean = true; constructor( @@ -307,6 +308,12 @@ export class WorklistMainPRComponent implements OnInit { if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") { this.requestDis = true; } // if result == null + else if ( + this.notificationButtonRes[i].BUTTON_ACTION != "APPROVE" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECT" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO") + { + this.moreDisabled = false; + + } } // valid it } } // valid it 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 61c26a72..d5c3dbae 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.html +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.html @@ -68,7 +68,7 @@
Employee will also on leave
- + diff --git a/Mohem/src/app/notification/worklist-main/worklist-main.component.scss b/Mohem/src/app/notification/worklist-main/worklist-main.component.scss index 7fe45a26..6ee10295 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.scss +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.scss @@ -185,6 +185,7 @@ --background: transparent; margin-left: -15px; margin-right: 6px; + margin-bottom:8px; } .status{ text-align: center; diff --git a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts index f739d41c..0c839614 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts @@ -94,6 +94,7 @@ export class WorklistMainComponent implements OnInit { rejectDis: boolean = false; requestDis: boolean = false; moreDisabled: boolean = true; + dirfromNotificationPage: boolean = false; constructor( public worklistService: WorklistService, @@ -310,7 +311,7 @@ export class WorklistMainComponent implements OnInit { if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") { this.requestDis = true; } // if result == null - else ( + else if( this.notificationButtonRes[i].BUTTON_ACTION != "APPROVED" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECTED" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO") { this.moreDisabled = false; @@ -543,6 +544,8 @@ export class WorklistMainComponent implements OnInit { EITNotificatonBodyResponse.NOT_WORKLIST ); // this.navCtrl.push("EitUpdateListPage"); + this.common.eitUpdate();// must be test + } else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") { this.common.sharedService.setSharedData( this.notificationBodyRes, @@ -556,7 +559,18 @@ export class WorklistMainComponent implements OnInit { // dirfromNotificationPage: true, // submitAbsObjList: this.notificationBodyRes[0].Collection_Notification // }); - this.common.openConfirmAbsece(); + //this.common.openConfirmAbsece(); + this.dirfromNotificationPage=true, + this.common.sharedService.setSharedData( + this.dirfromNotificationPage, + "dirfromNotificationPage" + ); + this.common.sharedService.setSharedData( + this.notificationBodyRes[0].Collection_Notification, + "submitAbsObjList" + ); + + this.common.openSubmitAbsencePage(); } } else if (this.notificationButtonRes.length > 0 && !ButtonAction) { From d31b76bc446771b8a5eae613046a4d1d318e3439 Mon Sep 17 00:00:00 2001 From: umasoodch Date: Sun, 15 Mar 2020 17:44:57 +0300 Subject: [PATCH 16/19] fixed all issues while making prod build --- .../absence-confirm.component.html | 4 +- .../absence-confirm.component.ts | 42 +-- Mohem/src/app/absence/home/home.component.ts | 4 +- .../submit-absence-modal.component.ts | 4 +- .../view-attachments.component.ts | 24 +- .../accrual-balances/home/home.component.ts | 2 +- Mohem/src/app/app.component.html | 4 +- .../src/app/attendance/home/home.component.ts | 29 +- .../confirm-login.component.html | 2 +- .../authentication/login/login.component.html | 2 +- .../authentication/login/login.component.ts | 290 +++++++++--------- .../confirm-add-eit.component.ts | 4 +- .../app/eit/eit-list/eit-list.component.ts | 205 +++++++------ Mohem/src/app/eit/home/home.component.html | 8 +- Mohem/src/app/eit/home/home.component.ts | 8 +- .../submit-eit-modal.component.ts | 2 +- Mohem/src/app/hmg-common/hmg-common.module.ts | 21 +- .../circle-calendar.component.html | 2 +- .../file-uploader/file-uploader.component.ts | 2 +- .../file-uploder-profile.component.html | 5 +- .../file-uploder-profile.component.ts | 81 +++-- .../international-mobile.component.ts | 1 + Mohem/src/app/hmg-common/ui/sms/sms.page.html | 4 +- Mohem/src/app/hmg-common/ui/sms/sms.page.ts | 109 ++++--- .../app/my-specialist/home/home.component.ts | 2 +- .../apply-action-modal.component.ts | 2 +- .../item-history/item-history.component.ts | 2 +- .../more-action-modal.component.ts | 2 +- .../app/notification/notification.module.ts | 7 +- .../qutation-analysis.component.ts | 2 +- .../work-list-main-itg.component.html | 7 +- .../work-list-main-itg.component.ts | 1 + .../worklist-main-mr.component.html | 2 +- .../worklist-main-mr.component.ts | 202 ++++++------ .../worklist-main-po.component.html | 2 +- .../worklist-main-po.component.ts | 2 +- .../worklist-main-pr.component.html | 2 +- .../worklist-main-pr.component.ts | 201 ++++++------ .../worklist-main.component.html | 2 +- .../worklist-main/worklist-main.component.ts | 1 + .../src/app/payslip/home/home.component.html | 2 +- .../edit-profile/edit-profile.component.html | 2 +- .../edit-profile/edit-profile.component.ts | 38 +-- .../src/app/profile/home/home.component.html | 2 +- Mohem/src/app/profile/home/home.component.ts | 42 +-- .../performance-evaluation.component.html | 2 +- .../performance-evaluation.component.ts | 22 +- .../select-period/select-period.component.ts | 1 + .../app/vacation-rule/home/home.component.ts | 2 + 49 files changed, 722 insertions(+), 689 deletions(-) diff --git a/Mohem/src/app/absence/absence-confirm/absence-confirm.component.html b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.html index 2439bfae..905d542f 100644 --- a/Mohem/src/app/absence/absence-confirm/absence-confirm.component.html +++ b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.html @@ -75,7 +75,7 @@ (click)="OpenAttachFiles(attachRes.FILE_DATA,attachRes.FILE_CONTENT_TYPE)"> - @@ -100,7 +100,7 @@
{{'confirmAddEit, approverList' | translate}}
-
+

{{ 'general, empty' | translate}}

diff --git a/Mohem/src/app/absence/absence-confirm/absence-confirm.component.ts b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.ts index 87c43df9..7e556283 100644 --- a/Mohem/src/app/absence/absence-confirm/absence-confirm.component.ts +++ b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.ts @@ -1,6 +1,6 @@ -import { Component, OnInit } from "@angular/core"; -import { CommonService } from "src/app/hmg-common/services/common/common.service"; -import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; +import { Component, OnInit } from '@angular/core'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; import { ApproversList } from '../models/approvers'; import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response'; import { WorkListButtonRequest } from 'src/app/eit/models/NotificationButtonReq'; @@ -16,23 +16,23 @@ import { WorkListAttachViewComponent } from 'src/app/notification/work-list-atta import { FileUploader } from 'ng2-file-upload'; import { SubmitAbsenceModalComponent } from '../submit-absence-modal/submit-absence-modal.component'; @Component({ - selector: "app-absence-confirm", - templateUrl: "./absence-confirm.component.html", - styleUrls: ["./absence-confirm.component.scss"] + selector: 'app-absence-confirm', + templateUrl: './absence-confirm.component.html', + styleUrls: ['./absence-confirm.component.scss'] }) export class AbsenceConfirmComponent implements OnInit { direction:string; P_TransactionID: number; - approversList: ApproversList; - selEmp: string = ""; + approversList = []; + selEmp: string = ''; respID: number; - absComments: string = ""; + absComments: string = ''; selMenu: MenuResponse; attachItems: any; attachListDisplay: any; isTrue: any = 0; getPassNotificationDetails: any; - menuType: string = ""; + menuType: string = ''; attachmentRes: any; objIndex1: any; attachListOver: any = []; @@ -63,7 +63,7 @@ export class AbsenceConfirmComponent implements OnInit { true ); this.selEmp = this.getPassNotificationDetails.SELECTED_EMPLOYEE_NUMBER; - this.menuType = "E"; + this.menuType = 'E'; this.respID = -999; // this.getApproversList(); // console.log("this.getPassNotificationDetails.P_NOTIFICATION_ID :"+this.getPassNotificationDetails.NOTIFICATION_ID); @@ -130,7 +130,7 @@ export class AbsenceConfirmComponent implements OnInit { return el.isSuccess == true; }); this.attachListOver = filtered; - let msg: string = ""; + let msg: string = ''; // msg = this.translate.translate("addAttach.errorMsg"); //this.common.showAlert(msg); } @@ -168,7 +168,7 @@ export class AbsenceConfirmComponent implements OnInit { if (this.common.validResponse(result)) { this.isSubmitBtnClicked = true; //if(this.isResubmitAbs==false){ - let msg: string = this.ts.trPK("general", "messageSuccess"); + let msg: string = this.ts.trPK('general', 'messageSuccess'); this.common.presentAlert(msg); // } @@ -180,7 +180,7 @@ export class AbsenceConfirmComponent implements OnInit { getApproversList() { let body: any = { P_TRANSACTION_ID: this.P_TransactionID, - P_AME_TRANSACTION_TYPE: "SSHRMS", + P_AME_TRANSACTION_TYPE: 'SSHRMS', P_PAGE_NUM: 1, P_PAGE_LIMIT: 1000 }; @@ -210,7 +210,7 @@ export class AbsenceConfirmComponent implements OnInit { }); modal.onDidDismiss() .then((data) => { - if (data == "cancel" || data == "undefined") { + if (data == 'cancel' || data == 'undefined') { return; } else { if (!str) { @@ -246,7 +246,7 @@ async openSubmitModal() { .then((data) => { console.log(data.data); - if (data.data == "cancel" || data.data == undefined) { + if (data.data == 'cancel' || data.data == undefined) { return; } else { this.startAbApproval(); @@ -324,7 +324,7 @@ async openSubmitModal() { this.submitConService.updateAttach(req).subscribe((result: any) => { if (this.common.validResponse(result)) { if (result.MessageStatus == 1) { - let msg: string = ""; + let msg: string = ''; // msg = this.translate.translate("addAttach.attachUpdate"); // this.common.showAlert(msg); @@ -351,7 +351,7 @@ async openSubmitModal() { }; this.submitConService.delteAttach(req).subscribe((result: any) => { if (this.common.validResponse(result)) { - if (result.DeleteAttachmentList.P_RETURN_STATUS === "S") { + if (result.DeleteAttachmentList.P_RETURN_STATUS === 'S') { this.getAttachment(this.getPassNotificationDetails.NOTIFICATION_ID); // let msg: string = ""; // msg = this.translate.translate("addAttach.deleteAttach"); @@ -391,8 +391,8 @@ async openSubmitModal() { // this.uploader.onWhenAddingFileFailed = function (item: any, filter: any, options: any){ if (!(this.filterAllowedType.indexOf(input.target.files[0].type) > -1)) { - let msg: string = ""; - msg = this.ts.trPK("general", "notSupport"); + let msg: string = ''; + msg = this.ts.trPK('general', 'notSupport'); this.common.presentAlert(msg); return } // todo: show alert that you tried uploading wrong files @@ -427,7 +427,7 @@ async openSubmitModal() { pushObject(fileData, name, type) { - console.log("before push: "+ this.index); + console.log('before push: '+ this.index); //this.attachListOver.length++; try { let array = name.split('.'); diff --git a/Mohem/src/app/absence/home/home.component.ts b/Mohem/src/app/absence/home/home.component.ts index 1856df8d..0ca580f6 100644 --- a/Mohem/src/app/absence/home/home.component.ts +++ b/Mohem/src/app/absence/home/home.component.ts @@ -186,9 +186,9 @@ getAbsenceTransaction() { } } } -doInfinite() { +doInfinite(event: any) { if (!this.IsReachEnd) { - //this.P_PAGE_NUM++; + // this.P_PAGE_NUM++; const request = { P_SELECTED_EMPLOYEE_NUMBER: this.selEmp, P_MENU_TYPE: this.selMenu.List_Menu.MENU_TYPE, diff --git a/Mohem/src/app/absence/submit-absence-modal/submit-absence-modal.component.ts b/Mohem/src/app/absence/submit-absence-modal/submit-absence-modal.component.ts index 53dc2393..eee3bd58 100644 --- a/Mohem/src/app/absence/submit-absence-modal/submit-absence-modal.component.ts +++ b/Mohem/src/app/absence/submit-absence-modal/submit-absence-modal.component.ts @@ -9,9 +9,9 @@ import { TranslatorService } from 'src/app/hmg-common/services/translator/transl styleUrls: ['./submit-absence-modal.component.scss'], }) export class SubmitAbsenceModalComponent implements OnInit { - submitAbsAttachmentList :any =[]; + submitAbsAttachmentList: any = []; absComments: string; - constructor( private ts: TranslatorService,private modalCtrl: ModalController, private cs: CommonService){ + constructor( public ts: TranslatorService, private modalCtrl: ModalController, private cs: CommonService){ this.submitAbsAttachmentList = this.cs.sharedService.getSharedData('submitAbsAttachmentList', false); this.absComments = this.cs.sharedService.getSharedData('absComments', false); } diff --git a/Mohem/src/app/absence/view-attachments/view-attachments.component.ts b/Mohem/src/app/absence/view-attachments/view-attachments.component.ts index e126968c..dce19a90 100644 --- a/Mohem/src/app/absence/view-attachments/view-attachments.component.ts +++ b/Mohem/src/app/absence/view-attachments/view-attachments.component.ts @@ -1,21 +1,21 @@ -import { Component, OnInit } from "@angular/core"; -import { CommonService } from "src/app/hmg-common/services/common/common.service"; -import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; -import { ModalController } from "@ionic/angular"; -import { WorkListAttachViewComponent } from "src/app/notification/work-list-attach-view/work-list-attach-view.component"; -import { AbsenceAttahcment } from "../models/abs.attach"; -import { AbsenceAttahcmentResponse } from "../models/abs.attach.response"; +import { Component, OnInit } from '@angular/core'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { ModalController } from '@ionic/angular'; +import { WorkListAttachViewComponent } from 'src/app/notification/work-list-attach-view/work-list-attach-view.component'; +import { AbsenceAttahcment } from '../models/abs.attach'; +import { AbsenceAttahcmentResponse } from '../models/abs.attach.response'; @Component({ - selector: "app-view-attachments", - templateUrl: "./view-attachments.component.html", - styleUrls: ["./view-attachments.component.scss"] + selector: 'app-view-attachments', + templateUrl: './view-attachments.component.html', + styleUrls: ['./view-attachments.component.scss'] }) export class ViewAttachmentsComponent implements OnInit { AttachmentList: AbsenceAttahcment[]; constructor( public common: CommonService, public modalCtrl: ModalController, - private ts: TranslatorService + public ts: TranslatorService ) {} ngOnInit() { @@ -26,7 +26,7 @@ export class ViewAttachmentsComponent implements OnInit { async OpenAttachFiles(value, Type) { this.common.sharedService.setSharedData( { displayData: value, TypeData: Type }, - "WorkListAttachViewPage" + 'WorkListAttachViewPage' ); const modal = await this.modalCtrl.create({ component: WorkListAttachViewComponent diff --git a/Mohem/src/app/accrual-balances/home/home.component.ts b/Mohem/src/app/accrual-balances/home/home.component.ts index d26f4574..1171adb0 100644 --- a/Mohem/src/app/accrual-balances/home/home.component.ts +++ b/Mohem/src/app/accrual-balances/home/home.component.ts @@ -33,7 +33,7 @@ export class HomeComponent implements OnInit { } }); } - private getAccrualBalance() { + public getAccrualBalance() { if (this.Sdate) { let today = new Date(this.Sdate); let day = today.getDate(); diff --git a/Mohem/src/app/app.component.html b/Mohem/src/app/app.component.html index a8762509..125c9a87 100644 --- a/Mohem/src/app/app.component.html +++ b/Mohem/src/app/app.component.html @@ -23,7 +23,7 @@
-
+
@@ -150,7 +150,7 @@
-

{{CompanyImageDescription}}

+

{{companyDesc}}

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 189a7245..5de8fd21 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 @@ -53,6 +53,7 @@ export class WorkListMainItgComponent implements OnInit { public actionBTN: { name: string, image: string, isAvailable: boolean }[] = []; index2: number; direction: string; + defaultSegment = ''; constructor( public common: CommonService, public ts: TranslatorService, diff --git a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html index bc353e33..38681196 100644 --- a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html +++ b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html @@ -14,7 +14,7 @@ - diff --git a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts index 17fdaffe..fef9923a 100644 --- a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts +++ b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts @@ -1,17 +1,17 @@ -import { Component, OnInit, ElementRef } from "@angular/core"; -import { CommonService } from "src/app/hmg-common/services/common/common.service"; -import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; -import { WorkListBodyRequest } from "../models/NotificationBodyReq"; -import { EITNotificatonBodyResponse } from "../models/EITNotificationBodyRes"; -import { AbsenceNotificatonBodyResponse } from "../models/AbsenceNotificationBodyRes"; -import { NotificatonButtonResponse } from "../models/NotificationButtonRes"; -import { WorkListActionRequest } from "../models/NotificationActionReq"; -import { WorkListButtonRequest } from "../models/NotificationButtonReq"; +import { Component, OnInit, ElementRef } from '@angular/core'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { WorkListBodyRequest } from '../models/NotificationBodyReq'; +import { EITNotificatonBodyResponse } from '../models/EITNotificationBodyRes'; +import { AbsenceNotificatonBodyResponse } from '../models/AbsenceNotificationBodyRes'; +import { NotificatonButtonResponse } from '../models/NotificationButtonRes'; +import { WorkListActionRequest } from '../models/NotificationActionReq'; +import { WorkListButtonRequest } from '../models/NotificationButtonReq'; // import { isDate } from 'angular6-json-schema-form'; -import { MenuResponse } from "src/app/hmg-common/services/menu/models/menu-response"; -import { LoginRequest } from "src/app/hmg-common/services/authentication/models/login.request"; -import { WorklistMainService } from "../service/work-list.main.service"; -import { HomeComponent } from "src/app/notification/home/home.component"; +import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response'; +import { LoginRequest } from 'src/app/hmg-common/services/authentication/models/login.request'; +import { WorklistMainService } from '../service/work-list.main.service'; +import { HomeComponent } from 'src/app/notification/home/home.component'; import { TextInput } from 'src/app/uI-elements/text.input'; import { TextAreaInput } from 'src/app/uI-elements/text-area.input'; import { MenuService } from 'src/app/hmg-common/services/menu/menuservice.service'; @@ -45,17 +45,17 @@ export class WorklistMainMRComponent implements OnInit { private WorkListActionHistoryObj: WorkListActionHistoryRequest; private WorkListAttachObj: WorkListButtonRequest; private PRList: PRNotificatonBodyList - public static PASS_NOTIFICATION_INFO = "passNotificationInfo"; - public static PASS_ACTION_MODE = "passActionMode"; + public static PASS_NOTIFICATION_INFO = 'passNotificationInfo'; + public static PASS_ACTION_MODE = 'passActionMode'; getPassNotificationDetails: any; - public static PASS_RES_ATTR = "passResAttr"; + public static PASS_RES_ATTR = 'passResAttr'; TransactionID: number = -999; notificationBodyRes: any; actionHistoryRes: any; notificationButtonRes: any; actionMode: any; - pInformation: string = ""; - pQuestion: string = ""; + pInformation: string = ''; + pQuestion: string = ''; RespondAttributesListRes: any; schemaNotific: any; NotRespondAttributeList: any; @@ -66,7 +66,7 @@ export class WorklistMainMRComponent implements OnInit { dataOfAttr: any; P_RESPOND_ATTRIBUTES_TBL: any; selEmployeeID: any; - actionType: string = ""; + actionType: string = ''; notificationArray: any; notificationDynamicAttributeArr: any; private textInput: TextInput; @@ -87,7 +87,7 @@ export class WorklistMainMRComponent implements OnInit { confirmMsg: string; delMsg: string; closeMsg: string; - activeSegment: any = "item-req"; + activeSegment: any = 'item-req'; lines_note_limit: any = 24; orgNote: string; truncating: boolean; @@ -100,7 +100,7 @@ export class WorklistMainMRComponent implements OnInit { rejectDis: boolean = false; requestDis: boolean = false; direction: string; - + defaultSegment = ''; constructor( @@ -133,14 +133,14 @@ export class WorklistMainMRComponent implements OnInit { } public segmentChanged(event: any) { this.activeSegment = event.detail.value; - console.log(" event.detail.value: " + event.detail.value); + console.log(' event.detail.value: ' + event.detail.value); } intializeNotificationDetail() { if (this.messageSuccess) { - document.getElementById("notificationDynamicFields").innerHTML = ""; + document.getElementById('notificationDynamicFields').innerHTML = ''; } - console.log("intializeNotificationDetail"); + console.log('intializeNotificationDetail'); this.getPassNotificationDetails = this.common.sharedService.getSharedData( HomeComponent.NOTIFICATION_DATA, false @@ -163,9 +163,9 @@ export class WorklistMainMRComponent implements OnInit { this.WorkListButtonsObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; this.WorkListActionObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; - this.WorkListActionObj.P_FORWARD_TO_USER_NAME = ""; - this.WorkListActionObj.P_ACTION_MODE = ""; - this.WorkListActionObj.P_COMMENTS = ""; + this.WorkListActionObj.P_FORWARD_TO_USER_NAME = ''; + this.WorkListActionObj.P_ACTION_MODE = ''; + this.WorkListActionObj.P_COMMENTS = ''; this.WorkListActionObj.P_APPROVER_INDEX = null; this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; @@ -178,15 +178,15 @@ export class WorklistMainMRComponent implements OnInit { this.getNotificationResAttr(this.WorkListButtonsObj); this.getActionHistory(this.WorkListActionHistoryObj); this.getAttachmentNotification(this.WorkListAttachObj); - if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") { + if (this.getPassNotificationDetails.REQUEST_TYPE == 'EIT') { this.getEITNotificationDetails(this.WorkListBodyObj); - } else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") { + } else if (this.getPassNotificationDetails.REQUEST_TYPE == 'ABSENCE') { this.getAbsenceNotificationDetails(this.WorkListBodyObj); - } else if (this.getPassNotificationDetails.REQUEST_TYPE == "PO") { + } else if (this.getPassNotificationDetails.REQUEST_TYPE == 'PO') { this.getPONotificationDetails(this.WorkListBodyObj); - } else if (this.getPassNotificationDetails.REQUEST_TYPE == "MO") { + } else if (this.getPassNotificationDetails.REQUEST_TYPE == 'MO') { this.getMONotificationDetails(this.WorkListBodyObj); - } else if (this.getPassNotificationDetails.REQUEST_TYPE == "PR") { + } else if (this.getPassNotificationDetails.REQUEST_TYPE == 'PR') { this.getPRNotificationDetails(this.WorkListBodyObj); } } @@ -195,7 +195,7 @@ export class WorklistMainMRComponent implements OnInit { this.worklistMainService .getPRNotificationBody(notificationBodyObj) .subscribe((result: PRNotificatonBodyResponse) => { - this.handleWorkListBodyResult(result, "PR"); + this.handleWorkListBodyResult(result, 'PR'); }); } @@ -203,7 +203,7 @@ export class WorklistMainMRComponent implements OnInit { this.worklistMainService .getMONotificationBody(notificationBodyObj) .subscribe((result: MONotificatonBodyResponse) => { - this.handleWorkListBodyResult(result, "MO"); + this.handleWorkListBodyResult(result, 'MO'); }); } @@ -212,7 +212,7 @@ export class WorklistMainMRComponent implements OnInit { .getPONotificationBody(notificationBodyObj) .subscribe((result: PONotificatonBodyResponse) => { console.log(result.GetPoNotificationBodyList.POHeader[0].BUYER); - this.handleWorkListBodyResult(result, "PO"); + this.handleWorkListBodyResult(result, 'PO'); }); } @@ -220,7 +220,7 @@ export class WorklistMainMRComponent implements OnInit { this.worklistMainService .getEITNotificationBody(notificationBodyObj) .subscribe((result: EITNotificatonBodyResponse) => { - this.handleWorkListBodyResult(result, "EIT"); + this.handleWorkListBodyResult(result, 'EIT'); }); } @@ -228,7 +228,7 @@ export class WorklistMainMRComponent implements OnInit { this.worklistMainService .getAbsencesNotificationBody(notificationBodyObj) .subscribe((result: AbsenceNotificatonBodyResponse) => { - this.handleWorkListBodyResult(result, "ABSENCE"); + this.handleWorkListBodyResult(result, 'ABSENCE'); }); } @@ -237,7 +237,7 @@ export class WorklistMainMRComponent implements OnInit { if (this.common.validResponse(result)) { this.pInformation = result.P_INFORMATION; this.pQuestion = result.P_QUESTION; - if (Type == "MO") { + if (Type == 'MO') { if (result.GetMoNotificationBodyList) { this.notificationBodyRes = result.GetMoNotificationBodyList; @@ -262,16 +262,16 @@ export class WorklistMainMRComponent implements OnInit { // this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA); if (result.GetNotificationButtonsList != null) { this.notificationButtonRes = result.GetNotificationButtonsList; - this.common.sharedService.setSharedData(this.notificationButtonRes, "passActionMore"); - console.log("test" + this.notificationButtonRes.length); + this.common.sharedService.setSharedData(this.notificationButtonRes, 'passActionMore'); + console.log('test' + this.notificationButtonRes.length); for (let i = 0; i < this.notificationButtonRes.length; i++) { - if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVE") { + if (this.notificationButtonRes[i].BUTTON_ACTION == 'APPROVE') { this.approveDis = true; } else - if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECT") { + if (this.notificationButtonRes[i].BUTTON_ACTION == 'REJECT') { this.rejectDis = true; } else - if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") { + if (this.notificationButtonRes[i].BUTTON_ACTION == 'REQUEST_INFO') { this.requestDis = true; } // if result == null } // valid it @@ -328,7 +328,7 @@ export class WorklistMainMRComponent implements OnInit { } actionButton(action) { - console.log("actionButton" + action); + console.log('actionButton' + action); // alert("don't forget"); //let ButtonAction: string = this.actionType; let ButtonAction: string = action; @@ -337,13 +337,13 @@ export class WorklistMainMRComponent implements OnInit { for (let i = 0; i < this.notificationDynamicAttributeArr.length; i++) { let obj: any = {}; obj.ATTRIBUTE_NAME = this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME; - if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE === "number") { + if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE === 'number') { obj.ATTRIBUTE_NUMBER_VALUE = (document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value; } // else if (isDate(responseAttrDic[key])) { // obj.ATTRIBUTE_DATE_VALUE = responseAttrDic[key]; // } - else if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE == "VARCHAR2") { + else if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE == 'VARCHAR2') { obj.ATTRIBUTE_TEXT_VALUE = (document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value; } this.P_RESPOND_ATTRIBUTES_TBL.push(obj); @@ -351,20 +351,20 @@ export class WorklistMainMRComponent implements OnInit { let repUserName = this.selEmployeeID; if (this.hideForwordEmployee && this.hideForwordEmployee.ATTRIBUTE_NAME) { let obj: any = {}; - repUserName = ""; + repUserName = ''; obj.ATTRIBUTE_NAME = this.hideForwordEmployee.ATTRIBUTE_NAME; obj.ATTRIBUTE_TEXT_VALUE = this.selEmployeeID; this.P_RESPOND_ATTRIBUTES_TBL.push(obj); } if ( - ButtonAction == "APPROVE" || - ButtonAction == "REJECT" || - ButtonAction == "DEL" || - ButtonAction == "CLOSE" + ButtonAction == 'APPROVE' || + ButtonAction == 'REJECT' || + ButtonAction == 'DEL' || + ButtonAction == 'CLOSE' ) { - this.WorkListActionObj.P_FORWARD_TO_USER_NAME = ""; + this.WorkListActionObj.P_FORWARD_TO_USER_NAME = ''; this.WorkListActionObj.P_ACTION_MODE = ButtonAction; - this.WorkListActionObj.P_COMMENTS = ""; + this.WorkListActionObj.P_COMMENTS = ''; this.WorkListActionObj.RespondAttributeList = this.P_RESPOND_ATTRIBUTES_TBL; //sheardData @@ -374,18 +374,18 @@ export class WorklistMainMRComponent implements OnInit { ); ///////////////////////////////////////////// - if (ButtonAction == "APPROVE") { + if (ButtonAction == 'APPROVE') { this.confirmMsg = this.ts.trPK('worklistMain', 'approveMsg') } - else if (ButtonAction == "REJECT") { + else if (ButtonAction == 'REJECT') { this.confirmMsg = this.ts.trPK('worklistMain', 'rejectMsg') } - else if (ButtonAction == "DEL") { + else if (ButtonAction == 'DEL') { this.confirmMsg = this.ts.trPK('worklistMain', 'delMsg') } - else if (ButtonAction == "CLOSE") { + else if (ButtonAction == 'CLOSE') { this.confirmMsg = this.ts.trPK('worklistMain', 'closeMsg') } @@ -416,7 +416,7 @@ export class WorklistMainMRComponent implements OnInit { ////////////this.applyAction(this.WorkListActionObj); } - if (ButtonAction == "RFC") { + if (ButtonAction == 'RFC') { // alert("Return For Correction"); this.WorkListActionObj.P_ACTION_MODE = ButtonAction; // this.navCtrl.push("WorkListRfcPage", { @@ -438,9 +438,9 @@ export class WorklistMainMRComponent implements OnInit { ); // this.common.openWorklistRFCPage(); this.openRFCModal(); - } else if (ButtonAction == "ANSWER_INFO") { + } else if (ButtonAction == 'ANSWER_INFO') { - this.common.sharedService.setSharedData(this.pQuestion, "pQuestion"); + this.common.sharedService.setSharedData(this.pQuestion, 'pQuestion'); this.common.sharedService.setSharedData( this.getPassNotificationDetails, WorklistMainMRComponent.PASS_NOTIFICATION_INFO @@ -456,12 +456,12 @@ export class WorklistMainMRComponent implements OnInit { //this.common.openWorklistRollReplacement(); this.openReplacementRoll(); } else if ( - ButtonAction == "DELEGATE" || - ButtonAction == "REQUEST_INFO" || - ButtonAction == "TRANSFER" || - ButtonAction == "TRANSFER_INFO" || - ButtonAction == "APPROVE_AND_FORWARD" || - ButtonAction == "FORWARD" + ButtonAction == 'DELEGATE' || + ButtonAction == 'REQUEST_INFO' || + ButtonAction == 'TRANSFER' || + ButtonAction == 'TRANSFER_INFO' || + ButtonAction == 'APPROVE_AND_FORWARD' || + ButtonAction == 'FORWARD' ) { @@ -487,10 +487,10 @@ export class WorklistMainMRComponent implements OnInit { // this.common.openWorklistRollReplacement(); this.openReplacementRoll(); } else if ( - ButtonAction == "UPDATE_ACTION" || - ButtonAction == "CONTINUE_ACTION" + ButtonAction == 'UPDATE_ACTION' || + ButtonAction == 'CONTINUE_ACTION' ) { - if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") { + if (this.getPassNotificationDetails.REQUEST_TYPE == 'EIT') { this.common.sharedService.setSharedData( this.notificationBodyRes, EITNotificatonBodyResponse.SHARED_DATA @@ -500,7 +500,7 @@ export class WorklistMainMRComponent implements OnInit { EITNotificatonBodyResponse.NOT_WORKLIST ); // this.navCtrl.push("EitUpdateListPage"); - } else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") { + } else if (this.getPassNotificationDetails.REQUEST_TYPE == 'ABSENCE') { this.common.sharedService.setSharedData( this.notificationBodyRes, AbsenceNotificatonBodyResponse.SHARED_DATA @@ -518,15 +518,15 @@ export class WorklistMainMRComponent implements OnInit { } else if (this.notificationButtonRes.length > 0 && !ButtonAction) { (this.elementRef.nativeElement.querySelectorAll( - "ion-item" + 'ion-item' ) as HTMLElement[]).forEach(x => { - if (x.classList.contains("requiredItem")) { - x.classList.add("ng-touched"); - x.classList.remove("ng-untouched"); + if (x.classList.contains('requiredItem')) { + x.classList.add('ng-touched'); + x.classList.remove('ng-untouched'); } }); this.common.presentAlert( - this.ts.trPK("worklistMain", "actionRequird") + this.ts.trPK('worklistMain', 'actionRequird') ); } } @@ -569,7 +569,7 @@ export class WorklistMainMRComponent implements OnInit { this.NotRespondAttributeList = result.NotificationGetRespondAttributesList; if ( - result.NotificationRespondRolesList != "" && + result.NotificationRespondRolesList != '' && result.NotificationRespondRolesList[0].ATTRIBUTE_NAME != null && result.NotificationRespondRolesList[0].ATTRIBUTE_NAME != undefined ) { @@ -592,20 +592,20 @@ export class WorklistMainMRComponent implements OnInit { notificationDynamicFields(notificationAttr) { const containerId = 'notificationDynamicFields'; for (let i = 0; i < notificationAttr.length; i++) { - if (notificationAttr[i].ATTRIBUTE_TYPE == "VARCHAR2") { - this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, "", containerId, "", "", ""); - } else if (notificationAttr[i].ATTRIBUTE_TYPE == "ROLE") { + if (notificationAttr[i].ATTRIBUTE_TYPE == 'VARCHAR2') { + this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, '', containerId, '', '', ''); + } else if (notificationAttr[i].ATTRIBUTE_TYPE == 'ROLE') { - } else if (notificationAttr[i].ATTRIBUTE_TYPE == "DATE") { + } else if (notificationAttr[i].ATTRIBUTE_TYPE == 'DATE') { - } else if (notificationAttr[i].ATTRIBUTE_TYPE == "NUMBER") { + } else if (notificationAttr[i].ATTRIBUTE_TYPE == 'NUMBER') { } } } openNotificationBody() { - if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") { + if (this.getPassNotificationDetails.REQUEST_TYPE == 'EIT') { this.common.sharedService.setSharedData( this.notificationBodyRes, EITNotificatonBodyResponse.SHARED_DATA @@ -615,9 +615,9 @@ export class WorklistMainMRComponent implements OnInit { EITNotificatonBodyResponse.NOT_WORKLIST ); // this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "EIT" }); - this.common.sharedService.setSharedData("EIT", "NotBodyType"); + this.common.sharedService.setSharedData('EIT', 'NotBodyType'); this.common.openNotificationDetailsPage(); - } else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") { + } else if (this.getPassNotificationDetails.REQUEST_TYPE == 'ABSENCE') { this.common.sharedService.setSharedData( this.notificationBodyRes, AbsenceNotificatonBodyResponse.SHARED_DATA @@ -626,7 +626,7 @@ export class WorklistMainMRComponent implements OnInit { this.getPassNotificationDetails, AbsenceNotificatonBodyResponse.NOT_WORKLIST ); - this.common.sharedService.setSharedData("ABSENCE", "NotBodyType"); + this.common.sharedService.setSharedData('ABSENCE', 'NotBodyType'); //this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "ABSENCE" }); this.common.openNotificationDetailsPage(); } @@ -641,7 +641,7 @@ export class WorklistMainMRComponent implements OnInit { if (this.notificationCount <= 0) { this.notificationCount = null; } - this.events.publish("getNotCount", this.notificationCount); + this.events.publish('getNotCount', this.notificationCount); } }); } @@ -699,7 +699,7 @@ export class WorklistMainMRComponent implements OnInit { async openNoteDetail(note, sender) { // let modalPage = this.modalCtrl.create('ViewNoteModalPage', { textNote: note }); // modalPage.present(); - console.log("note" + note); + console.log('note' + note); this.common.sharedService.setSharedData(note, 'ViewNoteModalPage') this.common.sharedService.setSharedData(sender, 'ViewNoteModalPageSender') @@ -715,7 +715,7 @@ export class WorklistMainMRComponent implements OnInit { } doInfinite(infiniteScroll) { - console.log("doInfinite action history MR"); + console.log('doInfinite action history MR'); if (!this.IsReachEnd) { this.worklistService.getActionHistory(this.WorkListActionHistoryObj). @@ -800,7 +800,7 @@ export class WorklistMainMRComponent implements OnInit { doInfiniteNotificationBody(infiniteScroll) { - console.log("doInfiniteNotificationBody MR"); + console.log('doInfiniteNotificationBody MR'); if (!this.IsReachEnd) { this.worklistMainService.getMONotificationBody(this.WorkListActionHistoryObj). subscribe((result: any) => { @@ -835,9 +835,9 @@ export class WorklistMainMRComponent implements OnInit { loadMoreNotificationBody() { - console.log("loadMoreNotificationBody MR"); + console.log('loadMoreNotificationBody MR'); if (!this.IsReachEnd) { - console.log("this.IsReachEnd" + this.IsReachEnd); + console.log('this.IsReachEnd' + this.IsReachEnd); this.worklistMainService.getMONotificationBody(this.WorkListBodyObj). subscribe((result: any) => { @@ -855,7 +855,7 @@ export class WorklistMainMRComponent implements OnInit { this.notificationBodyRes.push(element); }, (Error) => console.log(Error), () => //infiniteScroll.target.complete() - console.log("test") + console.log('test') ); }// if list length >0 else { @@ -872,7 +872,7 @@ export class WorklistMainMRComponent implements OnInit { } }//end infiniteScroll loadMoreActionHistory() { - console.log("doInfinite action history MR"); + console.log('doInfinite action history MR'); if (!this.IsReachEnd) { this.worklistService.getActionHistory(this.WorkListActionHistoryObj). @@ -891,7 +891,7 @@ export class WorklistMainMRComponent implements OnInit { this.actionHistoryRes.push(element); }, (Error) => console.log(Error), () => //infiniteScroll.target.complete() - console.log("TEST")); + console.log('TEST')); }// if list length >0 else { this.IsReachEnd = true; @@ -922,7 +922,7 @@ export class WorklistMainMRComponent implements OnInit { .then((data) => { console.log(data.data); - if (data.data == "cancel" || data.data == undefined) { + if (data.data == 'cancel' || data.data == undefined) { return; } else { @@ -945,7 +945,7 @@ export class WorklistMainMRComponent implements OnInit { /////////////////////////////////////////// public checkLines(note) { - console.log(note.split("\n").length); + console.log(note.split('\n').length); console.log(note.length); if (note && note != null) { @@ -970,7 +970,7 @@ export class WorklistMainMRComponent implements OnInit { } this.actionHistoryRes = actionHis; - console.log("test"); + console.log('test'); } @@ -986,9 +986,9 @@ export class WorklistMainMRComponent implements OnInit { modal.onDidDismiss().then((data) => { console.log(data.data); - if (data.data == "cancel" || data.data == undefined) { + if (data.data == 'cancel' || data.data == undefined) { return; - } else if (data.data == "Success") { + } else if (data.data == 'Success') { this.getNotificationCountAfterSubmit(); this.nextNotfification(); @@ -1018,9 +1018,9 @@ export class WorklistMainMRComponent implements OnInit { .then((data) => { console.log(data.data); - if (data.data == "cancel" || data.data == undefined) { + if (data.data == 'cancel' || data.data == undefined) { return; - } else if (data.data == "Success") { + } else if (data.data == 'Success') { this.getNotificationCountAfterSubmit(); this.nextNotfification(); diff --git a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html index 0daad28e..139089b4 100644 --- a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html +++ b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html @@ -15,7 +15,7 @@
{{getPassNotificationDetails.SUBJECT}}
- {{getPassNotificationDetails.SUBJECT}}
- { - this.handleWorkListBodyResult(result, "PR"); + this.handleWorkListBodyResult(result, 'PR'); }); } @@ -217,7 +218,7 @@ export class WorklistMainPRComponent implements OnInit { .getPONotificationBody(notificationBodyObj) .subscribe((result: PONotificatonBodyResponse) => { console.log(result.GetPoNotificationBodyList.POHeader[0].BUYER); - this.handleWorkListBodyResult(result, "PO"); + this.handleWorkListBodyResult(result, 'PO'); }); } @@ -225,7 +226,7 @@ export class WorklistMainPRComponent implements OnInit { this.worklistMainService .getEITNotificationBody(notificationBodyObj) .subscribe((result: EITNotificatonBodyResponse) => { - this.handleWorkListBodyResult(result, "EIT"); + this.handleWorkListBodyResult(result, 'EIT'); }); } @@ -233,7 +234,7 @@ export class WorklistMainPRComponent implements OnInit { this.worklistMainService .getAbsencesNotificationBody(notificationBodyObj) .subscribe((result: AbsenceNotificatonBodyResponse) => { - this.handleWorkListBodyResult(result, "ABSENCE"); + this.handleWorkListBodyResult(result, 'ABSENCE'); }); } @@ -242,20 +243,20 @@ export class WorklistMainPRComponent implements OnInit { if (this.common.validResponse(result)) { this.pInformation = result.P_INFORMATION; this.pQuestion = result.P_QUESTION; - if (Type == "EIT") { + if (Type == 'EIT') { if (result.GetEITCollectionNotificationBodyList) { this.notificationBodyRes = result.GetEITCollectionNotificationBodyList; } - } else if (Type == "ABSENCE") { - console.log("ABSENCE"); + } else if (Type == 'ABSENCE') { + console.log('ABSENCE'); if (result.GetAbsenceCollectionNotificationBodyList) { this.notificationBodyRes = result.GetAbsenceCollectionNotificationBodyList; } - } else if (Type == "PR") { + } else if (Type == 'PR') { if (result.GetPrNotificationBodyList) { - console.log("PR"); + console.log('PR'); this.PRHeader = result.GetPrNotificationBodyList.PRHeader; this.PRLines = result.GetPrNotificationBodyList.PRLines; @@ -296,16 +297,16 @@ export class WorklistMainPRComponent implements OnInit { // this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA); if (result.GetNotificationButtonsList != null) { this.notificationButtonRes = result.GetNotificationButtonsList; - this.common.sharedService.setSharedData(this.notificationButtonRes, "passActionMore"); - console.log("test" + this.notificationButtonRes.length); + this.common.sharedService.setSharedData(this.notificationButtonRes, 'passActionMore'); + console.log('test' + this.notificationButtonRes.length); for (let i = 0; i < this.notificationButtonRes.length; i++) { - if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVE") { + if (this.notificationButtonRes[i].BUTTON_ACTION == 'APPROVE') { this.approveDis = true; } else - if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECT") { + if (this.notificationButtonRes[i].BUTTON_ACTION == 'REJECT') { this.rejectDis = true; } else - if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") { + if (this.notificationButtonRes[i].BUTTON_ACTION == 'REQUEST_INFO') { this.requestDis = true; } // if result == null } // valid it @@ -361,7 +362,7 @@ export class WorklistMainPRComponent implements OnInit { actionButton(action) { - console.log("actionButton" + action); + console.log('actionButton' + action); //alert("don't forget"); //let ButtonAction: string = this.actionType; let ButtonAction: string = action; @@ -372,13 +373,13 @@ export class WorklistMainPRComponent implements OnInit { for (let i = 0; i < this.notificationDynamicAttributeArr.length; i++) { let obj: any = {}; obj.ATTRIBUTE_NAME = this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME; - if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE === "number") { + if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE === 'number') { obj.ATTRIBUTE_NUMBER_VALUE = (document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value; } // else if (isDate(responseAttrDic[key])) { // obj.ATTRIBUTE_DATE_VALUE = responseAttrDic[key]; // } - else if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE == "VARCHAR2") { + else if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE == 'VARCHAR2') { obj.ATTRIBUTE_TEXT_VALUE = (document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value; } this.P_RESPOND_ATTRIBUTES_TBL.push(obj); @@ -386,20 +387,20 @@ export class WorklistMainPRComponent implements OnInit { let repUserName = this.selEmployeeID; if (this.hideForwordEmployee && this.hideForwordEmployee.ATTRIBUTE_NAME) { let obj: any = {}; - repUserName = ""; + repUserName = ''; obj.ATTRIBUTE_NAME = this.hideForwordEmployee.ATTRIBUTE_NAME; obj.ATTRIBUTE_TEXT_VALUE = this.selEmployeeID; this.P_RESPOND_ATTRIBUTES_TBL.push(obj); } if ( - ButtonAction == "APPROVE" || - ButtonAction == "REJECT" || - ButtonAction == "DEL" || - ButtonAction == "CLOSE" + ButtonAction == 'APPROVE' || + ButtonAction == 'REJECT' || + ButtonAction == 'DEL' || + ButtonAction == 'CLOSE' ) { - this.WorkListActionObj.P_FORWARD_TO_USER_NAME = ""; + this.WorkListActionObj.P_FORWARD_TO_USER_NAME = ''; this.WorkListActionObj.P_ACTION_MODE = ButtonAction; - this.WorkListActionObj.P_COMMENTS = ""; + this.WorkListActionObj.P_COMMENTS = ''; this.WorkListActionObj.RespondAttributeList = this.P_RESPOND_ATTRIBUTES_TBL; //sheardData @@ -407,18 +408,18 @@ export class WorklistMainPRComponent implements OnInit { // this.WorkListActionObj, // WorklistMainPRComponent.PASS_NOTIFICATION_INFO // ); - if (ButtonAction == "APPROVE") { + if (ButtonAction == 'APPROVE') { this.confirmMsg = this.ts.trPK('worklistMain', 'approveMsg') } - else if (ButtonAction == "REJECT") { + else if (ButtonAction == 'REJECT') { this.confirmMsg = this.ts.trPK('worklistMain', 'rejectMsg') } - else if (ButtonAction == "DEL") { + else if (ButtonAction == 'DEL') { this.confirmMsg = this.ts.trPK('worklistMain', 'delMsg') } - else if (ButtonAction == "CLOSE") { + else if (ButtonAction == 'CLOSE') { this.confirmMsg = this.ts.trPK('worklistMain', 'closeMsg') } @@ -448,7 +449,7 @@ export class WorklistMainPRComponent implements OnInit { ////////////this.applyAction(this.WorkListActionObj); } - if (ButtonAction == "RFC") { + if (ButtonAction == 'RFC') { // alert("Return For Correction"); this.WorkListActionObj.P_ACTION_MODE = ButtonAction; // this.navCtrl.push("WorkListRfcPage", { @@ -470,14 +471,14 @@ export class WorklistMainPRComponent implements OnInit { ); // this.common.openWorklistRFCPage(); this.openRFCModal(); - } else if (ButtonAction == "ANSWER_INFO") { + } else if (ButtonAction == 'ANSWER_INFO') { // this.navCtrl.push("WorkListReplacmentRollPage", { // pQuestion: this.pQuestion, // passNotificationInfo: this.getPassNotificationDetails, // passActionMode: ButtonAction, // passResAttr: this.P_RESPOND_ATTRIBUTES_TBL // }); - this.common.sharedService.setSharedData(this.pQuestion, "pQuestion"); + this.common.sharedService.setSharedData(this.pQuestion, 'pQuestion'); this.common.sharedService.setSharedData( this.getPassNotificationDetails, WorklistMainPRComponent.PASS_NOTIFICATION_INFO @@ -493,12 +494,12 @@ export class WorklistMainPRComponent implements OnInit { // this.common.openWorklistRollReplacement(); this.openRepRolModal(); } else if ( - ButtonAction == "DELEGATE" || - ButtonAction == "REQUEST_INFO" || - ButtonAction == "TRANSFER" || - ButtonAction == "TRANSFER_INFO" || - ButtonAction == "APPROVE_AND_FORWARD" || - ButtonAction == "FORWARD" + ButtonAction == 'DELEGATE' || + ButtonAction == 'REQUEST_INFO' || + ButtonAction == 'TRANSFER' || + ButtonAction == 'TRANSFER_INFO' || + ButtonAction == 'APPROVE_AND_FORWARD' || + ButtonAction == 'FORWARD' ) { @@ -524,10 +525,10 @@ export class WorklistMainPRComponent implements OnInit { // this.common.openWorklistRollReplacement(); this.openRepRolModal(); } else if ( - ButtonAction == "UPDATE_ACTION" || - ButtonAction == "CONTINUE_ACTION" + ButtonAction == 'UPDATE_ACTION' || + ButtonAction == 'CONTINUE_ACTION' ) { - if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") { + if (this.getPassNotificationDetails.REQUEST_TYPE == 'EIT') { this.common.sharedService.setSharedData( this.notificationBodyRes, EITNotificatonBodyResponse.SHARED_DATA @@ -537,7 +538,7 @@ export class WorklistMainPRComponent implements OnInit { EITNotificatonBodyResponse.NOT_WORKLIST ); // this.navCtrl.push("EitUpdateListPage"); - } else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") { + } else if (this.getPassNotificationDetails.REQUEST_TYPE == 'ABSENCE') { this.common.sharedService.setSharedData( this.notificationBodyRes, AbsenceNotificatonBodyResponse.SHARED_DATA @@ -555,15 +556,15 @@ export class WorklistMainPRComponent implements OnInit { } else if (this.notificationButtonRes.length > 0 && !ButtonAction) { (this.elementRef.nativeElement.querySelectorAll( - "ion-item" + 'ion-item' ) as HTMLElement[]).forEach(x => { - if (x.classList.contains("requiredItem")) { - x.classList.add("ng-touched"); - x.classList.remove("ng-untouched"); + if (x.classList.contains('requiredItem')) { + x.classList.add('ng-touched'); + x.classList.remove('ng-untouched'); } }); this.common.presentAlert( - this.ts.trPK("worklistMain", "actionRequird") + this.ts.trPK('worklistMain', 'actionRequird') ); } } @@ -606,7 +607,7 @@ export class WorklistMainPRComponent implements OnInit { this.NotRespondAttributeList = result.NotificationGetRespondAttributesList; if ( - result.NotificationRespondRolesList != "" && + result.NotificationRespondRolesList != '' && result.NotificationRespondRolesList[0].ATTRIBUTE_NAME != null && result.NotificationRespondRolesList[0].ATTRIBUTE_NAME != undefined ) { @@ -629,20 +630,20 @@ export class WorklistMainPRComponent implements OnInit { notificationDynamicFields(notificationAttr) { const containerId = 'notificationDynamicFields'; for (let i = 0; i < notificationAttr.length; i++) { - if (notificationAttr[i].ATTRIBUTE_TYPE == "VARCHAR2") { - this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, "", containerId, "", "", ""); - } else if (notificationAttr[i].ATTRIBUTE_TYPE == "ROLE") { + if (notificationAttr[i].ATTRIBUTE_TYPE == 'VARCHAR2') { + this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, '', containerId, '', '', ''); + } else if (notificationAttr[i].ATTRIBUTE_TYPE == 'ROLE') { - } else if (notificationAttr[i].ATTRIBUTE_TYPE == "DATE") { + } else if (notificationAttr[i].ATTRIBUTE_TYPE == 'DATE') { - } else if (notificationAttr[i].ATTRIBUTE_TYPE == "NUMBER") { + } else if (notificationAttr[i].ATTRIBUTE_TYPE == 'NUMBER') { } } } openNotificationBody() { - if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") { + if (this.getPassNotificationDetails.REQUEST_TYPE == 'EIT') { this.common.sharedService.setSharedData( this.notificationBodyRes, EITNotificatonBodyResponse.SHARED_DATA @@ -652,9 +653,9 @@ export class WorklistMainPRComponent implements OnInit { EITNotificatonBodyResponse.NOT_WORKLIST ); // this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "EIT" }); - this.common.sharedService.setSharedData("EIT", "NotBodyType"); + this.common.sharedService.setSharedData('EIT', 'NotBodyType'); this.common.openNotificationDetailsPage(); - } else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") { + } else if (this.getPassNotificationDetails.REQUEST_TYPE == 'ABSENCE') { this.common.sharedService.setSharedData( this.notificationBodyRes, AbsenceNotificatonBodyResponse.SHARED_DATA @@ -663,7 +664,7 @@ export class WorklistMainPRComponent implements OnInit { this.getPassNotificationDetails, AbsenceNotificatonBodyResponse.NOT_WORKLIST ); - this.common.sharedService.setSharedData("ABSENCE", "NotBodyType"); + this.common.sharedService.setSharedData('ABSENCE', 'NotBodyType'); //this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "ABSENCE" }); this.common.openNotificationDetailsPage(); } @@ -678,7 +679,7 @@ export class WorklistMainPRComponent implements OnInit { if (this.notificationCount <= 0) { this.notificationCount = null; } - this.events.publish("getNotCount", this.notificationCount); + this.events.publish('getNotCount', this.notificationCount); } }); } @@ -735,7 +736,7 @@ export class WorklistMainPRComponent implements OnInit { async openNoteDetail(note, sender) { // let modalPage = this.modalCtrl.create('ViewNoteModalPage', { textNote: note }); // modalPage.present(); - console.log("note" + note); + console.log('note' + note); this.common.sharedService.setSharedData(note, 'ViewNoteModalPage') this.common.sharedService.setSharedData(sender, 'ViewNoteModalPageSender') @@ -832,9 +833,9 @@ export class WorklistMainPRComponent implements OnInit { loadMoreNotificationBody() { - console.log("loadMoreNotificationBody PR"); + console.log('loadMoreNotificationBody PR'); if (!this.IsReachEnd) { - console.log("this.IsReachEnd" + this.IsReachEnd); + console.log('this.IsReachEnd' + this.IsReachEnd); this.worklistMainService.getPRNotificationBody(this.WorkListBodyObj). subscribe((result: any) => { @@ -852,7 +853,7 @@ export class WorklistMainPRComponent implements OnInit { this.notificationBodyRes.push(element); }, (Error) => console.log(Error), () => //infiniteScroll.target.complete() - console.log("test") + console.log('test') ); }// if list length >0 else { @@ -869,7 +870,7 @@ export class WorklistMainPRComponent implements OnInit { } }//end infiniteScroll loadMoreActionHistory() { - console.log("doInfinite action history MR"); + console.log('doInfinite action history MR'); if (!this.IsReachEnd) { this.worklistService.getActionHistory(this.WorkListActionHistoryObj). @@ -887,7 +888,7 @@ export class WorklistMainPRComponent implements OnInit { this.actionHistoryRes.push(element); }, (Error) => console.log(Error), () => //infiniteScroll.target.complete() - console.log("TEST")); + console.log('TEST')); }// if list length >0 else { this.IsReachEnd = true; @@ -905,7 +906,7 @@ export class WorklistMainPRComponent implements OnInit { //////////////////////////////////////////////////////// public checkLines(note) { - console.log(note.split("\n").length); + console.log(note.split('\n').length); console.log(note.length); if (note && note != null) { @@ -935,7 +936,7 @@ export class WorklistMainPRComponent implements OnInit { // return obj; // }) this.actionHistoryRes = actionHis; - console.log("test"); + console.log('test'); } @@ -955,7 +956,7 @@ export class WorklistMainPRComponent implements OnInit { .then((data) => { console.log(data.data); - if (data.data == "cancel" || data.data == undefined) { + if (data.data == 'cancel' || data.data == undefined) { return; } else { @@ -989,9 +990,9 @@ export class WorklistMainPRComponent implements OnInit { .then((data) => { console.log(data.data); - if (data.data == "cancel" || data.data == undefined) { + if (data.data == 'cancel' || data.data == undefined) { return; - } else if (data.data == "Success") { + } else if (data.data == 'Success') { this.getNotificationCountAfterSubmit(); this.nextNotfification(); @@ -1020,7 +1021,7 @@ export class WorklistMainPRComponent implements OnInit { .then((data) => { console.log(data.data); - if (data.data == "cancel" || data.data == undefined) { + if (data.data == 'cancel' || data.data == undefined) { return; } else { 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 ae5fe709..7d17155d 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.html +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.html @@ -10,7 +10,7 @@
{{getPassNotificationDetails.SUBJECT}}
- diff --git a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts index 038bbe41..91372e1d 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts @@ -95,6 +95,7 @@ export class WorklistMainComponent implements OnInit { requestDis: boolean = false; moreDisabled: boolean = true; direction: string; + defaultSegment = ''; constructor( public worklistService: WorklistService, diff --git a/Mohem/src/app/payslip/home/home.component.html b/Mohem/src/app/payslip/home/home.component.html index 82bd19e4..da4642cd 100644 --- a/Mohem/src/app/payslip/home/home.component.html +++ b/Mohem/src/app/payslip/home/home.component.html @@ -76,7 +76,7 @@
- + diff --git a/Mohem/src/app/profile/edit-profile/edit-profile.component.html b/Mohem/src/app/profile/edit-profile/edit-profile.component.html index 47abf5dd..df97d9e0 100644 --- a/Mohem/src/app/profile/edit-profile/edit-profile.component.html +++ b/Mohem/src/app/profile/edit-profile/edit-profile.component.html @@ -8,7 +8,7 @@
-
+
diff --git a/Mohem/src/app/profile/edit-profile/edit-profile.component.ts b/Mohem/src/app/profile/edit-profile/edit-profile.component.ts index e57431f8..2e2a11aa 100644 --- a/Mohem/src/app/profile/edit-profile/edit-profile.component.ts +++ b/Mohem/src/app/profile/edit-profile/edit-profile.component.ts @@ -1,9 +1,9 @@ import { Component, OnInit } from '@angular/core'; -import { Platform, Events, MenuController } from "@ionic/angular"; -import { CommonService } from "src/app/hmg-common/services/common/common.service"; -import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; -import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service"; -import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user"; +import { Platform, Events, MenuController } from '@ionic/angular'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; +import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user'; import { PerformanceAppraisalResponse } from 'src/app/hmg-common/services/dashbored/performance-appraisal.response'; import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service'; import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service'; @@ -19,13 +19,13 @@ import { DomSanitizer } from '@angular/platform-browser'; export class EditProfileComponent implements OnInit { - User_name_Emp: string = ""; + User_name_Emp: string = ''; User_Job_name: string; public direction: string; private menu: MenuController; setImage:any; // imageSrc: any = "../assets/imgs/profile.png"; - user_image: any = "../assets/imgs/profile.png"; + user_image: any = '../assets/imgs/profile.png'; personalInfo: any; appraisalArr :any =[]; public performanceData: any=[]; @@ -45,9 +45,9 @@ export class EditProfileComponent implements OnInit { ) { this.direction = TranslatorService.getCurrentDirection(); - this.events.subscribe("img-change", displayImg => { - console.log("app compont: "+displayImg); - this.user_image = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+displayImg); + this.events.subscribe('img-change', displayImg => { + console.log('app compont: '+displayImg); + this.user_image = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,'+displayImg); }); @@ -59,7 +59,7 @@ export class EditProfileComponent implements OnInit { } getProfile() { - console.log("getProfile"); + console.log('getProfile'); this.authService .loadAuthenticatedUser() .subscribe((user: AuthenticatedUser) => { @@ -68,16 +68,16 @@ export class EditProfileComponent implements OnInit { this.User_name_Emp=this.personalInfo.EMPLOYEE_NAME; this.User_Job_name=this.personalInfo.JOB_NAME; if(this.cs.getUpdateImage().status){ - this.user_image =this.sanitizer.bypassSecurityTrustUrl("data:image/png;base64,"+this.cs.getUpdateImage().img); + this.user_image =this.sanitizer.bypassSecurityTrustUrl('data:image/png;base64,'+this.cs.getUpdateImage().img); }else{ this.user_image = user.EMPLOYEE_IMAGE - ? "data:image/png;base64," + user.EMPLOYEE_IMAGE - : "../assets/imgs/profile.png"; + ? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE + : '../assets/imgs/profile.png'; } - console.log("name: "+ this.personalInfo.EMPLOYEE_NAME); - console.log("user name: "+ user.EMPLOYEE_NAME); - console.log("name: "+ this.personalInfo.JOB_NAME); - console.log("job name: "+ user.JOB_NAME); + console.log('name: '+ this.personalInfo.EMPLOYEE_NAME); + console.log('user name: '+ user.EMPLOYEE_NAME); + console.log('name: '+ this.personalInfo.JOB_NAME); + console.log('job name: '+ user.JOB_NAME); }}); @@ -110,7 +110,7 @@ private handlePerformanceAppraisalResult(result){ for(let i=0;i -->
-
+
diff --git a/Mohem/src/app/profile/home/home.component.ts b/Mohem/src/app/profile/home/home.component.ts index 6b1903bb..befdf290 100644 --- a/Mohem/src/app/profile/home/home.component.ts +++ b/Mohem/src/app/profile/home/home.component.ts @@ -1,19 +1,19 @@ -import { Component, OnInit } from "@angular/core"; -import { CommonService } from "src/app/hmg-common/services/common/common.service"; -import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; -import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service"; -import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user"; -import { Events } from "@ionic/angular"; +import { Component, OnInit } from '@angular/core'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; +import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user'; +import { Events } from '@ionic/angular'; import { DomSanitizer } from '@angular/platform-browser'; @Component({ - selector: "app-home", - templateUrl: "./home.component.html", - styleUrls: ["./home.component.scss"] + selector: 'app-home', + templateUrl: './home.component.html', + styleUrls: ['./home.component.scss'] }) export class HomeComponent implements OnInit { personalInfo: any; setImage:any; - imageSrc: any = "../assets/imgs/profile.png"; + imageSrc: any = '../assets/imgs/profile.png'; public direction: string; // user_image: any = "../assets/imgs/profile.png"; constructor( @@ -26,11 +26,11 @@ export class HomeComponent implements OnInit { ) { this.direction = TranslatorService.getCurrentDirection(); - this.events.subscribe("img-change", displayImg => { + this.events.subscribe('img-change', displayImg => { // alert("1 - profile home : "+displayImg); //this.user_image = "data:image/png;base64"+displayImg; - this.setImage = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+displayImg); - this.imageSrc = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+displayImg); + this.setImage = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,'+displayImg); + this.imageSrc = this.sanitizer.bypassSecurityTrustUrl('data:Image/*;base64,'+displayImg); }); @@ -41,33 +41,33 @@ export class HomeComponent implements OnInit { this.getProfile(); } getProfile() { - console.log("getProfile"); + console.log('getProfile'); this.authService .loadAuthenticatedUser() .subscribe((user: AuthenticatedUser) => { if (user) { this.personalInfo = user; - console.log("name: "+ this.personalInfo.EMPLOYEE_NAME); - console.log("user name: "+ user.EMPLOYEE_NAME); + console.log('name: '+ this.personalInfo.EMPLOYEE_NAME); + console.log('user name: '+ user.EMPLOYEE_NAME); if(this.cs.getUpdateImage().status){ // this.imageSrc = this.sanitizer.bypassSecurityTrustUrl("data:Image/*;base64,"+this.cs.getUpdateImage().img); - this.imageSrc =this.sanitizer.bypassSecurityTrustUrl("data:image/png;base64,"+this.cs.getUpdateImage().img); + this.imageSrc =this.sanitizer.bypassSecurityTrustUrl('data:image/png;base64,'+this.cs.getUpdateImage().img); }else{ this.imageSrc = user.EMPLOYEE_IMAGE - ? "data:image/png;base64," + user.EMPLOYEE_IMAGE + ? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE : this.imageSrc; - console.log("2-"+user); + console.log('2-'+user); } } else { - console.log("3-"+user); + console.log('3-'+user); } }); } - private ChangeImage() { + public ChangeImage() { this.cs.openChangeImagePage(); } } diff --git a/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.html b/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.html index 16e9298b..9903b387 100644 --- a/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.html +++ b/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.html @@ -32,7 +32,7 @@ + [smallSegments]="10"> diff --git a/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.ts b/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.ts index 9c0807ed..6b14fc93 100644 --- a/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.ts +++ b/Mohem/src/app/profile/performance-evaluation/performance-evaluation.component.ts @@ -1,13 +1,13 @@ import { Component, OnInit, NgModule } from '@angular/core'; -import { Platform, Events, MenuController } from "@ionic/angular"; -import { CommonService } from "src/app/hmg-common/services/common/common.service"; -import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; -import { AuthenticationService } from "src/app/hmg-common/services/authentication/authentication.service"; +import { Platform, Events, MenuController } from '@ionic/angular'; +import { CommonService } from 'src/app/hmg-common/services/common/common.service'; +import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service'; +import { AuthenticationService } from 'src/app/hmg-common/services/authentication/authentication.service'; import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service'; import { PerformanceAppraisalResponse } from 'src/app/hmg-common/services/dashbored/performance-appraisal.response'; // import { DomSanitizer } from '@angular/platform-browser'; // import {NgxGaugeModule} from 'ngx-gauge'; -import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/models/authenticated-user"; +import { AuthenticatedUser } from 'src/app/hmg-common/services/authentication/models/authenticated-user'; @@ -18,7 +18,7 @@ import { AuthenticatedUser } from "src/app/hmg-common/services/authentication/mo }) export class PerformanceEvaluationComponent implements OnInit { personalInfo: any; - user_image: any = "../assets/imgs/profile.png"; + user_image: any = '../assets/imgs/profile.png'; setImage: any; view: any = [380, 450]; public performanceData: any = []; @@ -64,7 +64,7 @@ export class PerformanceEvaluationComponent implements OnInit { for (let i = 0; i < this.performanceData.length; i++) { this.performanceData[i].color = this.colorScheme.domain[i]; - console.log(i + " : " + this.performanceData[i].name) + console.log(i + ' : ' + this.performanceData[i].name) } console.log(this.performanceData[0].color) @@ -72,19 +72,19 @@ export class PerformanceEvaluationComponent implements OnInit { } ngAfterViewInit() { - document.querySelector("svg .gauge.chart > text").remove(); + document.querySelector('svg .gauge.chart > text').remove(); } getProfile() { - console.log("getProfile"); + console.log('getProfile'); this.authService .loadAuthenticatedUser() .subscribe((user: AuthenticatedUser) => { if (user) { this.personalInfo = user; this.user_image = user.EMPLOYEE_IMAGE - ? "data:image/png;base64," + user.EMPLOYEE_IMAGE - : "../assets/imgs/profile.png"; + ? 'data:image/png;base64,' + user.EMPLOYEE_IMAGE + : '../assets/imgs/profile.png'; } diff --git a/Mohem/src/app/time-card/select-period/select-period.component.ts b/Mohem/src/app/time-card/select-period/select-period.component.ts index 5ecc7a18..cb93ce56 100644 --- a/Mohem/src/app/time-card/select-period/select-period.component.ts +++ b/Mohem/src/app/time-card/select-period/select-period.component.ts @@ -13,6 +13,7 @@ export class SelectPeriodComponent implements OnInit { public dateFrom: any; public dateTo: any; public selectedShiftType: any; + public Select = ''; public filtersArray: any = [ { diff --git a/Mohem/src/app/vacation-rule/home/home.component.ts b/Mohem/src/app/vacation-rule/home/home.component.ts index fb95a2a3..05615334 100644 --- a/Mohem/src/app/vacation-rule/home/home.component.ts +++ b/Mohem/src/app/vacation-rule/home/home.component.ts @@ -27,6 +27,8 @@ export class HomeComponent implements OnInit { RespondAttributeList: any; add:any='add'; button: ButtonInput; + direction = ''; + notBadge = ''; // dateTime: DateTimeInput; // date: DateInput; // numberInput: NumberInput; From d4ef8bf7ec7d99a15ed5f664c66fc0fe242b01dd Mon Sep 17 00:00:00 2001 From: ashwaq Date: Mon, 16 Mar 2020 14:24:24 +0300 Subject: [PATCH 17/19] fix po attachment + Mo Action --- .../absence-confirm.component.scss | 6 +++--- .../submit-absence/submit-absence.component.ts | 10 +++++++++- .../services/connector/connector.service.ts | 2 +- .../worklist-main-mr.component.html | 9 ++++----- .../worklist-main-mr.component.ts | 18 +++++++++--------- .../worklist-main/worklist-main.component.ts | 4 ---- Mohem/src/theme/worklist.scss | 8 ++++---- 7 files changed, 30 insertions(+), 27 deletions(-) diff --git a/Mohem/src/app/absence/absence-confirm/absence-confirm.component.scss b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.scss index 96965e58..fb652af8 100644 --- a/Mohem/src/app/absence/absence-confirm/absence-confirm.component.scss +++ b/Mohem/src/app/absence/absence-confirm/absence-confirm.component.scss @@ -186,7 +186,7 @@ ion-card-content.confirm-details{ .timeline .timeline-item { - width: 40px; + // width: 40px; } @@ -199,8 +199,8 @@ ion-card-content.confirm-details{ .empImge{ border-radius: 50%; - width:100%; - height: 100%; + width:60px; + height: 60px; border: #dedede solid 1px; } diff --git a/Mohem/src/app/absence/submit-absence/submit-absence.component.ts b/Mohem/src/app/absence/submit-absence/submit-absence.component.ts index ffe60b9f..9513fa16 100644 --- a/Mohem/src/app/absence/submit-absence/submit-absence.component.ts +++ b/Mohem/src/app/absence/submit-absence/submit-absence.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, ElementRef } from "@angular/core"; +import { Component, OnInit, ElementRef, ChangeDetectorRef } from "@angular/core"; import { CommonService } from "src/app/hmg-common/services/common/common.service"; import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service"; import { MenuService } from "src/app/hmg-common/services/menu/menuservice.service"; @@ -85,6 +85,7 @@ export class SubmitAbsenceComponent implements OnInit { public datePicker: DatePicker, public ts: TranslatorService, private elementRef: ElementRef, + private changeDetectorRef: ChangeDetectorRef ) { ////*new add*///// @@ -101,6 +102,7 @@ export class SubmitAbsenceComponent implements OnInit { this.selEmp = this.getPassNotificationDetails.SELECTED_EMPLOYEE_NUMBER; this.respID = -999; this.submitAbsObjList = this.common.sharedService.getSharedData('submitAbsObjList'); + console.log() } else { this.action = "CREATE"; this.selEmp = this.common.sharedService.getSharedData( @@ -172,6 +174,7 @@ export class SubmitAbsenceComponent implements OnInit { } } calcDay() { + console.log("calcDay" ); let msg: string = ""; if ( this.startDate == undefined || @@ -263,10 +266,13 @@ export class SubmitAbsenceComponent implements OnInit { } public onTypeAbsenceChange() { + console.log("this.absenceType: "+ this.absenceType); if (this.absenceType) { let obj: any = this.absenceTypeList.find( s => s.ABSENCE_ATTENDANCE_TYPE_ID == this.absenceType ); + console.log("obj : "+ obj); + if (obj) this.absenceTypeName = obj.DESC_FLEX_CONTEXT_CODE; else this.absenceTypeName = null; this.getAbsenceDffStructure(); @@ -1141,6 +1147,8 @@ export class SubmitAbsenceComponent implements OnInit { this.action = this.submitAbsObjList[i].ACTION; if (this.submitAbsObjList[i].SEGMENT_NAME == "ABSENCE_TYPE") { this.absenceType = val; + this.changeDetectorRef.detectChanges(); + } if (this.submitAbsObjList[i].SEGMENT_NAME == "DESC_FLEX_CONTEXT_CODE") { this.absenceTypeName = val; 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 1335e79d..a494567f 100644 --- a/Mohem/src/app/hmg-common/services/connector/connector.service.ts +++ b/Mohem/src/app/hmg-common/services/connector/connector.service.ts @@ -21,7 +21,7 @@ export class ConnectorService { headers: new HttpHeaders({ 'Content-Type': 'application/json' }) }; public static retryTimes = 0; - public static timeOut = 30 * 1000; + public static timeOut = 120 * 1000; // public static host = 'http://10.50.100.113:6060/'; // development service public static host = 'https://uat.hmgwebservices.com/'; diff --git a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html index 266ae61b..73eb40a0 100644 --- a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html +++ b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html @@ -8,7 +8,7 @@ - +
{{getPassNotificationDetails.SUBJECT}}
@@ -659,13 +659,12 @@ - + Approve - + Reject @@ -679,7 +678,7 @@ Skip - + More diff --git a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts index 101757c6..dcc0410d 100644 --- a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts +++ b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts @@ -400,15 +400,15 @@ export class WorklistMainMRComponent implements OnInit { this.confirmMsg = this.ts.trPK('worklistMain', 'closeMsg') } - this.openApplyModal(this.WorkListActionObj); - - // this.common.confirmAlertDialogAction( - // () => { - // this.applyAction(this.WorkListActionObj); - // }, this.ts.trPK('general', 'ok'), - // () => { }, this.ts.trPK('general', 'cancel'), - // this.ts.trPK('vacation-rule', 'confirmation'), - // this.confirmMsg); + // this.openApplyModal(this.WorkListActionObj); + + this.common.confirmAlertDialogAction( + () => { + this.applyAction(this.WorkListActionObj); + }, this.ts.trPK('general', 'ok'), + () => { }, this.ts.trPK('general', 'cancel'), + this.ts.trPK('vacation-rule', 'confirmation'), + this.confirmMsg); ////////////////////////////////////////////////////////// diff --git a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts index bd24c4f9..d800c8da 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts @@ -547,10 +547,6 @@ export class WorklistMainComponent implements OnInit { ); // this.navCtrl.push("EitUpdateListPage"); this.common.eitUpdate();// must be test -<<<<<<< HEAD -======= - ->>>>>>> a0e265ba550a4baab02eceba5e138cf08c3efe21 } else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") { this.common.sharedService.setSharedData( this.notificationBodyRes, diff --git a/Mohem/src/theme/worklist.scss b/Mohem/src/theme/worklist.scss index eee25155..eb1d83b5 100644 --- a/Mohem/src/theme/worklist.scss +++ b/Mohem/src/theme/worklist.scss @@ -232,7 +232,7 @@ ion-label.labelValue.sc-ion-label-md-h.sc-ion-label-md-s.md.hydrated .timeline .timeline-item { - width: 40px; + // width: 40px; } @@ -548,9 +548,9 @@ left: 66px; height:70px } .empImge{ - border-radius: 50%; - width:100%; - height: 100%; + border-radius: 50% !important; + width: 60px !important; + height: 60px !important; border: #dedede solid 1px; } From e191b21e4421bec7c436af1419f0fd802f066ab3 Mon Sep 17 00:00:00 2001 From: Mohamed Mekawy Date: Tue, 17 Mar 2020 11:21:25 +0300 Subject: [PATCH 18/19] fix issues --- Mohem/src/app/app.component.html | 19 +++++++++++-------- Mohem/src/app/app.component.ts | 6 ++++-- .../services/common/common.service.ts | 4 ++-- Mohem/src/app/home/home.page.ts | 1 + .../profile-image/profile-image.component.ts | 2 +- 5 files changed, 19 insertions(+), 13 deletions(-) diff --git a/Mohem/src/app/app.component.html b/Mohem/src/app/app.component.html index 125c9a87..025bb38e 100644 --- a/Mohem/src/app/app.component.html +++ b/Mohem/src/app/app.component.html @@ -102,6 +102,16 @@ + + + + + + {{ts.trPK('myTeam','myTeam-header')}} + + + + @@ -119,14 +129,7 @@ --> - - - - - - {{ts.trPK('myTeam','myTeam-header')}} - - +