From 6417b7afb9fe19d916d3711a2f6c1c93ca596e5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Wed, 17 Apr 2024 20:37:27 +0200 Subject: [PATCH 1/7] Navigation Link Tree in Register Forgotten Task Schedule --- .../forgotten-task-start-dialog.component.css | 5 +++++ .../forgotten-task-start-dialog.component.html | 4 ++++ .../forgotten-task-start-dialog.component.ts | 11 +++++++++++ 3 files changed, 20 insertions(+) diff --git a/frontend/src/app/dashboard/forgotten-task-start-dialog/forgotten-task-start-dialog.component.css b/frontend/src/app/dashboard/forgotten-task-start-dialog/forgotten-task-start-dialog.component.css index 240434b..d0a81f3 100644 --- a/frontend/src/app/dashboard/forgotten-task-start-dialog/forgotten-task-start-dialog.component.css +++ b/frontend/src/app/dashboard/forgotten-task-start-dialog/forgotten-task-start-dialog.component.css @@ -5,6 +5,11 @@ justify-content: space-between; } +.navi-link-container { + margin: 20px auto; + width: 80%; +} + .spacer { margin-bottom: 2.5%; } diff --git a/frontend/src/app/dashboard/forgotten-task-start-dialog/forgotten-task-start-dialog.component.html b/frontend/src/app/dashboard/forgotten-task-start-dialog/forgotten-task-start-dialog.component.html index 791f57b..a28e708 100644 --- a/frontend/src/app/dashboard/forgotten-task-start-dialog/forgotten-task-start-dialog.component.html +++ b/frontend/src/app/dashboard/forgotten-task-start-dialog/forgotten-task-start-dialog.component.html @@ -1,4 +1,8 @@ +
+

Register forgotten activity

