-
+
@for (timeSlot of timeSlots; track timeSlot.ID; let last = $last) {
}
-
}
diff --git a/internal/ui/angular-ui/src/app/components/timeline/timeline.component.scss b/internal/ui/angular-ui/src/app/components/timeline/timeline.component.scss
index 7e3f71f..cc4e25c 100644
--- a/internal/ui/angular-ui/src/app/components/timeline/timeline.component.scss
+++ b/internal/ui/angular-ui/src/app/components/timeline/timeline.component.scss
@@ -1,17 +1,6 @@
.timeline-container {
- display: flex;
- flex-direction: row;
- justify-content: center;
- margin-top: 3rem;
- padding: 1rem;
- border-radius: 15px;
- // box-shadow: 0 0 15px rgba(0, 0, 0, 0.45);
+ padding: 2rem;
+ margin-top: 4rem;
+ overflow-y: scroll;
max-height: 95vh;
-
- .line {
- height: 100%;
- width: 2px;
- background-color: black;
- border-radius: 1px;
- }
}
diff --git a/internal/ui/angular-ui/src/app/components/timeline/timeline.component.ts b/internal/ui/angular-ui/src/app/components/timeline/timeline.component.ts
index 306a759..3967ffc 100644
--- a/internal/ui/angular-ui/src/app/components/timeline/timeline.component.ts
+++ b/internal/ui/angular-ui/src/app/components/timeline/timeline.component.ts
@@ -1,9 +1,10 @@
import {Component, HostListener, input} from '@angular/core';
import {toObservable} from "@angular/core/rxjs-interop";
import {TimeSlotService} from "../../services/TimeSlot/time-slot.service";
-import {filter, switchMap} from "rxjs";
+import {catchError, filter, of, switchMap} from "rxjs";
import {AsyncPipe} from "@angular/common";
import {TimeSlotComponent} from "../time-slot/time-slot.component";
+import {TimeSlot} from "../../models/TimeSlot";
@Component({
selector: 'app-timeline',
@@ -19,24 +20,20 @@ export class TimelineComponent {
@HostListener('window:wheel', ['$event'])
onWheel(event: WheelEvent) {
if (event.deltaY > 0) {
- this.scroll -= 1;
+ this.scroll -= .3;
} else if (event.deltaY < 0) {
- this.scroll += 1;
+ this.scroll += .3;
}
}
scroll = 1;
date = input
()
timeSlots$ = toObservable(this.date).pipe(
filter(date => date !== undefined),
- switchMap(date => this.timeSlotService.timeSlotsForDay$(date as Date))
+ switchMap(date => this.timeSlotService.timeSlotsForDay$(date as Date)),
+ catchError(() => of([] as TimeSlot[]) )
)
constructor(
private timeSlotService: TimeSlotService
) {
}
-
- handleScroll($event: Event) {
- console.log($event)
-
- }
}
diff --git a/internal/ui/web/index.html b/internal/ui/web/index.html
index 40d1403..a98e650 100644
--- a/internal/ui/web/index.html
+++ b/internal/ui/web/index.html
@@ -9,5 +9,5 @@
-
+