issue-22 #61

Merged
sebastian merged 2 commits from issue-22 into master 2023-11-13 19:21:45 +01:00
5 changed files with 50 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

@ -11,6 +11,11 @@ export interface NavigationLink {
styleUrls: ['./navigation-link-list.component.css']
})
export class NavigationLinkListComponent implements OnInit{
resetComponent(defaultNavigationLinkPath: NavigationLink[]) {
this.navigationLinks = defaultNavigationLinkPath;
console.log("Navigation Links: ")
console.log(this.navigationLinks)
}
@ -27,7 +32,10 @@ export class NavigationLinkListComponent implements OnInit{
}
if(this.navigationLinks.find(searchedLink => searchedLink.linkText === linkText) === undefined) {
console.log("Test")
this.navigationLinks.push(navigationLink);
} else {
console.log(linkText)
}
}

View File

@ -40,13 +40,24 @@ export class TaskgroupDashboardComponent implements OnInit {
ngOnInit(): void {
this.activatedRoute.paramMap.subscribe(params => {
if(params.has('taskgroupID')) {
console.log("Update of taskgroup")
this.taskgroupID = Number(params.get('taskgroupID'));
this.taskgroupService.taskgroupsTaskgroupIDGet(this.taskgroupID).subscribe({
next: resp => {
this.taskgroups = resp.children
this.taskgroupPath = resp.ancestors
this.taskgroup = resp.taskgroupInfo;
this.navLinkListComponent!.addNavigationLink(this.taskgroup.taskgroupName, ['/taskgroups', this.taskgroup.taskgroupID.toString()])
this.navLinkListComponent!.resetComponent([
{
linkText: "Dashboard",
routerLink: ['/']
},
{
linkText: "Taskgroups",
routerLink: ["/taskgroups"]
}
]);
console.log(this.taskgroups)
this.taskgroupPath.forEach(taskgroupEntity => {
this.navLinkListComponent!.addNavigationLink(taskgroupEntity.taskgroupName, ['/taskgroups', taskgroupEntity.taskgroupID.toString()]);
})

View File

@ -49,7 +49,16 @@ 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.navLinkListComponent!.resetComponent([
{
linkText: "Dashboard",
routerLink: ['/']
},
{
linkText: "Taskgroups",
routerLink: ["/taskgroups"]
}
]);
this.taskgroupPath.forEach(taskgroupEntity => {
this.navLinkListComponent!.addNavigationLink(taskgroupEntity.taskgroupName, ['/taskgroups', taskgroupEntity.taskgroupID.toString()]);
})