= { @@ -65,6 +66,16 @@ export class ForgottenTaskStartDialogComponent implements OnInit{ }, }, ]; + defaultNavigationLinks: NavigationLink[] = [ + { + linkText: "Dashboard", + routerLink: ['/'] + }, + { + linkText: "Register Forgotten Activity", + routerLink: ["/forgotten"] + } + ]; constructor(private router: Router, From 7cd1d68739181a987ac6d6827feea11143d20487 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Wed, 17 Apr 2024 20:55:50 +0200 Subject: [PATCH 2/7] Implement Delete Button in Task Detail Overview --- .../task-detail-overview.component.html | 2 +- .../task-detail-overview.component.ts | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/tasks/task-detail-overview/task-detail-overview.component.html b/frontend/src/app/tasks/task-detail-overview/task-detail-overview.component.html index 6ab6c82..10e49c8 100644 --- a/frontend/src/app/tasks/task-detail-overview/task-detail-overview.component.html +++ b/frontend/src/app/tasks/task-detail-overview/task-detail-overview.component.html @@ -34,7 +34,7 @@
- +
diff --git a/frontend/src/app/tasks/task-detail-overview/task-detail-overview.component.ts b/frontend/src/app/tasks/task-detail-overview/task-detail-overview.component.ts index 369634e..bae3db5 100644 --- a/frontend/src/app/tasks/task-detail-overview/task-detail-overview.component.ts +++ b/frontend/src/app/tasks/task-detail-overview/task-detail-overview.component.ts @@ -187,4 +187,12 @@ export class TaskDetailOverviewComponent implements OnInit { minWidth: "400px" }) } + + deleteTask() { + this.taskService.tasksTaskIDDelete(this.task!.taskID).subscribe({ + next: resp => { + this.router.navigateByUrl("/") + } + }) + } } From 8dffb6f9ad2154786b5187235a9142f948f49c6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Thu, 18 Apr 2024 19:56:25 +0200 Subject: [PATCH 3/7] Activate Finishing from active task schedule dashboard --- .../active-schedule/active-schedule.component.html | 2 +- .../active-schedule/active-schedule.component.ts | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/dashboard/active-schedule/active-schedule.component.html b/frontend/src/app/dashboard/active-schedule/active-schedule.component.html index 2804598..d6055c6 100644 --- a/frontend/src/app/dashboard/active-schedule/active-schedule.component.html +++ b/frontend/src/app/dashboard/active-schedule/active-schedule.component.html @@ -15,7 +15,7 @@
- + diff --git a/frontend/src/app/dashboard/active-schedule/active-schedule.component.ts b/frontend/src/app/dashboard/active-schedule/active-schedule.component.ts index 1d2dacf..ea291d2 100644 --- a/frontend/src/app/dashboard/active-schedule/active-schedule.component.ts +++ b/frontend/src/app/dashboard/active-schedule/active-schedule.component.ts @@ -99,6 +99,14 @@ export class ActiveScheduleComponent implements OnInit{ } + finishSchedule() { + this.scheduleService.schedulesScheduleIDStopFinishPost(this.activeSchedule!.scheduleID, true).subscribe({ + next: resp => { + this.activeSchedule = undefined; + } + }) + } + finishManual() { const dialogRef = this.dialog.open(StopScheduleManuallyComponent, { data: this.activeSchedule, From cd98423f6bee25df709b6c19b639cc10b77b474a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Thu, 18 Apr 2024 20:09:06 +0200 Subject: [PATCH 4/7] Added Link from active schedule to task detail-overview --- .../active-schedule/active-schedule.component.html | 2 +- .../active-schedule/active-schedule.component.ts | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/dashboard/active-schedule/active-schedule.component.html b/frontend/src/app/dashboard/active-schedule/active-schedule.component.html index d6055c6..986ea7b 100644 --- a/frontend/src/app/dashboard/active-schedule/active-schedule.component.html +++ b/frontend/src/app/dashboard/active-schedule/active-schedule.component.html @@ -6,7 +6,7 @@ - {{activeSchedule!.task.taskName}} + {{activeSchedule!.task.taskName}} {{taskgroupPath.taskgroupName}} / diff --git a/frontend/src/app/dashboard/active-schedule/active-schedule.component.ts b/frontend/src/app/dashboard/active-schedule/active-schedule.component.ts index ea291d2..1ef0519 100644 --- a/frontend/src/app/dashboard/active-schedule/active-schedule.component.ts +++ b/frontend/src/app/dashboard/active-schedule/active-schedule.component.ts @@ -1,5 +1,11 @@ import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core'; -import {ScheduleInfo, ScheduleService, TaskOverviewInfo, TaskScheduleStopResponse} from "../../../api"; +import { + ScheduleInfo, + ScheduleService, + TaskgroupEntityInfo, + TaskOverviewInfo, + TaskScheduleStopResponse +} from "../../../api"; import {StopActiveScheduleInfo} from "./StopActiveScheduleInfo"; import {TaskOverviewComponent} from "../task-overview/task-overview.component"; import {MatDialog} from "@angular/material/dialog"; @@ -19,6 +25,7 @@ export interface StopActiveScheduleEmitterInfo { }) export class ActiveScheduleComponent implements OnInit{ activeSchedule: ScheduleInfo | undefined + taskgroupID: number | undefined startTime: number = 0; currentTime: number = 0; @@ -56,11 +63,15 @@ export class ActiveScheduleComponent implements OnInit{ next: resp => { if(resp.scheduleID >= 0) { this.activateSchedule(resp); + this.taskgroupID = resp.taskgroupPath[resp.taskgroupPath.length-1].taskgroupID + console.log(this.taskgroupID) } }, }) + + } stopTask(finish: boolean) { From ba5faeed6a3f9075a2d2873c97755ed426358f8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Thu, 18 Apr 2024 20:11:04 +0200 Subject: [PATCH 5/7] Added Link from TaskgroupPathElement to Taskgroup-Overview in active-schedule --- .../dashboard/active-schedule/active-schedule.component.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/dashboard/active-schedule/active-schedule.component.html b/frontend/src/app/dashboard/active-schedule/active-schedule.component.html index 986ea7b..ce3c7ec 100644 --- a/frontend/src/app/dashboard/active-schedule/active-schedule.component.html +++ b/frontend/src/app/dashboard/active-schedule/active-schedule.component.html @@ -9,7 +9,9 @@ {{activeSchedule!.task.taskName}} - {{taskgroupPath.taskgroupName}} / + + {{taskgroupPath.taskgroupName}} / +

Running for {{displayTime}}

From f0a596ff0c5064a637d334b3a3c0240d622f9e4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Thu, 18 Apr 2024 20:14:35 +0200 Subject: [PATCH 6/7] Added Links in Schedules planned for today --- frontend/src/app/dashboard/dashboard.component.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/dashboard/dashboard.component.html b/frontend/src/app/dashboard/dashboard.component.html index 206f37c..8a701da 100644 --- a/frontend/src/app/dashboard/dashboard.component.html +++ b/frontend/src/app/dashboard/dashboard.component.html @@ -23,11 +23,13 @@ - {{schedule.task.taskName}} + {{schedule.task.taskName}} - {{taskgroupPath.taskgroupName}} / + + {{taskgroupPath.taskgroupName}} / +

To be done sometime today

From d537fd5d5752902a00fa7a56b2cda39787bdd72e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Thu, 18 Apr 2024 20:19:05 +0200 Subject: [PATCH 7/7] Added Reschedule Redirection for Planned Schedules --- frontend/src/app/dashboard/dashboard.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/dashboard/dashboard.component.html b/frontend/src/app/dashboard/dashboard.component.html index 8a701da..2a2d4dd 100644 --- a/frontend/src/app/dashboard/dashboard.component.html +++ b/frontend/src/app/dashboard/dashboard.component.html @@ -34,7 +34,7 @@
- +