From 6d3dd907a608c3740a61b150ce6e5e840f437172 Mon Sep 17 00:00:00 2001 From: ashwaq Date: Mon, 27 Jan 2020 11:50:18 +0300 Subject: [PATCH] fix attend-tracking --- .../attendance-tracking/home/home.component.html | 4 ++-- .../attendance-tracking/home/home.component.ts | 15 +++++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Mohem/src/app/attendance-tracking/home/home.component.html b/Mohem/src/app/attendance-tracking/home/home.component.html index a391e4e3..b99c4ead 100644 --- a/Mohem/src/app/attendance-tracking/home/home.component.html +++ b/Mohem/src/app/attendance-tracking/home/home.component.html @@ -19,7 +19,7 @@
-
@@ -28,7 +28,7 @@ {{ts.trPK('attendance-tracking','shift-time')}}

- 08:00 - 17:00 + {{attendanceTrackingList.P_SHT_NAME}}
diff --git a/Mohem/src/app/attendance-tracking/home/home.component.ts b/Mohem/src/app/attendance-tracking/home/home.component.ts index 73884a0a..422355c2 100644 --- a/Mohem/src/app/attendance-tracking/home/home.component.ts +++ b/Mohem/src/app/attendance-tracking/home/home.component.ts @@ -13,7 +13,7 @@ export class HomeComponent implements OnInit { attendanceTrackingList:any =[]; cuurentDate:any; direction: string; - checkOut:boolean= true; + isCheckOut:boolean= false; constructor( public cs:CommonService, @@ -27,7 +27,7 @@ export class HomeComponent implements OnInit { this.direction = TranslatorService.getCurrentLanguageName(); this.cuurentDate =this.getHeaderDate(this.cuurentDate); //**condition to check is checkout or not to display PUSE Button** - // if(ischeckOut){ + // if(ischeckOutP_REMAINING_HOURS){ // this.checkOut=true; // }else{ // this.checkOut=false; @@ -49,8 +49,15 @@ export class HomeComponent implements OnInit { public handleRespondGetAttendanceTracking(result){ if (this.cs.validResponse(result)) { + if(result.GetAttendanceTrackingList != null){ this.attendanceTrackingList=result.GetAttendanceTrackingList; - + //**condition to check is checkout or not to display PUSE Button** + if(this.attendanceTrackingList.P_REMAINING_HOURS ==='00:00'){ + this.isCheckOut=true; + }else{ + this.isCheckOut=false; + } + } } } @@ -70,7 +77,7 @@ openDialog(){ this.cs.confirmAlertDialogAttendance( () => { //to open scan(); - + //this.cs.openScan(); }, this.ts.trPK('general', 'ok'), () => {}, this.ts.trPK('general', 'cancel'), this.ts.trPK('vacation-rule', 'confirmation'),