Fix order of navigation link list
All checks were successful
Java CI with Maven / build (push) Successful in 44s

This commit is contained in:
Sebastian Böckelmann 2023-11-13 19:11:55 +01:00
parent db6e40e713
commit 2477f32d0b
4 changed files with 20 additions and 8 deletions

View File

@ -6,6 +6,7 @@
<component name="ChangeListManager">
<list default="true" id="3a869f59-290a-4ab2-b036-a878ce801bc4" name="Changes" comment="Edit and Delete in Draggable Scheduler">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/core/entities/timemanager/Taskgroup.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/core/entities/timemanager/Taskgroup.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -24,7 +25,7 @@
<component name="Git.Settings">
<option name="RECENT_BRANCH_BY_REPOSITORY">
<map>
<entry key="$PROJECT_DIR$/.." value="docker-deployment" />
<entry key="$PROJECT_DIR$/.." value="master" />
</map>
</option>
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
@ -176,11 +177,11 @@
</configuration>
<recent_temporary>
<list>
<item itemvalue="JUnit.ScheduleServiceTest.scheduleNow" />
<item itemvalue="JUnit.ScheduleServiceTest.editBasicSchedule" />
<item itemvalue="JUnit.ScheduleServiceTest.editscheduleAdvanced" />
<item itemvalue="JUnit.ScheduleServiceTest.scheduleAdvanced" />
<item itemvalue="JUnit.TaskServiceTest" />
<item itemvalue="JUnit.ScheduleServiceTest.scheduleNow" />
<item itemvalue="JUnit.ScheduleServiceTest.scheduleAdvanced" />
<item itemvalue="JUnit.ScheduleServiceTest.editscheduleAdvanced" />
<item itemvalue="JUnit.ScheduleServiceTest.editBasicSchedule" />
</list>
</recent_temporary>
</component>
@ -220,6 +221,7 @@
<workItem from="1699639316405" duration="9267000" />
<workItem from="1699684493731" duration="1121000" />
<workItem from="1699769541677" duration="7576000" />
<workItem from="1699898375418" duration="325000" />
</task>
<task id="LOCAL-00001" summary="Structure Taskgroups in Hierarchies">
<option name="closed" value="true" />
@ -646,6 +648,16 @@
<line>83</line>
<option name="timeStamp" value="36" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/core/entities/timemanager/Taskgroup.java</url>
<line>99</line>
<option name="timeStamp" value="37" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/core/entities/timemanager/Taskgroup.java</url>
<line>100</line>
<option name="timeStamp" value="38" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
</component>

View File

@ -92,11 +92,13 @@ public class Taskgroup {
public static List<Taskgroup> getAncestorList(Taskgroup taskgroup) {
List<Taskgroup> 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;
}

View File

@ -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()]);
})

View File

@ -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()]);
})