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