Deliver Task only if it is no subtask to TaskOverview
All checks were successful
Java CI with Maven / build-and-push-frontend (push) Successful in 7s
Java CI with Maven / build-and-push-backend (push) Successful in 8s

This commit is contained in:
Sebastian Böckelmann 2024-03-16 14:18:43 +01:00
parent dfe12e6102
commit 125ab10a00

View File

@ -31,10 +31,13 @@ public class RecursiveTaskgroupInfo {
} }
for(Task task : taskgroup.getActiveTasks()) { for(Task task : taskgroup.getActiveTasks()) {
this.activeTasks.add(new TaskOverviewInfo(task)); if(task.getParent() == null) {
if(task.getDeadline() != null && task.getDeadline().isBefore(LocalDate.now())) { this.activeTasks.add(new TaskOverviewInfo(task));
this.hasOverdueTask = true; if(task.getDeadline() != null && task.getDeadline().isBefore(LocalDate.now())) {
this.hasOverdueTask = true;
}
} }
} }
this.amountActiveTasks = taskgroup.getAmountOfActiveTasks(); this.amountActiveTasks = taskgroup.getAmountOfActiveTasks();
} }