fix-issue-81 #88
@ -41,6 +41,7 @@ export class TaskDetailOverviewComponent implements OnInit {
|
||||
|
||||
task: TaskEntityInfo | undefined
|
||||
schedules: ScheduleInfo[] = []
|
||||
schedulesLoaded: boolean = false;
|
||||
|
||||
taskStatus: string = "🟢"
|
||||
|
||||
@ -88,6 +89,7 @@ export class TaskDetailOverviewComponent implements OnInit {
|
||||
this.scheduleService.schedulesTaskIDGet(Number(params.get('taskID'))).subscribe({
|
||||
next: resp => {
|
||||
this.schedules = resp;
|
||||
this.schedulesLoaded = true;
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -97,7 +99,7 @@ export class TaskDetailOverviewComponent implements OnInit {
|
||||
getStatusOfTask(task: TaskEntityInfo ) {
|
||||
if(moment(task.deadline, 'YYYY-MM-DDTHH:mm:ss.SSSZ').isBefore(moment())) {
|
||||
return "🔴";
|
||||
} else if(this.schedules.length == 0){
|
||||
} else if(this.schedules.length == 0 && this.schedulesLoaded){
|
||||
return "🟠";
|
||||
} else {
|
||||
return "🟢";
|
||||
|
Loading…
Reference in New Issue
Block a user