fix attend-tracking

MOHEMM-Q3-DEV-LATEST
ashwaq 6 years ago
parent 81504b0491
commit 6d3dd907a6

@ -19,7 +19,7 @@
</div>
<div *ngIf="attendanceTrackingList" class="tracking-content">
<div class="divstopBtn">
<button ngIf="!checkOut"(click)="openDialog();" class="stopBtn" ion-button>
<button *ngIf="!isCheckOut"(click)="openDialog();" class="stopBtn" ion-button>
<ion-icon class="stopicon" name="pause"></ion-icon>
</button>
</div>
@ -28,7 +28,7 @@
<ion-row class="rowBorder">
<ion-label class="shift-title">{{ts.trPK('attendance-tracking','shift-time')}}</ion-label>
<br /><br />
<ion-label class="shift-text shift-title">08:00 - 17:00 </ion-label>
<ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SHT_NAME}} </ion-label>
</ion-row>
<ion-row class="rowBorder">
<ion-col class="colBorder">

@ -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'),

Loading…
Cancel
Save