Adapt visualization of missed schedules to advanced schedules
All checks were successful
Java CI with Maven / build (push) Successful in 47s

This commit is contained in:
Sebastian Böckelmann 2023-11-12 12:21:49 +01:00
parent d9013174f4
commit f20774af99
2 changed files with 13 additions and 2 deletions

View File

@ -13,7 +13,14 @@
<mat-progress-bar mode="determinate" [value]="schedule.activeMinutes"></mat-progress-bar>
<div class="originally-planned-container">
<div style="width: 100%">
<p style="display: inline-block"><i>Originally planned:</i> {{toBasicSchedule(schedule).scheduleDate}}</p>
<p style="display: inline-block"><i>Originally planned:</i>
<span *ngIf="schedule.scheduleType == 'BASIC'">{{toBasicSchedule(schedule).scheduleDate}}</span>
<span *ngIf="schedule.scheduleType == 'ADVANCED'">
<span> {{toAdvancedSchedule(schedule).scheduleStartTime | date:'EEEE, d MMM. y'}}</span>
<span> to </span>
<span>{{toAdvancedSchedule(schedule).scheduleStopTime | date: 'd MMM. y'}} </span>
</span>
</p>
</div>
<div style="width: 100%" class="reschedule-actions-container">
<button mat-raised-button color="primary" class="rescheduleBtn"

View File

@ -1,5 +1,5 @@
import {Component, OnInit} from '@angular/core';
import {BasicScheduleInfo, ScheduleInfo, ScheduleService} from "../../api";
import {AdvancedScheduleInfo, BasicScheduleInfo, ScheduleInfo, ScheduleService} from "../../api";
import {NavigationLink} from "../navigation-link-list/navigation-link-list.component";
import {MatSnackBar} from "@angular/material/snack-bar";
import {MatDialog} from "@angular/material/dialog";
@ -67,4 +67,8 @@ export class MissedSchedulesComponent implements OnInit{
toBasicSchedule(schedule: ScheduleInfo) {
return schedule as BasicScheduleInfo
}
toAdvancedSchedule(schedule: ScheduleInfo) {
return schedule as AdvancedScheduleInfo
}
}