mirror of
https://github.com/simon987/task_tracker.git
synced 2025-04-16 00:46:47 +00:00
Fix ETA
This commit is contained in:
parent
964fb98347
commit
e09e16e0fd
@ -404,7 +404,11 @@ export class ProjectDashboardComponent implements OnInit {
|
|||||||
|
|
||||||
private calculateEta() {
|
private calculateEta() {
|
||||||
if (this.snapshots.length > 0) {
|
if (this.snapshots.length > 0) {
|
||||||
this.eta = moment.utc(this.snapshots[0].new_task_count / this.avgTask * 1000).format('D[d] HH[h]mm[m]ss[s]');
|
let new_tasks = this.snapshots[this.snapshots.length - 1].new_task_count;
|
||||||
|
if (new_tasks === 0) {
|
||||||
|
this.eta = 'N/A';
|
||||||
|
}
|
||||||
|
this.eta = moment.utc(new_tasks / this.avgTask * 1000).format('D[d] HH[h]mm[m]ss[s]');
|
||||||
} else {
|
} else {
|
||||||
this.eta = 'N/A';
|
this.eta = 'N/A';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user