diff --git a/frontend/src/app/dashboard/dashboard.component.ts b/frontend/src/app/dashboard/dashboard.component.ts
index 07cf48d..b0da6e9 100644
--- a/frontend/src/app/dashboard/dashboard.component.ts
+++ b/frontend/src/app/dashboard/dashboard.component.ts
@@ -3,6 +3,7 @@ import {BasicScheduleEntityInfo, ScheduleInfo, ScheduleService, TaskOverviewInfo
import {ActiveScheduleComponent} from "./active-schedule/active-schedule.component";
import {StopActiveScheduleInfo} from "./active-schedule/StopActiveScheduleInfo";
import {TaskOverviewComponent} from "./task-overview/task-overview.component";
+import {TaskOverviewData} from "./taskgroup-overview/taskgroup-overview.component";
@Component({
selector: 'app-dashboard',
@@ -16,6 +17,7 @@ export class DashboardComponent implements OnInit{
workedMinutesToday: number = 0
tasks: TaskOverviewInfo[] = []
+ selectedTaskgroupID: number | undefined
@ViewChild('activeSchedule') activeScheduleComponent: ActiveScheduleComponent | undefined
constructor(private scheduleService: ScheduleService) {
@@ -55,8 +57,9 @@ export class DashboardComponent implements OnInit{
protected readonly TaskOverviewComponent = TaskOverviewComponent;
- onSelectTaskgroup(tasks: TaskOverviewInfo[]) {
- this.tasks = tasks;
+ onSelectTaskgroup(taskOverviewData: TaskOverviewData) {
+ this.tasks = taskOverviewData.tasks;
+ this.selectedTaskgroupID = taskOverviewData.taskgroupID;
}
onStartTaskNow(schedule: ScheduleInfo) {
diff --git a/frontend/src/app/dashboard/task-overview/task-overview.component.html b/frontend/src/app/dashboard/task-overview/task-overview.component.html
index 56aa9df..b0b45fa 100644
--- a/frontend/src/app/dashboard/task-overview/task-overview.component.html
+++ b/frontend/src/app/dashboard/task-overview/task-overview.component.html
@@ -8,7 +8,7 @@
-
+
diff --git a/frontend/src/app/dashboard/task-overview/task-overview.component.ts b/frontend/src/app/dashboard/task-overview/task-overview.component.ts
index 7d25357..aebc19c 100644
--- a/frontend/src/app/dashboard/task-overview/task-overview.component.ts
+++ b/frontend/src/app/dashboard/task-overview/task-overview.component.ts
@@ -10,6 +10,7 @@ import {MatSnackBar} from "@angular/material/snack-bar";
export class TaskOverviewComponent {
@Input() tasks: TaskOverviewInfo[] = []
+ @Input() taskgroupID: number | undefined
@Output('onStartNow') startNowEmitter: EventEmitter
= new EventEmitter();
@Output('onFinished') finishedEmitter: EventEmitter = new EventEmitter();
diff --git a/frontend/src/app/dashboard/taskgroup-overview/taskgroup-overview.component.html b/frontend/src/app/dashboard/taskgroup-overview/taskgroup-overview.component.html
index 5da9649..f37e1d0 100644
--- a/frontend/src/app/dashboard/taskgroup-overview/taskgroup-overview.component.html
+++ b/frontend/src/app/dashboard/taskgroup-overview/taskgroup-overview.component.html
@@ -7,7 +7,7 @@
-
+
{{node.activeTasks}}
@@ -21,7 +21,7 @@
-
+
{{node.activeTasks}}
diff --git a/frontend/src/app/dashboard/taskgroup-overview/taskgroup-overview.component.ts b/frontend/src/app/dashboard/taskgroup-overview/taskgroup-overview.component.ts
index 4cebf7c..c17aa39 100644
--- a/frontend/src/app/dashboard/taskgroup-overview/taskgroup-overview.component.ts
+++ b/frontend/src/app/dashboard/taskgroup-overview/taskgroup-overview.component.ts
@@ -17,6 +17,12 @@ interface ExampleFlatNode {
activeTasks: number;
hasOverdueTask: boolean;
tasks: TaskOverviewInfo[];
+ taskgroupID: number
+}
+
+export interface TaskOverviewData {
+ tasks: TaskOverviewInfo[],
+ taskgroupID: number
}
@Component({
selector: 'app-taskgroup-overview',
@@ -25,7 +31,7 @@ interface ExampleFlatNode {
})
export class TaskgroupOverviewComponent {
- @Output('taskgroupSelected') taskgroupSelected: EventEmitter = new EventEmitter();
+ @Output('taskgroupSelected') taskgroupSelected: EventEmitter = new EventEmitter();
private _transformer = (node: RecursiveTaskgroupInfo, level: number) => {
return {
expandable: !!node.childTaskgroups && node.childTaskgroups.length > 0,
@@ -33,7 +39,8 @@ export class TaskgroupOverviewComponent {
level: level,
activeTasks: node.amountActiveTasks,
hasOverdueTask: node.hasOverdueTask,
- tasks: node.activeTasks
+ tasks: node.activeTasks,
+ taskgroupID: node.taskgroupID
};
};
@@ -65,7 +72,10 @@ export class TaskgroupOverviewComponent {
hasChild = (_: number, node: ExampleFlatNode) => node.expandable;
- onSelectTaskgroup(tasks: TaskOverviewInfo[]) {
- this.taskgroupSelected.emit(tasks)
+ onSelectTaskgroup(tasks: TaskOverviewInfo[], taskgroupID: number) {
+ this.taskgroupSelected.emit({
+ tasks: tasks,
+ taskgroupID: taskgroupID
+ })
}
}