diff --git a/Frontend/src/app/components/change/change.component.html b/Frontend/src/app/components/change/change.component.html
index 5ca2bbc..9cdace0 100644
--- a/Frontend/src/app/components/change/change.component.html
+++ b/Frontend/src/app/components/change/change.component.html
@@ -1 +1 @@
-
change works!
+Change details
diff --git a/Frontend/src/app/components/day/day.component.html b/Frontend/src/app/components/day/day.component.html
index 3379ed0..1130efa 100644
--- a/Frontend/src/app/components/day/day.component.html
+++ b/Frontend/src/app/components/day/day.component.html
@@ -1,6 +1,4 @@
-Day
-
- Titel: {{event.latest_event_summary}}
- Start: {{event.latest_start_date}}
- Gelöscht: {{event.changes[event.changes.length-1].is_deleted}}
-
+{{weekDayName}}
+
diff --git a/Frontend/src/app/components/day/day.component.ts b/Frontend/src/app/components/day/day.component.ts
index 1afc366..2d5c079 100644
--- a/Frontend/src/app/components/day/day.component.ts
+++ b/Frontend/src/app/components/day/day.component.ts
@@ -7,12 +7,16 @@ import {Event} from '../../models/event';
styleUrls: ['./day.component.css']
})
export class DayComponent implements OnInit {
- @Input() events: Event[]= [];
+ @Input() events: Event[] = [];
+ @Input() dayOfWeek: number = 0;
+
+ weekDayName: string = '';
constructor() {
}
ngOnInit(): void {
+ this.weekDayName = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'][this.dayOfWeek];
}
}
diff --git a/Frontend/src/app/components/event-detail/event-detail.component.html b/Frontend/src/app/components/event-detail/event-detail.component.html
index ef28185..6f418fb 100644
--- a/Frontend/src/app/components/event-detail/event-detail.component.html
+++ b/Frontend/src/app/components/event-detail/event-detail.component.html
@@ -1 +1 @@
-event-detail works!
+Event details popover
diff --git a/Frontend/src/app/components/event/event.component.css b/Frontend/src/app/components/event/event.component.css
index e69de29..dbbd498 100644
--- a/Frontend/src/app/components/event/event.component.css
+++ b/Frontend/src/app/components/event/event.component.css
@@ -0,0 +1,17 @@
+.event-card {
+ border-radius: .5em;
+ padding: .25em;
+ margin: .5em;
+}
+
+.event-card-lecture {
+ background-color: #0A62D0;
+}
+
+.event-card-exam {
+ background-color: orangered;
+}
+
+.event-card-blocker {
+ background-color: dimgrey;
+}
diff --git a/Frontend/src/app/components/event/event.component.html b/Frontend/src/app/components/event/event.component.html
index 8a7c90c..6b7743a 100644
--- a/Frontend/src/app/components/event/event.component.html
+++ b/Frontend/src/app/components/event/event.component.html
@@ -1 +1,5 @@
-event works!
+
+ Titel: {{event.latest_event_summary}}
+ Start: {{event.latest_start_date}}
+ Gelöscht: {{event.changes[event.changes.length-1].is_deleted}}
+
diff --git a/Frontend/src/app/components/event/event.component.ts b/Frontend/src/app/components/event/event.component.ts
index 1fd3f65..2fc8df9 100644
--- a/Frontend/src/app/components/event/event.component.ts
+++ b/Frontend/src/app/components/event/event.component.ts
@@ -1,4 +1,5 @@
-import {Component, OnInit} from '@angular/core';
+import {Component, Input, OnInit} from '@angular/core';
+import {Event} from '../../models/event';
@Component({
selector: 'app-event',
@@ -6,11 +7,31 @@ import {Component, OnInit} from '@angular/core';
styleUrls: ['./event.component.css']
})
export class EventComponent implements OnInit {
+ @Input() event: Event = {} as Event;
+ eventTypeClass: string = '';
constructor() {
}
ngOnInit(): void {
+ let latestFullChange = this.event.changes[this.event.changes.length - 1];
+ if(latestFullChange.is_deleted) {
+ latestFullChange = this.event.changes[this.event.changes.length - 2];
+ }
+
+ switch(latestFullChange.new_categories) {
+ case 'Prüfung':
+ this.eventTypeClass = 'event-card-exam';
+ break;
+ case 'Lehrveranstaltung':
+ this.eventTypeClass = 'event-card-lecture';
+ break;
+ case 'Sonstige':
+ this.eventTypeClass = 'event-card-blocker';
+ break;
+ default:
+ this.eventTypeClass = 'event-card-blocker';
+ }
}
}
diff --git a/Frontend/src/app/components/week/week.component.html b/Frontend/src/app/components/week/week.component.html
index 586ec83..47aba56 100644
--- a/Frontend/src/app/components/week/week.component.html
+++ b/Frontend/src/app/components/week/week.component.html
@@ -1,3 +1,5 @@
-