issue-22 #61
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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()]);
|
||||
})
|
||||
|
@ -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()]);
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user