From f2149358fa8b60be7e9d93ebc1a39bcb5793d661 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 25 Oct 2023 19:10:17 +0200 Subject: [PATCH] List schedules for today in dashboard --- .../src/app/dashboard/dashboard.component.css | 41 +++++++++++++++++++ .../app/dashboard/dashboard.component.html | 19 +++++++++ .../src/app/dashboard/dashboard.component.ts | 17 ++++++-- 3 files changed, 74 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/dashboard/dashboard.component.css b/frontend/src/app/dashboard/dashboard.component.css index c77f51c..b6f411a 100644 --- a/frontend/src/app/dashboard/dashboard.component.css +++ b/frontend/src/app/dashboard/dashboard.component.css @@ -92,3 +92,44 @@ .taskgroup-last-btn { background-color: #f3f3f3; } + +.link-no-deco { + text-decoration: none; + color: black; +} + +.link-no-deco:hover{ + text-decoration: underline; +} + +.gray-text { + color: #6e6e6e; +} + +.yellowBtn { + background-color: #f39c12; + color: white; + border-radius: 0; +} + +.primaryBtn { + border-radius: 0; +} + + +::ng-deep .mat-mdc-card-header-text { + display: block; + width: 100%; +} + +.schedule-del-btn { + margin-top: 10px; +} + +.left-actions { + float: left; +} + +.right-actions { + float: right; +} diff --git a/frontend/src/app/dashboard/dashboard.component.html b/frontend/src/app/dashboard/dashboard.component.html index 2cb3126..2b0ee4f 100644 --- a/frontend/src/app/dashboard/dashboard.component.html +++ b/frontend/src/app/dashboard/dashboard.component.html @@ -21,6 +21,25 @@

There is no scheduled Task for today

+ +
+ + + + {{schedule.task.taskName}} + + + + {{taskgroupPath.taskgroupName}} / +

To be done sometime today

+
+ + + + +
+
+
diff --git a/frontend/src/app/dashboard/dashboard.component.ts b/frontend/src/app/dashboard/dashboard.component.ts index 5b4bfeb..3442273 100644 --- a/frontend/src/app/dashboard/dashboard.component.ts +++ b/frontend/src/app/dashboard/dashboard.component.ts @@ -1,14 +1,25 @@ -import { Component } from '@angular/core'; -import {ScheduleInfo} from "../../api"; +import {Component, OnInit} from '@angular/core'; +import {ScheduleInfo, ScheduleService} from "../../api"; @Component({ selector: 'app-dashboard', templateUrl: './dashboard.component.html', styleUrls: ['./dashboard.component.css'] }) -export class DashboardComponent { +export class DashboardComponent implements OnInit{ missedSchedules: boolean = true taskRunning: boolean = false schedules: ScheduleInfo[] = [] + + constructor(private scheduleService: ScheduleService) { + } + + ngOnInit() { + this.scheduleService.schedulesTodayGet().subscribe({ + next: resp => { + this.schedules = resp; + } + }) + } }