diff --git a/backend/.idea/workspace.xml b/backend/.idea/workspace.xml index 956826a..5c2bae0 100644 --- a/backend/.idea/workspace.xml +++ b/backend/.idea/workspace.xml @@ -6,6 +6,7 @@ + diff --git a/backend/src/main/java/core/entities/timemanager/Taskgroup.java b/backend/src/main/java/core/entities/timemanager/Taskgroup.java index 6fc92e1..bdf42ca 100644 --- a/backend/src/main/java/core/entities/timemanager/Taskgroup.java +++ b/backend/src/main/java/core/entities/timemanager/Taskgroup.java @@ -92,11 +92,13 @@ public class Taskgroup { public static List getAncestorList(Taskgroup taskgroup) { List ancestors = new ArrayList<>(); Taskgroup currentTaskgroup = taskgroup; + ancestors.add(taskgroup); while(currentTaskgroup.parent != null) { ancestors.add(currentTaskgroup.parent); currentTaskgroup = currentTaskgroup.parent; } - //ancestors.add(taskgroup); + + Collections.reverse(ancestors); return ancestors; } diff --git a/frontend/src/app/taskgroups/taskgroup-dashboard/taskgroup-dashboard.component.ts b/frontend/src/app/taskgroups/taskgroup-dashboard/taskgroup-dashboard.component.ts index 5dafbf6..9ee49d0 100644 --- a/frontend/src/app/taskgroups/taskgroup-dashboard/taskgroup-dashboard.component.ts +++ b/frontend/src/app/taskgroups/taskgroup-dashboard/taskgroup-dashboard.component.ts @@ -46,7 +46,6 @@ export class TaskgroupDashboardComponent implements OnInit { this.taskgroups = resp.children this.taskgroupPath = resp.ancestors this.taskgroup = resp.taskgroupInfo; - this.navLinkListComponent!.addNavigationLink(this.taskgroup.taskgroupName, ['/taskgroups', this.taskgroup.taskgroupID.toString()]) this.taskgroupPath.forEach(taskgroupEntity => { this.navLinkListComponent!.addNavigationLink(taskgroupEntity.taskgroupName, ['/taskgroups', taskgroupEntity.taskgroupID.toString()]); }) diff --git a/frontend/src/app/tasks/task-detail-overview/task-detail-overview.component.ts b/frontend/src/app/tasks/task-detail-overview/task-detail-overview.component.ts index 70061af..0ee9eac 100644 --- a/frontend/src/app/tasks/task-detail-overview/task-detail-overview.component.ts +++ b/frontend/src/app/tasks/task-detail-overview/task-detail-overview.component.ts @@ -49,7 +49,6 @@ export class TaskDetailOverviewComponent implements OnInit { this.taskgroups = resp.children this.taskgroupPath = resp.ancestors this.taskgroup = resp.taskgroupInfo; - this.navLinkListComponent!.addNavigationLink(this.taskgroup.taskgroupName, ['/taskgroups', this.taskgroup.taskgroupID.toString()]) this.taskgroupPath.forEach(taskgroupEntity => { this.navLinkListComponent!.addNavigationLink(taskgroupEntity.taskgroupName, ['/taskgroups', taskgroupEntity.taskgroupID.toString()]); })