fixed timer issues

master
Salman Afzal 6 years ago
parent 9ff40c0e1e
commit 561428ee62

@ -99,8 +99,11 @@ export class HomeComponent implements OnInit {
this.scheduledTime = this.convertInSeconds(data.P_SCHEDULED_HOURS.split(':'));
this.spentHours = this.convertInSeconds(data.P_SPENT_HOURS.split(':'));
this.isCheckedIn = this.spentHours === 0 ? false : true;
if (this.isCheckedIn) {
if (this.isCheckedIn && this.remainingTime != 0) {
this.initTimer();
} else if (this.isCheckedIn && this.remainingTime === 0) {
this.displayTime = '00:00:00';
this.percent = 100;
}
}

@ -580,8 +580,10 @@ convertAndAssignTime(data) {
this.scheduledTime = this.convertInSeconds(data.P_SCHEDULED_HOURS.split(':'));
this.spentHours = this.convertInSeconds(data.P_SPENT_HOURS.split(':'));
this.isCheckedIn = this.spentHours === 0 ? false : true;
if (this.isCheckedIn) {
if (this.isCheckedIn && this.remainingTime != 0) {
this.initTimer();
} else if (this.isCheckedIn && this.remainingTime === 0) {
this.percent = 100;
}
}

Loading…
Cancel
Save