diff --git a/Mohem/src/app/time-card/select-period/select-period.component.html b/Mohem/src/app/time-card/select-period/select-period.component.html index a3aed0b3..0bc9515f 100644 --- a/Mohem/src/app/time-card/select-period/select-period.component.html +++ b/Mohem/src/app/time-card/select-period/select-period.component.html @@ -11,7 +11,7 @@ display-format="DD/MM/YYYY" [min]="1900" [max]="2100" - [(ngModel)]="selectFromDate" + [(ngModel)]="dateFrom" doneText="Done" cancelText="Cancel" > @@ -26,7 +26,7 @@ display-format="DD/MM/YYYY" [min]="1900" [max]="2100" - [(ngModel)]="selectToDate" + [(ngModel)]="dateTo" doneText="Done" cancelText="Cancel" > 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 f3cafbbc..5ecc7a18 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 @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { ModalController } from '@ionic/angular'; +import { ModalController, NavParams } from '@ionic/angular'; import { CommonService } from 'src/app/hmg-common/services/common/common.service'; import { TimeCardService } from 'src/app/time-card/service/time-card.service'; @@ -10,83 +10,111 @@ import { TimeCardService } from 'src/app/time-card/service/time-card.service'; }) export class SelectPeriodComponent implements OnInit { public shiftTypesArray: any = []; - public selectFromDate: any; - public selectToDate: any; + public dateFrom: any; + public dateTo: any; public selectedShiftType: any; public filtersArray: any = [ { name: 'Excess', active: false, + key: 'P_EXCESS_FLAG', + value: '' }, { name: 'Timeback', active: false, + key: 'P_TIMEBACK_FLAG', + value: '' }, { name: 'Comp Off', active: false, + key: 'P_COMP_OFF_FLAG', + value: '' }, { name: 'Non scheduled', active: false, + key: 'P_NON_SCHEDULED_FLAG', + value: '' }, { name: 'Late In', active: false, + key: 'P_LATE_IN_FLAG', + value: '' }, { name: 'Early Out', active: false, + key: 'P_EARLY_OUT_FLAG', + value: '' }, { name: 'Shortage', active: false, + key: 'P_SHORTAGE_FLAG', + value: '' }, { name: 'Missing Swipe', active: false, + key: 'P_MISSING_SWIPE_FLAG', + value: '' }, { name: 'Work On Break', active: false, + key: 'P_ACTUAL_WOB_SEC', + value: '' }, { name: 'Analyzed', active: false, + key: 'P_ANALAYZED_FLAG', + value: '' }, { name: 'Approved Timeback', active: false, + key: 'P_APPR_TIMEBACK_FLAG', + value: '' }, ]; constructor( public modalController: ModalController, public common: CommonService, - public timeCardService: TimeCardService) { } + public timeCardService: TimeCardService, + public navParams: NavParams) { } ngOnInit() { this.getShiftTypes(); + this.dateFrom = this.navParams.get('dateFrom'); + this.dateTo = this.navParams.get('dateTo'); } public dismissModal() { - const selectedFilters: any = []; + const selectedFilters: any = {}; for (const filter of this.filtersArray) { - if (filter.active) { - selectedFilters.push(filter); - } + selectedFilters[filter.key] = filter; } this.modalController.dismiss({ dismissed: true, - selectedFiltersArray: selectedFilters, + keySelectedFilters: selectedFilters, selectedShiftType: this.selectedShiftType, - selectFromDate: this.selectFromDate, - selectToDate: this.selectToDate + dateFrom: this.dateFrom, + dateTo: this.dateTo }); } public changeFiltersSelection(i: any) { this.filtersArray[i].active = !this.filtersArray[i].active; + if (this.filtersArray[i].active) { + this.filtersArray[i].value = 'Y'; + } else { + this.filtersArray[i].value = ''; + } } public getShiftTypes() { diff --git a/Mohem/src/app/time-card/shift-details/shift-details.component.html b/Mohem/src/app/time-card/shift-details/shift-details.component.html index 8882ea7f..2e8a1ee3 100644 --- a/Mohem/src/app/time-card/shift-details/shift-details.component.html +++ b/Mohem/src/app/time-card/shift-details/shift-details.component.html @@ -8,10 +8,11 @@ -
+
-

Days

+

Shift details

+

{{ shiftData.SCHEDULE_DATE | date }}

@@ -113,6 +114,78 @@
- No results Found + + +

Employee Swipe(s)

+

{{ swipeData.SCHEDULE_DATE | date }}

+ + + + + Swipe Date + + + {{swipeData.SWIPE_DATE}} + + + + + Swipe Time + + + {{swipeData.SWIPE_TIME}} + + + + + Swipe Status + + + {{swipeData.SWIPE_STATUS}} + + + + + Machine Location + + + {{swipeData.MACHINE_LOCATION}} + + + + + Unit Number + + + {{swipeData.UNIT_NUMBER}} + + + + + Unit Name + + + {{swipeData.UNIT_NAME}} + + + + + Exclude + + + {{swipeData.EXCLUDE_FLAG}} + + + + + Error Message + + + {{swipeData.RETURN_MESSAGE}} + + + +
+
\ No newline at end of file diff --git a/Mohem/src/app/time-card/shift-details/shift-details.component.ts b/Mohem/src/app/time-card/shift-details/shift-details.component.ts index 6d5ffb67..1362b9ff 100644 --- a/Mohem/src/app/time-card/shift-details/shift-details.component.ts +++ b/Mohem/src/app/time-card/shift-details/shift-details.component.ts @@ -14,8 +14,8 @@ import * as moment from 'moment'; }) export class ShiftDetailsComponent implements OnInit { public selectedShift: any; - public shiftDetailsData: any; - public swipeDetailsData: any; + public shiftDetailsData: any = []; + public swipeDetailsData: any = []; constructor( public timeCardService: TimeCardService, public common: CommonService, @@ -54,7 +54,7 @@ export class ShiftDetailsComponent implements OnInit { this.timeCardService.getSwipes(GetSwipesRequestObject).subscribe((result) => { if (this.common.validResponse(result)) { console.log(result); - // this.swipeDetailsData = result.GetDayHoursTypeDetailsList; + this.swipeDetailsData = result.GetSwipesList; } }); } diff --git a/Mohem/src/app/time-card/time-card-details/time-card-details.component.html b/Mohem/src/app/time-card/time-card-details/time-card-details.component.html index cdc6e93c..0e0123e6 100644 --- a/Mohem/src/app/time-card/time-card-details/time-card-details.component.html +++ b/Mohem/src/app/time-card/time-card-details/time-card-details.component.html @@ -1,7 +1,7 @@ - + My Time Card @@ -266,51 +266,16 @@
-
- +
+ -

Today's time card details

+

{{ dayHours.SCHEDULE_DATE | date }}

+

Time card details

- - @@ -402,11 +367,17 @@
+
+
+ + +
+
+ +
-
-