-
-
- Dashboard
- / Taskgroups
-
-
+
@@ -16,13 +11,13 @@
-
+ = 0">
-
+
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 9f30de6..5dafbf6 100644
--- a/frontend/src/app/taskgroups/taskgroup-dashboard/taskgroup-dashboard.component.ts
+++ b/frontend/src/app/taskgroups/taskgroup-dashboard/taskgroup-dashboard.component.ts
@@ -7,6 +7,7 @@ import {ActivatedRoute} from "@angular/router";
import {TaskEditorComponent} from "../../tasks/task-editor/task-editor.component";
import {TaskEditorData} from "../../tasks/task-editor/TaskEditorData";
import {TaskDashboardComponent} from "../../tasks/task-dashboard/task-dashboard.component";
+import {NavigationLink, NavigationLinkListComponent} from "../../navigation-link-list/navigation-link-list.component";
@Component({
selector: 'app-taskgroup-dashboard',
@@ -20,8 +21,21 @@ export class TaskgroupDashboardComponent implements OnInit {
private activatedRoute: ActivatedRoute) { }
taskgroups: TaskgroupEntityInfo[] = []
+ taskgroup: TaskgroupEntityInfo | undefined
+ taskgroupPath: TaskgroupEntityInfo[] = []
taskgroupID: number = -1;
@ViewChild("taskDashboard") taskDashboard: TaskDashboardComponent | undefined
+ @ViewChild('navLinkList') navLinkListComponent: NavigationLinkListComponent | undefined
+ defaultNavigationLinkPath: NavigationLink[] = [
+ {
+ linkText: "Dashboard",
+ routerLink: ['/']
+ },
+ {
+ linkText: "Taskgroups",
+ routerLink: ["/taskgroups"]
+ }
+ ]
ngOnInit(): void {
this.activatedRoute.paramMap.subscribe(params => {
@@ -29,7 +43,13 @@ export class TaskgroupDashboardComponent implements OnInit {
this.taskgroupID = Number(params.get('taskgroupID'));
this.taskgroupService.taskgroupsTaskgroupIDGet(this.taskgroupID).subscribe({
next: resp => {
- this.taskgroups = 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.taskgroupPath.forEach(taskgroupEntity => {
+ this.navLinkListComponent!.addNavigationLink(taskgroupEntity.taskgroupName, ['/taskgroups', taskgroupEntity.taskgroupID.toString()]);
+ })
}
})
} else {
diff --git a/openapi.yaml b/openapi.yaml
index a4b4cf8..fe57c4d 100644
--- a/openapi.yaml
+++ b/openapi.yaml
@@ -654,9 +654,8 @@ paths:
content:
'application/json':
schema:
- type: array
- items:
- $ref: '#/components/schemas/TaskgroupEntityInfo'
+ type: object
+ $ref: '#/components/schemas/TaskgroupDetailInfo'
403:
description: No permission
content:
@@ -1328,7 +1327,6 @@ components:
required:
- taskgroupID
- taskgroupName
- - parentTaskgroup
additionalProperties: false
properties:
taskgroupID:
@@ -1341,9 +1339,6 @@ components:
example: Taskgroup 1
maxLength: 255
minLength: 1
- parentTaskgroup:
- type: object
- $ref: '#/components/schemas/TaskgroupEntityInfo'
TaskgroupFieldInfo:
required:
- name
@@ -1360,6 +1355,24 @@ components:
type: number
description: internal id of parent Taskgroup
example: 1
+ TaskgroupDetailInfo:
+ required:
+ - children
+ - ancestors
+ - taskgroupInfo
+ additionalProperties: false
+ properties:
+ children:
+ type: array
+ items:
+ $ref: '#/components/schemas/TaskgroupEntityInfo'
+ ancestors:
+ type: array
+ items:
+ $ref: '#/components/schemas/TaskgroupEntityInfo'
+ taskgroupInfo:
+ type: object
+ $ref: '#/components/schemas/TaskgroupEntityInfo'
TaskEntityInfo:
required:
- taskID