
<app-generic-header
  class="attendance-home"
  backLink="/home"
  showBack="true">
</app-generic-header>

<ion-content>
  <div class="timer-chart">
    <ion-label class="shift-title" style="font-weight: bold; font-size: 20px;"> {{curentDate}}</ion-label><br/>
    <ion-label class="shift-title">  {{ts.trPK('attendance-tracking','today-time-left')}}</ion-label>
  
    <div class="fixed-shift-timer">
      <circle-progress
        [titleFontSize]= '3'
        [percent]="percent"
        [radius]="8"
        [outerStrokeWidth]="0.25"
        [innerStrokeWidth]="0.25"
        [outerStrokeColor]="'#3cb9d5'"
        [innerStrokeColor]="'rgba(0,0,0,0.3)'"
        [animation]="true"
        [animationDuration]="300"
        [responsive]="true"
        [space]="-0.25"
        [startFromZero]="false"
        [title]="displayTime"
        titleFontWeight="bold"
        [titleColor]="'#ffffff'"
        [showUnits]="false"
        [showSubtitle]="false"
        [subtitleColor]="'#ffffff'"
        [clockwise]="false"
        [renderOnClick]="false">
  </circle-progress>
    </div>
  </div>
  <div *ngIf="attendanceTrackingList" class="tracking-content">
    <div class="divstopBtn">
      <button *ngIf="isCheckedIn"(click)="openDialog();" class="stopBtn" ion-button>
        <ion-icon class="stopicon" name="pause"></ion-icon>
      </button>
    </div>
    <ion-grid>
      <ion-row class="rowBorder">
        <ion-col [size]="12" class="colBorder-generic" style="border-right: none;">
          <ion-label class="shift-title">{{ts.trPK('attendance-tracking','shift-time')}}</ion-label>
          <ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SHT_NAME}} </ion-label>
        </ion-col>
      </ion-row>
      <ion-row class="rowBorder">
        <ion-col [size]="6" class="colBorder-generic">
          <ion-label class="shift-title"> {{ts.trPK('attendance-tracking','check-in')}}</ion-label>
          <ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SWIPE_IN | slice:0:-3}}</ion-label>
        </ion-col>
        <ion-col [size]="6" class="colBorder-generic" [ngClass]=" direction === 'en' ?  'colBorder-generic-en' : 'colBorder-generic-ar'">
          <ion-label class="shift-title"> {{ts.trPK('attendance-tracking','check-out')}}</ion-label>
          <ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SWIPE_OUT | slice:0:-3}}</ion-label> 
        </ion-col>
      </ion-row>
      <ion-row style="text-align: center">
        <ion-col [size]="6" class="colBorder-generic">
          <ion-label class="shift-title"> {{ts.trPK('attendance-tracking','late-in')}}</ion-label>
          <ion-label class="shift-text shift-title">{{attendanceTrackingList.P_LATE_IN_HOURS | slice:0:-3}}</ion-label>
        </ion-col>
        <ion-col [size]="6" class="colBorder-generic" [ngClass]=" direction === 'en' ?  'colBorder-generic-en' : 'colBorder-generic-ar'">
          <ion-label class="shift-title"> {{ts.trPK('attendance-tracking','regular')}}</ion-label>
          <ion-label class="shift-text shift-title">{{attendanceTrackingList.P_SCHEDULED_HOURS | slice:0:-3}} </ion-label>
        </ion-col>
      </ion-row>
    </ion-grid>
  </div>
</ion-content>