From a22d3c64de94915cdf60cb5d692924db96764ce6 Mon Sep 17 00:00:00 2001 From: umasoodch Date: Sun, 26 Dec 2021 09:40:20 +0300 Subject: [PATCH 1/8] added changes for worklist --- .../app/notification/home/home.component.html | 8 +- .../app/notification/home/home.component.ts | 164 ++++++------------ 2 files changed, 57 insertions(+), 115 deletions(-) diff --git a/Mohem/src/app/notification/home/home.component.html b/Mohem/src/app/notification/home/home.component.html index 95668d4d..8d287a0c 100644 --- a/Mohem/src/app/notification/home/home.component.html +++ b/Mohem/src/app/notification/home/home.component.html @@ -12,15 +12,15 @@ {{ts.trPK('work-list','open-analysis')}}
- {{newWorkListResponse.length + ITGCount}} {{ts.trPK('work-list','of')}} - {{newWorkListResponse.length}} {{ts.trPK('work-list','of')}} +

{{totalRequestCount}}

{{newWorkListResponse[0].NO_OF_ROWS + ITGCount}}

{{newWorkListResponse[0].NO_OF_ROWS}}

{{ts.trPK('work-list','total')}}
{{ts.trPK('work-list','open-reqest')}}
- + @@ -42,7 +42,7 @@ {{ts.trPK('work-list','clear-search')}} - + {{ts.trPK('work-list','advanced-search')}} diff --git a/Mohem/src/app/notification/home/home.component.ts b/Mohem/src/app/notification/home/home.component.ts index c26fd2c5..c75b458b 100644 --- a/Mohem/src/app/notification/home/home.component.ts +++ b/Mohem/src/app/notification/home/home.component.ts @@ -68,7 +68,7 @@ export class HomeComponent implements OnInit { public allFormattedData = []; public selectedFilter = 'ALL'; public showSearchButton = false; - public itemType = ''; + public itemType = 'HRSSA'; public receivedITGCount = false; public totalHR = 0; @@ -103,14 +103,6 @@ export class HomeComponent implements OnInit { }] }; public filters = [ - { - value: 0, - name: 'All', - active: true, - color: '#124375', - key: 'ALL', - disable: false - }, { value: 0, name: 'HR', @@ -194,7 +186,7 @@ export class HomeComponent implements OnInit { 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; + this.WorkListObj.P_PAGE_LIMIT = 5; } ngOnInit() { @@ -203,7 +195,6 @@ export class HomeComponent implements OnInit { } ionViewWillEnter() { - console.log(this.filters); const loadWorkList = this.common.sharedService.getSharedData('loadWorkList', false); if (loadWorkList) { this.receivedITGCount = false; @@ -215,10 +206,11 @@ export class HomeComponent implements OnInit { } this.currentActiveIndex = 0; this.previousActiveIndex = 0; - this.itemType = ''; - this.selectedFilter = 'ALL'; + this.itemType = 'HRSSA'; + this.selectedFilter = 'HR'; + this.filters[0].active = true; this.isPostNoLoad = true; - this.disableFilters(); + // this.disableFilters(); this.resetData(); this.direction = TranslatorService.getCurrentLanguageName(); this.worklistNotifications = this.common.sharedService.getSharedData('worklistNotifications', false); @@ -236,6 +228,7 @@ export class HomeComponent implements OnInit { if (this.common.validResponse(result)) { this.worklistNotifications = result; this.totalRequestCount = this.worklistNotifications.P_OPEN_NTF_NUMBER; + this.assignDataToFilters(); this.common.sharedService.setSharedData(result, 'worklistNotifications'); this.Details(); this.callWorkListServices(); @@ -244,66 +237,30 @@ export class HomeComponent implements OnInit { } assignDataToFilters() { - this.ngZone.run(() => { - this.filters[0].value = this.worklistNotifications.P_OPEN_NTF_NUMBER; - this.filters[1].value = this.totalHR; - this.filters[2].value = this.totalMR; - this.filters[3].value = this.totalPR; - this.filters[4].value = this.totalPO; - this.filters[6].value = this.totalIC; - }); - - - if (this.totalHR === 0) { - this.data.datasets[0].data[0] = 0; - } - - if (this.totalPO === 0) { - this.data.datasets[0].data[1] = 0; - } - - if (this.totalPR === 0) { - this.data.datasets[0].data[2] = 0; - } - - if (this.totalMR === 0) { - this.data.datasets[0].data[3] = 0; - } - - if (this.totalIC === 0) { - this.data.datasets[0].data[5] = 0; - } - - if (this.totalStamp === 0) { - this.data.datasets[0].data[6] = 0; - } - const openNotificationsArray = this.worklistNotifications.GetOpenNotificationsList; for (const notification of openNotificationsArray) { if (notification.ITEM_TYPE === 'HRSSA') { - this.filters[1].value = this.totalHR; + this.filters[0].value = notification.OPEN_NTF_NUMBER; this.data.datasets[0].data[0] = notification.OPEN_NTF_NUMBER; } else if (notification.ITEM_TYPE === 'INVMOA') { - this.filters[2].value = this.totalMR; + this.filters[1].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 = this.totalPR; + this.filters[2].value = notification.OPEN_NTF_NUMBER; this.data.datasets[0].data[2] = notification.OPEN_NTF_NUMBER; } else if (notification.ITEM_TYPE === 'POAPPRV') { - this.filters[4].value = this.totalPO; + this.filters[3].value = notification.OPEN_NTF_NUMBER; this.data.datasets[0].data[3] = notification.OPEN_NTF_NUMBER; } else if (notification.ITEM_TYPE === 'INVITEM') { - this.filters[6].value = this.totalIC; + this.filters[5].value = notification.OPEN_NTF_NUMBER; this.data.datasets[0].data[5] = notification.OPEN_NTF_NUMBER; } else if (notification.ITEM_TYPE === 'STAMP') { - this.filters[7].value = this.totalStamp; + this.filters[6].value = notification.OPEN_NTF_NUMBER; this.data.datasets[0].data[6] = notification.OPEN_NTF_NUMBER; } } - // this.data.datasets[0].data[4] = this.ITGCount; this.showChart = true; - // this.common.stopLoading(); this.isLoading = false; } @@ -316,7 +273,37 @@ export class HomeComponent implements OnInit { } } + public initiateNewWorklistData(selectedFilter: any, filterValue: any) { + 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 = 5; + + if (this.infiniteScroll) { + this.infiniteScroll.complete(); + } + this.itemType = this.selectedFilter; + + this.newWorkListResponse = []; + this.showFormattedData = []; + this.allFormattedData = []; + + if (filterValue > 0) { + this.getAllPushNotificationFun(); + } else { + this.common.stopLoading(); + } + + } + activeFilter(index: number) { + if (index !== 4) { + this.common.startLoading(); + } console.log(this.filters); if (this.currentActiveIndex !== index) { this.previousActiveIndex = this.currentActiveIndex; @@ -324,8 +311,10 @@ export class HomeComponent implements OnInit { this.filters[this.previousActiveIndex].active = false; this.filters[this.currentActiveIndex].active = true; this.selectedFilter = this.filters[this.currentActiveIndex].key; + const filterValue = this.filters[this.currentActiveIndex].value; if (this.selectedFilter !== 'ITG') { - this.getFilteredData(this.selectedFilter); + // this.getFilteredData(this.selectedFilter); + this.initiateNewWorklistData(this.selectedFilter, filterValue); } } } @@ -381,7 +370,7 @@ export class HomeComponent implements OnInit { this.previousActiveIndex = 0; this.filters[this.currentActiveIndex].active = true; if (this.itemType !== '') { - this.disableFilters(); + // this.disableFilters(); } this.isPostNoLoad = false; this.getAllPushNotificationFun(); @@ -415,21 +404,6 @@ export class HomeComponent implements OnInit { ); } - getFilteredData(filter: string) { - if (filter === 'ALL') { - this.showFormattedData = this.allFormattedData; - } else { - let arrayToFilter; - arrayToFilter = this.newWorkListResponse.filter((workList) => { - return workList.ITEM_TYPE === filter; - }); - const categorizeData = this.categorizeData(arrayToFilter); - this.showFormattedData = this.sortArray(categorizeData); - // const sortData = this.sortArray(arrayToFilter); - // this.showFormattedData = this.categorizeData(sortData); - } - } - checkDateExistance(currentDate: any, formattedData: any) { let existsBefore = false; let index = 0; @@ -446,35 +420,10 @@ export class HomeComponent implements OnInit { }; } - addCountInFilters(workList: any) { - if (workList.ITEM_TYPE === 'HRSSA') { - this.totalHR = this.totalHR + 1; - } else if (workList.ITEM_TYPE === 'POAPPRV') { - this.totalPO = this.totalPO + 1; - } else if (workList.ITEM_TYPE === 'REQAPPRV') { - this.totalPR = this.totalPR + 1; - } else if (workList.ITEM_TYPE === 'INVMOA') { - this.totalMR = this.totalMR + 1; - } else if (workList.ITEM_TYPE === 'INVITEM') { - this.totalIC = this.totalIC + 1; - } else if (workList.ITEM_TYPE === 'STAMP') { - this.totalStamp = this.totalStamp + 1; - } - } - categorizeData(arrayToCategorize: any) { - this.ngZone.run(() => { - this.totalHR = 0; - this.totalPO = 0; - this.totalPR = 0; - this.totalMR = 0; - this.totalIC = 0; - }) - const datePipe = new DatePipe('en-US'); const formattedData = []; for (const workList of arrayToCategorize) { - this.addCountInFilters(workList); const currentDate = datePipe.transform(new Date(workList.BEGIN_DATE), 'MMMM dd, y'); const currentObject = { date: '', @@ -505,6 +454,7 @@ export class HomeComponent implements OnInit { } private handleWorkListResult(result: any) { + this.common.stopLoading(); console.log(this.filters); const lastItemIndex = result.length - 1; const lastitem = result[lastItemIndex]; @@ -534,13 +484,12 @@ export class HomeComponent implements OnInit { this.showFormattedData = this.sortArray(categorizedWorkListResponse); this.allFormattedData = this.showFormattedData; this.common.sharedService.setSharedData(this.newWorkListResponse, HomeComponent.NOTIFICATION_ARR); - this.assignDataToFilters(); + // this.assignDataToFilters(); } } else { this.newWorkListResponse = []; - // this.assignDataToFilters(); if (this.showFormattedData.length === 0) { - this.resetFiltersUI(); + // this.resetFiltersUI(); } this.data.datasets[0].data[4] = this.ITGCount; this.showChart = true; @@ -555,7 +504,7 @@ export class HomeComponent implements OnInit { this.filters[1].value = 0; this.filters[2].value = 0; this.filters[3].value = 0; - this.filters[4].value = 0; + this.filters[5].value = 0; this.filters[6].value = 0; this.data.datasets[0].data[0] = 0; @@ -601,24 +550,19 @@ export class HomeComponent implements OnInit { this.WorkListObj.P_SEARCH_SUBJECT = ''; } - // initializeWorkList() { - - // } - clearSearch() { this.common.startLoading(); this.isLoading = true; this.itemType = ''; this.selectedFilter = 'ALL'; this.isPostNoLoad = true; - this.disableFilters(); + // this.disableFilters(); this.resetData(); this.getAllPushNotificationFun(); } doInfinite(infiniteScroll) { if (!this.isReachEnd && this.selectedFilter !== 'ITG') { - this.common.startLoading(); this.WorklistService.getWorkList(this.WorkListObj, '', '', this.isPostNoLoad).subscribe((result) => { if (this.common.validResponse(result)) { this.handleWorkListResult(result.GetWorkList); @@ -664,8 +608,6 @@ export class HomeComponent implements OnInit { names[i] = result.RequestType[i].RequestTypeCode; count++; } - //this.sortArrayOfAll(this.ITGSegment[0].data) - console.log(this.ITGSegment); } }); @@ -677,7 +619,7 @@ export class HomeComponent implements OnInit { this.ITGCount = result.TotalCount; this.totalRequestCount = this.totalRequestCount + result.TotalCount; this.data.datasets[0].data[4] = this.ITGCount; - this.filters[5].value = result.TotalCount; + this.filters[4].value = result.TotalCount; this.receivedITGCount = true; }); } From e939892c54a4f35eb444bd661201ade85c2b6530 Mon Sep 17 00:00:00 2001 From: umasoodch Date: Mon, 27 Dec 2021 14:41:10 +0300 Subject: [PATCH 2/8] fixed worklist issues --- Mohem/src/app/notification/home/home.component.html | 3 +++ Mohem/src/app/notification/home/home.component.scss | 6 ++++++ Mohem/src/app/notification/home/home.component.ts | 11 ++++++++--- .../worklist-advanced-search.component.html | 1 + .../worklist-advanced-search.component.ts | 2 +- 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/Mohem/src/app/notification/home/home.component.html b/Mohem/src/app/notification/home/home.component.html index 8d287a0c..a46c5462 100644 --- a/Mohem/src/app/notification/home/home.component.html +++ b/Mohem/src/app/notification/home/home.component.html @@ -19,6 +19,9 @@

{{newWorkListResponse[0].NO_OF_ROWS}}

{{ts.trPK('work-list','total')}}
{{ts.trPK('work-list','open-reqest')}}
+
+ +
diff --git a/Mohem/src/app/notification/home/home.component.scss b/Mohem/src/app/notification/home/home.component.scss index c1faeb72..9a9d0ea9 100644 --- a/Mohem/src/app/notification/home/home.component.scss +++ b/Mohem/src/app/notification/home/home.component.scss @@ -459,4 +459,10 @@ padding: 10px 30px; } .slideCss{ width: auto !important; +} + +.spinner-custom-class{ + position: absolute; + right: 160px; + top: 100px; } \ No newline at end of file diff --git a/Mohem/src/app/notification/home/home.component.ts b/Mohem/src/app/notification/home/home.component.ts index c75b458b..2070e4e8 100644 --- a/Mohem/src/app/notification/home/home.component.ts +++ b/Mohem/src/app/notification/home/home.component.ts @@ -194,6 +194,8 @@ export class HomeComponent implements OnInit { this.isLoading = true; } + + ionViewWillEnter() { const loadWorkList = this.common.sharedService.getSharedData('loadWorkList', false); if (loadWorkList) { @@ -348,7 +350,9 @@ export class HomeComponent implements OnInit { component: WorklistAdvancedSearchComponent, cssClass: 'advanced-search-modal-custom', backdropDismiss: false, - componentProps: {} + componentProps: { + itemType: this.itemType + } }); modal.onDidDismiss().then(result => { if (result.data) { @@ -364,14 +368,15 @@ export class HomeComponent implements OnInit { this.WorkListObj.P_PAGE_NUM = 1; this.newWorkListResponse = []; this.showFormattedData = []; + this.allFormattedData = []; this.selectedFilter = 'ALL'; this.filters[this.currentActiveIndex].active = false; this.currentActiveIndex = 0; this.previousActiveIndex = 0; this.filters[this.currentActiveIndex].active = true; - if (this.itemType !== '') { + // if (this.itemType !== '') { // this.disableFilters(); - } + // } this.isPostNoLoad = false; this.getAllPushNotificationFun(); } 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 67b487cc..a185754a 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 @@ -54,6 +54,7 @@ PR MR IC + STAMP diff --git a/Mohem/src/app/notification/worklist-advanced-search/worklist-advanced-search.component.ts b/Mohem/src/app/notification/worklist-advanced-search/worklist-advanced-search.component.ts index 8b9db09f..319c5c60 100644 --- a/Mohem/src/app/notification/worklist-advanced-search/worklist-advanced-search.component.ts +++ b/Mohem/src/app/notification/worklist-advanced-search/worklist-advanced-search.component.ts @@ -15,7 +15,7 @@ export class WorklistAdvancedSearchComponent implements OnInit { public inputSearch = ''; public selectedValue = ''; public notificationType = ''; - public itemType = ''; + public itemType; public direction: string; constructor( From d23c52d460a200ad8733abec1eda913a4fb15315 Mon Sep 17 00:00:00 2001 From: umasoodch Date: Mon, 27 Dec 2021 15:18:47 +0300 Subject: [PATCH 3/8] fixed worklist styling issue --- Mohem/src/app/notification/home/home.component.html | 2 +- Mohem/src/app/notification/home/home.component.scss | 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 a46c5462..326c7d16 100644 --- a/Mohem/src/app/notification/home/home.component.html +++ b/Mohem/src/app/notification/home/home.component.html @@ -105,7 +105,7 @@ - + diff --git a/Mohem/src/app/notification/home/home.component.scss b/Mohem/src/app/notification/home/home.component.scss index 9a9d0ea9..b7444c88 100644 --- a/Mohem/src/app/notification/home/home.component.scss +++ b/Mohem/src/app/notification/home/home.component.scss @@ -355,7 +355,7 @@ z-index: 99; ion-col{ background: white; border-radius: 12px; - padding-right: 30px; + // padding-right: 30px; flex: none; ion-icon{ margin-right: 3px; From 4a25fea675c1c324f30698abb540ddd6e3ff7f54 Mon Sep 17 00:00:00 2001 From: umasoodch Date: Tue, 28 Dec 2021 14:32:41 +0300 Subject: [PATCH 4/8] fixed issues --- Mohem/src/app/notification/home/home.component.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Mohem/src/app/notification/home/home.component.ts b/Mohem/src/app/notification/home/home.component.ts index 2070e4e8..7b47aad2 100644 --- a/Mohem/src/app/notification/home/home.component.ts +++ b/Mohem/src/app/notification/home/home.component.ts @@ -330,7 +330,6 @@ export class HomeComponent implements OnInit { if (filter.key === this.itemType) { filter.disable = false; filter.active = true; - filter.value = 0; this.selectedFilter = filter.name; } else if (this.itemType === '') { filter.disable = false; @@ -345,6 +344,7 @@ export class HomeComponent implements OnInit { } } + async openSearchModal() { const modal = await this.modalController.create({ component: WorklistAdvancedSearchComponent, @@ -369,7 +369,12 @@ export class HomeComponent implements OnInit { this.newWorkListResponse = []; this.showFormattedData = []; this.allFormattedData = []; - this.selectedFilter = 'ALL'; + // this.selectedFilter = 'ALL'; + + if (this.itemType !== '') { + this.disableFilters(); + } + this.filters[this.currentActiveIndex].active = false; this.currentActiveIndex = 0; this.previousActiveIndex = 0; From 27fc8ebb726706dcc58deec38ee30bb92eddddfc Mon Sep 17 00:00:00 2001 From: enadhilal Date: Tue, 28 Dec 2021 15:36:51 +0300 Subject: [PATCH 5/8] fixed itg --- .../authentication/authentication.service.ts | 2 +- .../service/work-list.main.service.ts | 33 + .../notification/service/worklist.service.ts | 16 + .../work-list-replacement-itg.component.html | 10 + .../work-list-replacement-itg.component.scss | 562 +++++++++--------- .../work-list-replacement-itg.component.ts | 76 ++- .../work-list-replacement-roll.component.html | 10 + .../work-list-replacement-roll.component.scss | 144 ++--- .../work-list-replacement-roll.component.ts | 97 ++- .../worklist-main.component.html | 75 ++- .../worklist-main/worklist-main.component.ts | 34 ++ 11 files changed, 674 insertions(+), 385 deletions(-) diff --git a/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts b/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts index fe589875..b5436fb3 100644 --- a/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts +++ b/Mohem/src/app/hmg-common/services/authentication/authentication.service.ts @@ -142,7 +142,7 @@ export class AuthenticationService { } else { mobileType = 'android'; } - request.VersionID = 3.2; + request.VersionID = 3.3;//3.2; request.Channel = 31; request.LanguageID = TranslatorService.getCurrentLanguageCode(); request.MobileType = mobileType; 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 c3badf4c..bfd42c63 100644 --- a/Mohem/src/app/notification/service/work-list.main.service.ts +++ b/Mohem/src/app/notification/service/work-list.main.service.ts @@ -31,6 +31,8 @@ export class WorklistMainService { public static getPRNotificationBody = "Services/ERP.svc/REST/GET_PR_NOTIFICATION_BODY"; public static getICNotificationBody = "Services/ERP.svc/REST/GET_ITEM_CREATION_NTF_BODY"; public static getBasicDetailNotificationBody = "Services/ERP.svc/REST/GET_BASIC_DET_NTF_BODY"; + public static getPhoneNotificationBody = "Services/ERP.svc/REST/GET_PHONES_NOTIFICATION_BODY"; + public static getTerminationNotificationBody = "Services/ERP.svc/REST/GET_TERM_NOTIFICATION_BODY"; public static getStampMSNotificationBody = "Services/ERP.svc/REST/GET_STAMP_MS_NOTIFICATION_BODY"; public static getStampNSNotificationBody = "Services/ERP.svc/REST/GET_STAMP_NS_NOTIFICATION_BODY"; public static getAddressNotificationBody = "Services/ERP.svc/REST/GET_ADDRESS_NOTIFICATION_BODY"; @@ -189,6 +191,37 @@ export class WorklistMainService { ); } + public getPhoneNotificationBody( + WorkListBodyRequest: any, + onError?: any, + errorLabel?: string + ): Observable { + const request = WorkListBodyRequest; + this.authService.authenticateRequest(request); + return this.api.post( + WorklistMainService.getPhoneNotificationBody, + request, + onError, + errorLabel + ); + } + + + public getTerminationNotificationBody( + WorkListBodyRequest: any, + onError?: any, + errorLabel?: string + ): Observable { + const request = WorkListBodyRequest; + this.authService.authenticateRequest(request); + return this.api.post( + WorklistMainService.getTerminationNotificationBody, + request, + onError, + errorLabel + ); + } + public getPOItemHistory( POItemHistoryReq: any, onError?: any, diff --git a/Mohem/src/app/notification/service/worklist.service.ts b/Mohem/src/app/notification/service/worklist.service.ts index 1673443f..b35b867d 100644 --- a/Mohem/src/app/notification/service/worklist.service.ts +++ b/Mohem/src/app/notification/service/worklist.service.ts @@ -6,6 +6,7 @@ import { WorkListReplacmentEmployeeRequest } from '../models/ReplacmentEmployeeR import { WorkListActionHistoryRequest } from '../models/ActionHistoryReq'; import { WorKListRFCEmployeeResponse } from '../models/RFC-EmployeeRes'; import { WorkListActionHistoryResponse } from '../models/ActionHistoryRes'; +import { Request } from 'src/app/hmg-common/services/models/request'; @Injectable() @@ -16,6 +17,7 @@ export class WorklistService { public static getRFCEmployeeList = 'Services/ERP.svc/REST/GET_RFC_EMPLOYEE_LIST'; public static getActionHistory = 'Services/ERP.svc/REST/GET_ACTION_HISTORY'; public static getFavorite = 'Services/ERP.svc/REST/Mohemm_GetFavoriteReplacements'; + public static getFavoriteWithoutImage = 'Services/ERP.svc/REST/Mohemm_GetFavoriteReplacementsWithoutImage'; public static saveFavorite = 'Services/ERP.svc/REST/Mohemm_ChangeFavoriteReplacements'; constructor( public api: ConnectorService, @@ -53,6 +55,15 @@ export class WorklistService { public getFavorite(req: any, onError?: any, errorLabel?: string): Observable { this.authService.authenticateRequest(req); + console.log(req); + return this.api.post(WorklistService.getFavorite, req, onError, errorLabel); + } + + public getFavoriteByLetter(letter: string, onError?: any, errorLabel?: string): Observable { + const req = new Request(); + this.authService.authenticateRequest(req); + req['ItgFilter'] = letter; + console.log(letter); return this.api.post(WorklistService.getFavorite, req, onError, errorLabel); } public saveFavoriteList(request: any, onError?: any, errorLabel?: string): Observable { @@ -63,6 +74,11 @@ export class WorklistService { return this.api.post(WorklistService.saveFavorite, req, onError, errorLabel); } + public getFavoriteWithoutImage(req: any, onError?: any, errorLabel?: string): Observable { + this.authService.authenticateRequest(req); + return this.api.post(WorklistService.getFavoriteWithoutImage, req, onError, errorLabel); + } + public getFavoriteMyTeam(req: any, onError?: any, errorLabel?: string): Observable { this.authService.authenticateRequest(req); return this.api.post(WorklistService.getFavorite, req, onError, errorLabel); diff --git a/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.html b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.html index 85e6ad39..dfe64fd4 100644 --- a/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.html +++ b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.html @@ -135,6 +135,16 @@ +
+ + +
+

{{filter}}

+
+
+
+
+ - +

{{'worklist, loading'| translate}} Actual Swipe(s)
- +
@@ -180,7 +182,7 @@
- +
@@ -293,7 +295,9 @@ + getPassNotificationDetails?.REQUEST_TYPE == 'ADDRESS' && + getPassNotificationDetails?.REQUEST_TYPE != 'PHONE_NUMBERS' && + getPassNotificationDetails?.REQUEST_TYPE != 'TERMINATION'">

{{'worklist, loading'| translate}}

@@ -337,8 +341,67 @@
- + + +
+

{{'worklist, loading'| translate}}

+
+ +
+

{{ 'general, empty' | translate}}

+
+
+ + +
+ + + +
+ +
+
+
+
+
+
+
+ + + +
+

{{'worklist, loading'| translate}}

+
+ +
+

{{ 'general, empty' | translate}}

+
+
+ + +
+ + + +
+ +
+
+
+
+
+
+
+ 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 841d91d0..3cfa8951 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts @@ -288,6 +288,10 @@ export class WorklistMainComponent implements OnInit { this.getStampMSNotification(this.WorkListBodyObj); } else if (this.getPassNotificationDetails.REQUEST_TYPE === 'STAMP_NS') { this.getStampNSNotification(this.WorkListBodyObj); + } else if (this.getPassNotificationDetails.REQUEST_TYPE === 'TERMINATION') { + this.getTerminationNotificationDetails(this.WorkListBodyObj); + } else if (this.getPassNotificationDetails.REQUEST_TYPE === 'PHONE_NUMBERS') { + this.getPhoneNotificationDetails(this.WorkListBodyObj); } } @@ -307,6 +311,22 @@ export class WorklistMainComponent implements OnInit { }); } + getTerminationNotificationDetails(notificationBodyObj) { + this.worklistMainService + .getTerminationNotificationBody(notificationBodyObj) + .subscribe((result: PRNotificatonBodyResponse) => { + this.handleWorkListBodyResult(result, "TERMINATION"); + }); + } + + getPhoneNotificationDetails(notificationBodyObj) { + this.worklistMainService + .getPhoneNotificationBody(notificationBodyObj) + .subscribe((result: PRNotificatonBodyResponse) => { + this.handleWorkListBodyResult(result, "PHONE_NUMBERS"); + }); + } + getBasicDetailsNotification(notificationBodyObj) { this.worklistMainService .getBasicDetailNotificationBody(notificationBodyObj) @@ -421,6 +441,20 @@ export class WorklistMainComponent implements OnInit { console.log(result); } } + else if (Type === "PHONE_NUMBERS"){ + if (result.GetPhonesNotificationBodyList) { + this.notificationBodyRes = + result.GetPhonesNotificationBodyList; + console.log(result); + } + } + else if (Type === "TERMINATION"){ + if (result.GetTermNotificationBodyList) { + this.notificationBodyRes = + result.GetTermNotificationBodyList; + console.log(result); + } + } } } //End handleWorkListBodyResult From 718ec53b2ac6f888ecbacfc76a8d104704829b42 Mon Sep 17 00:00:00 2001 From: enadhilal Date: Wed, 29 Dec 2021 11:36:42 +0300 Subject: [PATCH 6/8] fixing reselect letter after favourite is selected --- .../work-list-replacement-itg.component.ts | 29 +++++++++++------ .../work-list-replacement-roll.component.ts | 31 ++++++++++++------- 2 files changed, 40 insertions(+), 20 deletions(-) diff --git a/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.ts b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.ts index 5a540eb1..ffddbe54 100644 --- a/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.ts +++ b/Mohem/src/app/notification/work-list-replacement-itg/work-list-replacement-itg.component.ts @@ -45,6 +45,9 @@ export class WorkListReplacementItgComponent implements OnInit { slidesPerView: 6, spaceBetween: 5 }; + + public activeSelectedLetter:string; + constructor(public vacationRuleService: VacationRuleServiceService, public ts: TranslatorService, public cs: CommonService, @@ -323,21 +326,28 @@ export class WorkListReplacementItgComponent implements OnInit { this.worklistService.getFavoriteWithoutImage({}, () => { }).subscribe((result) => { if (this.cs.validResponse(result)) { - this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList']; - this.favoriteUserList.forEach((obj) => { + // this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList']; + let favList = result['Mohemm_GetFavoriteReplacementsList']; + favList.forEach((obj) => { obj.IsFavorite = true; this.favLetter.push(obj.EMPLOYEE_DISPLAY_NAME.charAt(0).toUpperCase()); }); this.favLetter = this.favLetter.filter((elem, index, self) => { return index === self.indexOf(elem); }); - this.favLetter.forEach((obj, index) => { - if (index === 0) { - this.favIsActive.push(true); - } else { - this.favIsActive.push(false); - } - }); + if (this.activeSelectedLetter) { + this.selectedLetter(this.activeSelectedLetter); + } else { + this.favLetter.forEach((obj, index) => { + if(this.activeSelectedLetter) {} + if (index === 0) { + this.selectedLetter(obj); + this.favIsActive.push(true); + } else { + this.favIsActive.push(false); + } + }); + } console.log(this.favLetter); console.log(this.favIsActive); } @@ -405,6 +415,7 @@ export class WorkListReplacementItgComponent implements OnInit { this.favLetter.forEach((letter, index) => { if (letter === el) { this.favIsActive[index] = true; + this.activeSelectedLetter = el; this.worklistService.getFavoriteByLetter(letter,() => { }).subscribe((result) => { if (this.cs.validResponse(result)) { diff --git a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts index 262e4962..480ed036 100644 --- a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts +++ b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts @@ -55,6 +55,8 @@ export class WorkListReplacementRollComponent implements OnInit { spaceBetween: 5 }; + public activeSelectedLetter:string; + constructor(public worklistService: WorklistService, private cs: CommonService, public ts: TranslatorService, public workListMainService: WorklistMainService, public modalCtrl: ModalController) { this.P_PAGE_NUM = 1; this.P_PAGE_LIMIT = 50; @@ -509,22 +511,28 @@ export class WorkListReplacementRollComponent implements OnInit { this.worklistService.getFavoriteWithoutImage({}, () => { }).subscribe((result) => { if (this.cs.validResponse(result)) { - this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList']; - this.favoriteUserList.forEach((obj) => { + // this.favoriteUserList = result['Mohemm_GetFavoriteReplacementsList']; + let favList = result['Mohemm_GetFavoriteReplacementsList']; + favList.forEach((obj) => { obj.IsFavorite = true; this.favLetter.push(obj.EMPLOYEE_DISPLAY_NAME.charAt(0).toUpperCase()); }); this.favLetter = this.favLetter.filter((elem, index, self) => { return index === self.indexOf(elem); }); - this.favLetter.forEach((obj, index) => { - if (index === 0) { - this.selectedLetter(obj); - this.favIsActive.push(true); - } else { - this.favIsActive.push(false); - } - }); + if (this.activeSelectedLetter) { + this.selectedLetter(this.activeSelectedLetter); + } else { + this.favLetter.forEach((obj, index) => { + if(this.activeSelectedLetter) {} + if (index === 0) { + this.selectedLetter(obj); + this.favIsActive.push(true); + } else { + this.favIsActive.push(false); + } + }); + } console.log(this.favLetter); console.log(this.favIsActive); } @@ -554,7 +562,7 @@ export class WorkListReplacementRollComponent implements OnInit { } this.getFavruite(); } - }) + }); } setFavorite(selEmp) { @@ -645,6 +653,7 @@ export class WorkListReplacementRollComponent implements OnInit { this.favLetter.forEach((letter, index) => { if (letter === el) { this.favIsActive[index] = true; + this.activeSelectedLetter = el; this.worklistService.getFavoriteByLetter(letter,() => { }).subscribe((result) => { if (this.cs.validResponse(result)) { From 14fb8f7ba75a865f77185a8215ba10bd4a05f22f Mon Sep 17 00:00:00 2001 From: umasoodch Date: Wed, 19 Jan 2022 12:50:41 +0300 Subject: [PATCH 7/8] added child education --- .../app/eit/add-cei/add-cei.component.html | 3 +++ .../app/eit/add-cei/add-cei.component.scss | 0 .../app/eit/add-cei/add-cei.component.spec.ts | 27 +++++++++++++++++++ .../src/app/eit/add-cei/add-cei.component.ts | 14 ++++++++++ .../cei-homepage/cei-homepage.component.html | 3 +++ .../cei-homepage/cei-homepage.component.scss | 0 .../cei-homepage.component.spec.ts | 27 +++++++++++++++++++ .../cei-homepage/cei-homepage.component.ts | 14 ++++++++++ .../confirm-add-cei.component.html | 3 +++ .../confirm-add-cei.component.scss | 0 .../confirm-add-cei.component.spec.ts | 27 +++++++++++++++++++ .../confirm-add-cei.component.ts | 14 ++++++++++ .../services/connector/connector.service.ts | 4 +-- 13 files changed, 134 insertions(+), 2 deletions(-) create mode 100644 Mohem/src/app/eit/add-cei/add-cei.component.html create mode 100644 Mohem/src/app/eit/add-cei/add-cei.component.scss create mode 100644 Mohem/src/app/eit/add-cei/add-cei.component.spec.ts create mode 100644 Mohem/src/app/eit/add-cei/add-cei.component.ts create mode 100644 Mohem/src/app/eit/cei-homepage/cei-homepage.component.html create mode 100644 Mohem/src/app/eit/cei-homepage/cei-homepage.component.scss create mode 100644 Mohem/src/app/eit/cei-homepage/cei-homepage.component.spec.ts create mode 100644 Mohem/src/app/eit/cei-homepage/cei-homepage.component.ts create mode 100644 Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.html create mode 100644 Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.scss create mode 100644 Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.spec.ts create mode 100644 Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.ts diff --git a/Mohem/src/app/eit/add-cei/add-cei.component.html b/Mohem/src/app/eit/add-cei/add-cei.component.html new file mode 100644 index 00000000..bda6751d --- /dev/null +++ b/Mohem/src/app/eit/add-cei/add-cei.component.html @@ -0,0 +1,3 @@ +

+ add-cei works! +

diff --git a/Mohem/src/app/eit/add-cei/add-cei.component.scss b/Mohem/src/app/eit/add-cei/add-cei.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/Mohem/src/app/eit/add-cei/add-cei.component.spec.ts b/Mohem/src/app/eit/add-cei/add-cei.component.spec.ts new file mode 100644 index 00000000..fa819bbd --- /dev/null +++ b/Mohem/src/app/eit/add-cei/add-cei.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AddCeiComponent } from './add-cei.component'; + +describe('AddCeiComponent', () => { + let component: AddCeiComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ AddCeiComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AddCeiComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/eit/add-cei/add-cei.component.ts b/Mohem/src/app/eit/add-cei/add-cei.component.ts new file mode 100644 index 00000000..de223c5d --- /dev/null +++ b/Mohem/src/app/eit/add-cei/add-cei.component.ts @@ -0,0 +1,14 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-add-cei', + templateUrl: './add-cei.component.html', + styleUrls: ['./add-cei.component.scss'], +}) +export class AddCeiComponent implements OnInit { + + constructor() { } + + ngOnInit() {} + +} diff --git a/Mohem/src/app/eit/cei-homepage/cei-homepage.component.html b/Mohem/src/app/eit/cei-homepage/cei-homepage.component.html new file mode 100644 index 00000000..69b119b1 --- /dev/null +++ b/Mohem/src/app/eit/cei-homepage/cei-homepage.component.html @@ -0,0 +1,3 @@ +

+ cei-homepage works! +

diff --git a/Mohem/src/app/eit/cei-homepage/cei-homepage.component.scss b/Mohem/src/app/eit/cei-homepage/cei-homepage.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/Mohem/src/app/eit/cei-homepage/cei-homepage.component.spec.ts b/Mohem/src/app/eit/cei-homepage/cei-homepage.component.spec.ts new file mode 100644 index 00000000..3ebdf92c --- /dev/null +++ b/Mohem/src/app/eit/cei-homepage/cei-homepage.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { CeiHomepageComponent } from './cei-homepage.component'; + +describe('CeiHomepageComponent', () => { + let component: CeiHomepageComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ CeiHomepageComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(CeiHomepageComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/eit/cei-homepage/cei-homepage.component.ts b/Mohem/src/app/eit/cei-homepage/cei-homepage.component.ts new file mode 100644 index 00000000..3a70a668 --- /dev/null +++ b/Mohem/src/app/eit/cei-homepage/cei-homepage.component.ts @@ -0,0 +1,14 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-cei-homepage', + templateUrl: './cei-homepage.component.html', + styleUrls: ['./cei-homepage.component.scss'], +}) +export class CeiHomepageComponent implements OnInit { + + constructor() { } + + ngOnInit() {} + +} diff --git a/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.html b/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.html new file mode 100644 index 00000000..f31f1941 --- /dev/null +++ b/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.html @@ -0,0 +1,3 @@ +

+ confirm-add-cei works! +

diff --git a/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.scss b/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.spec.ts b/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.spec.ts new file mode 100644 index 00000000..2cf5f990 --- /dev/null +++ b/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.spec.ts @@ -0,0 +1,27 @@ +import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ConfirmAddCeiComponent } from './confirm-add-cei.component'; + +describe('ConfirmAddCeiComponent', () => { + let component: ConfirmAddCeiComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ConfirmAddCeiComponent ], + schemas: [CUSTOM_ELEMENTS_SCHEMA], + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ConfirmAddCeiComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.ts b/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.ts new file mode 100644 index 00000000..f9a1a620 --- /dev/null +++ b/Mohem/src/app/eit/confirm-add-cei/confirm-add-cei.component.ts @@ -0,0 +1,14 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-confirm-add-cei', + templateUrl: './confirm-add-cei.component.html', + styleUrls: ['./confirm-add-cei.component.scss'], +}) +export class ConfirmAddCeiComponent implements OnInit { + + constructor() { } + + ngOnInit() {} + +} 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 62631565..70a9d157 100644 --- a/Mohem/src/app/hmg-common/services/connector/connector.service.ts +++ b/Mohem/src/app/hmg-common/services/connector/connector.service.ts @@ -27,8 +27,8 @@ export class ConnectorService { public static retryTimes = 0; public static timeOut = 120 * 1000; - public static host = 'https://uat.hmgwebservices.com/'; - // public static host = 'https://hmgwebservices.com/'; + // public static host = 'https://uat.hmgwebservices.com/'; + public static host = 'https://hmgwebservices.com/'; constructor(public httpClient: HttpClient, public cs: CommonService, From 57be247a0a635c9919083c5fd559a59bee1366b9 Mon Sep 17 00:00:00 2001 From: enadhilal Date: Thu, 20 Jan 2022 14:43:35 +0300 Subject: [PATCH 8/8] fixed change password in welcome page and added CONTACT request type in worklist --- .../confirm-login/confirm-login.component.ts | 87 ++++++++++++++++--- .../service/work-list.main.service.ts | 16 ++++ .../worklist-main.component.html | 8 +- .../worklist-main/worklist-main.component.ts | 17 ++++ Mohem/src/theme/styles.scss | 2 +- 5 files changed, 116 insertions(+), 14 deletions(-) diff --git a/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts b/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts index 4be507ff..10e04150 100644 --- a/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts +++ b/Mohem/src/app/authentication/confirm-login/confirm-login.component.ts @@ -12,7 +12,7 @@ import { GetLoginInfoResponse } from '../../hmg-common/services/authentication/m import { SMSCheckRequest } from 'src/app/hmg-common/services/authentication/models/smscheck.request'; import { SMSCheckResponse } from 'src/app/hmg-common/services/authentication/models/smscheck.response'; import { PushService } from 'src/app/hmg-common/services/push/push.service'; -import { ModalController, Platform } from '@ionic/angular'; +import { ModalController, Platform, AlertController } from '@ionic/angular'; import { CheckUserAuthenticationResponse } from 'src/app/hmg-common/services/authentication/models/check-user-auth.response'; import { LoginModel } from '../models/LoginModel'; import * as moment from 'moment'; @@ -20,6 +20,8 @@ import { CheckAppVersionResponse } from 'src/app/hmg-common/services/authenticat import { NFC } from "@ionic-native/nfc/ngx"; import { DigitalIdComponent } from '../digital-id/digital-id.component'; import { AppUpdateComponent } from '../app-update/app-update.component'; +import { Password } from '../models/password'; +import { CheckUserAuthenticationRequest } from 'src/app/hmg-common/services/authentication/models/check-user-auth.request'; @Component({ selector: 'app-confirm-login', @@ -54,7 +56,7 @@ export class ConfirmLoginComponent implements OnInit { direction: string; userInfo: any; public businessInfo: object; - + private checkUserResult: CheckUserAuthenticationResponse; constructor( public ts: TranslatorService, public cs: CommonService, @@ -64,6 +66,7 @@ export class ConfirmLoginComponent implements OnInit { public pushService: PushService, public platform: Platform, public modalController: ModalController, + public alertController: AlertController, private nfc: NFC ) { this.loginData = this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false); @@ -376,7 +379,7 @@ export class ConfirmLoginComponent implements OnInit { job_ar: result.MemberInformationList[0].JOB_NAME_Ar, mobile: result.MemberInformationList[0].MobileNumberWithZipCode, qr: result.MemberInformationList[0].BusinessCardQR, - company_logo: result.BC_Logo ? result.BC_Logo: result.CompanyImageURL, + company_logo: result.BC_Logo ? result.BC_Logo : result.CompanyImageURL, company_url: result.BC_Domain, company_type: result.CompanyMainCompany, email: result.MemberInformationList[0].EMPLOYEE_EMAIL_ADDRESS @@ -446,13 +449,77 @@ export class ConfirmLoginComponent implements OnInit { this.confirm(this.loginType); } else { if (result.IsPasswordExpired) { - // alert("dont forget to handelpresentPasswordExpiredDialog() "); - // this.presentPasswordExpiredDialog(); ***** + this.presentPasswordExpiredDialog(); } } }); } + async presentPasswordExpiredDialog() { + const alert = await this.alertController.create({ + header: this.ts.trPK('general', 'confirm'), + message: this.ts.trPK('login', 'password-expired'), + buttons: [ + { + text: this.ts.trPK('general', 'ok'), + handler: () => { + console.log('Confirm Okay'); + this.sharedData.setSharedData(true, Password.IS_EXPIRED_PSW); + this.userCheck(); + } + } + ] + }); + await alert.present(); + } + + public userCheck() { + this.cs.startLoading(); + const request = new CheckUserAuthenticationRequest(); + request.P_USER_NAME = this.username; + this.authService.checkUserAuthentication( + request, + () => { + /* Write code for error */ + }, this.ts.trPK('general', 'ok')).subscribe((result: CheckUserAuthenticationResponse) => { + if (this.cs.validResponse(result)) { + this.checkUserResult = result; + this.cs.stopLoading(); + this.sendSMSForForgotPassword(); + } + }); + } + + + private sendSMSForForgotPassword() { + this.cs.startLoading(); + const changePwdObj = new LoginRequest(); + changePwdObj.MobileNumber = this.checkUserResult.BasicMemberInformation.P_MOBILE_NUMBER; + changePwdObj.P_USER_NAME = this.username; + changePwdObj.P_MOBILE_NUMBER = this.checkUserResult.BasicMemberInformation.P_MOBILE_NUMBER; + this.authService.sendPublicSMS( + changePwdObj, + () => { + // this.sendSMSForForgotPassword(); + /* Write code for error */ + }, this.ts.trPK('general', 'ok')).subscribe((result: CheckUserAuthenticationResponse) => { + if (this.cs.validResponse(result)) { + this.checkUserResult = result; + console.log('2'); + console.log(result); + this.loginData.LogInTokenID = result.LogInTokenID; + this.loginData.P_USER_NAME = this.username; + // this.loginData.EmployeeName =result.MemberLoginList[0].EMPLOYEE_NAME; + + this.cs.sharedService.setSharedData(this.loginData.P_USER_NAME, LoginRequest.SHARED_DATA); + this.sharedData.setSharedData(this.loginData, AuthenticationService.LOGIN_DATA); + this.sharedData.setSharedData(true, Password.IS_FORGET_PSW); + this.cs.stopLoading(); + this.cs.openSMSPage(); + } + }); + } + private handleAppUpdate(result) { this.iosLink = result.IOSLink; this.androidLink = result.AndroidLink; @@ -478,14 +545,14 @@ export class ConfirmLoginComponent implements OnInit { }); } - async appUpdate(msg, result) { + async appUpdate(msg, result) { const modal = await this.modalController.create({ component: AppUpdateComponent, cssClass: 'app-update-modal-css', - componentProps: {'msg':msg} + componentProps: { 'msg': msg } }); modal.onDidDismiss().then((data) => { - this.handleAppUpdate(result); + this.handleAppUpdate(result); }); return await modal.present(); } @@ -517,9 +584,9 @@ export class ConfirmLoginComponent implements OnInit { let buttonSelected; this.buttons.forEach(element => { element.forEach(elementValue => { - if(typeNumber === elementValue.value){ + if (typeNumber === elementValue.value) { buttonSelected = elementValue; - }else{ + } else { elementValue.visible = false; } }); 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 bfd42c63..d83f642e 100644 --- a/Mohem/src/app/notification/service/work-list.main.service.ts +++ b/Mohem/src/app/notification/service/work-list.main.service.ts @@ -33,6 +33,7 @@ export class WorklistMainService { public static getBasicDetailNotificationBody = "Services/ERP.svc/REST/GET_BASIC_DET_NTF_BODY"; public static getPhoneNotificationBody = "Services/ERP.svc/REST/GET_PHONES_NOTIFICATION_BODY"; public static getTerminationNotificationBody = "Services/ERP.svc/REST/GET_TERM_NOTIFICATION_BODY"; + public static getContactNotificationBody = "Services/ERP.svc/REST/GET_CONTACT_NOTIFICATION_BODY"; public static getStampMSNotificationBody = "Services/ERP.svc/REST/GET_STAMP_MS_NOTIFICATION_BODY"; public static getStampNSNotificationBody = "Services/ERP.svc/REST/GET_STAMP_NS_NOTIFICATION_BODY"; public static getAddressNotificationBody = "Services/ERP.svc/REST/GET_ADDRESS_NOTIFICATION_BODY"; @@ -222,6 +223,21 @@ export class WorklistMainService { ); } + public getContactNotificationBody( + WorkListBodyRequest: any, + onError?: any, + errorLabel?: string + ): Observable { + const request = WorkListBodyRequest; + this.authService.authenticateRequest(request); + return this.api.post( + WorklistMainService.getContactNotificationBody, + request, + onError, + errorLabel + ); + } + public getPOItemHistory( POItemHistoryReq: any, onError?: any, 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 dd8138e2..c093dc71 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.html +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.html @@ -48,7 +48,8 @@ @@ -293,9 +294,10 @@ - +
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 3cfa8951..5fcabd74 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts @@ -292,6 +292,8 @@ export class WorklistMainComponent implements OnInit { this.getTerminationNotificationDetails(this.WorkListBodyObj); } else if (this.getPassNotificationDetails.REQUEST_TYPE === 'PHONE_NUMBERS') { this.getPhoneNotificationDetails(this.WorkListBodyObj); + } else if (this.getPassNotificationDetails.REQUEST_TYPE === 'CONTACT') { + this.getContactNotificationDetails(this.WorkListBodyObj); } } @@ -327,6 +329,14 @@ export class WorklistMainComponent implements OnInit { }); } + getContactNotificationDetails(notificationBodyObj) { + this.worklistMainService + .getContactNotificationBody(notificationBodyObj) + .subscribe((result: PRNotificatonBodyResponse) => { + this.handleWorkListBodyResult(result, "CONTACT"); + }); + } + getBasicDetailsNotification(notificationBodyObj) { this.worklistMainService .getBasicDetailNotificationBody(notificationBodyObj) @@ -455,6 +465,13 @@ export class WorklistMainComponent implements OnInit { console.log(result); } } + else if (Type === "CONTACT"){ + if (result.GetContactNotificationBodyList) { + this.notificationBodyRes = + result.GetContactNotificationBodyList.ContactNotificationBody; + console.log(result); + } + } } } //End handleWorkListBodyResult diff --git a/Mohem/src/theme/styles.scss b/Mohem/src/theme/styles.scss index ea426604..73c0b0a2 100644 --- a/Mohem/src/theme/styles.scss +++ b/Mohem/src/theme/styles.scss @@ -1176,7 +1176,7 @@ border:0px } .logoHeader { - max-width: 130%; + max-width: 90%; width: 130%; border: 0px; }