issue-52 #64

Merged
sebastian merged 17 commits from issue-52 into docker-deployment 2023-11-13 22:48:50 +01:00
3 changed files with 30 additions and 0 deletions
Showing only changes of commit 1e492a9111 - Show all commits

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,12 +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!.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,6 +49,16 @@ export class TaskDetailOverviewComponent implements OnInit {
this.taskgroups = resp.children
this.taskgroupPath = resp.ancestors
this.taskgroup = resp.taskgroupInfo;
this.navLinkListComponent!.resetComponent([
{
linkText: "Dashboard",
routerLink: ['/']
},
{
linkText: "Taskgroups",
routerLink: ["/taskgroups"]
}
]);
this.taskgroupPath.forEach(taskgroupEntity => {
this.navLinkListComponent!.addNavigationLink(taskgroupEntity.taskgroupName, ['/taskgroups', taskgroupEntity.taskgroupID.toString()]);
})