Enable UI to work with event status

This commit is contained in:
2023-05-15 21:00:28 +02:00
parent 39ffa5e52c
commit 0962a36b59
5 changed files with 30 additions and 6 deletions
+8 -6
View File
@@ -52,12 +52,14 @@ export class AdminComponent implements OnInit {
this.api.getEvents(this.selectedCalendar).subscribe((events: Event[]): void => {
for (let event of events) {
this.events.push({
...event,
startDateTime: new Date(event.startDateTime),
endDateTime: new Date(event.endDateTime),
createdDate: new Date(event.createdDate)
});
if(event.status !== 'DELETED') {
this.events.push({
...event,
startDateTime: new Date(event.startDateTime),
endDateTime: new Date(event.endDateTime),
createdDate: new Date(event.createdDate)
});
}
}
this.filterEvents();
this.sortEvents();