From 7b7d85d8734fd18f33cfcf0d93a0dacdbcd008c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Sat, 18 Nov 2023 08:48:45 +0100 Subject: [PATCH] Navigate to task by given taskID of schedule and not fixed one from route param --- .../src/app/schedules/scheduler/scheduler.component.html | 1 - .../src/app/schedules/scheduler/scheduler.component.ts | 9 ++++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/schedules/scheduler/scheduler.component.html b/frontend/src/app/schedules/scheduler/scheduler.component.html index 5bff9e6..c8456e3 100644 --- a/frontend/src/app/schedules/scheduler/scheduler.component.html +++ b/frontend/src/app/schedules/scheduler/scheduler.component.html @@ -1,4 +1,3 @@ -
diff --git a/frontend/src/app/schedules/scheduler/scheduler.component.ts b/frontend/src/app/schedules/scheduler/scheduler.component.ts index 01810f5..b71223d 100644 --- a/frontend/src/app/schedules/scheduler/scheduler.component.ts +++ b/frontend/src/app/schedules/scheduler/scheduler.component.ts @@ -171,7 +171,7 @@ export class SchedulerComponent implements OnInit{ start: new Date(scheduleInfo.scheduleDate), title: this.task!.taskName, color: colors['red'], - allDay: true + allDay: true, }) this.refresh.next(); } @@ -204,7 +204,9 @@ export class SchedulerComponent implements OnInit{ color: color, allDay: true, meta: { - ID: this.scheduleID + ID: this.scheduleID, + taskgroupID: schedule.taskgroupPath[schedule.taskgroupPath.length-1].taskgroupID, + taskID: schedule.task.taskID } }) this.refresh.next(); @@ -212,7 +214,8 @@ export class SchedulerComponent implements OnInit{ } eventClicked({ event }: { event: CalendarEvent }): void { - this.router.navigateByUrl("/taskgroups/" + this.taskgroupID.toString() + "/tasks/" + this.task!.taskID ) + console.log(event.meta.taskgroupID); + this.router.navigateByUrl("/taskgroups/" + event.meta.taskgroupID + "/tasks/" + event.meta.taskID ) } computeTaskPath(taskgroupPath: TaskgroupEntityInfo[], task: TaskShortInfo | TaskEntityInfo) { -- 2.34.1