Update admin view to include the new birthdays calendar
All checks were successful
Jenkins Production Deployment

This commit is contained in:
Patrick Müller 2025-09-07 18:39:26 +02:00
parent a2ef25ad34
commit 8b0d1ca228
Signed by: Paddy
GPG Key ID: D10B5E2CFD8E7C6D
4 changed files with 14 additions and 0 deletions

View File

@ -13,5 +13,6 @@ export interface Event {
lastModifiedBy: string;
url: string;
wholeDay: boolean;
repeatFrequency: string;
status: string;
}

View File

@ -32,6 +32,7 @@
<option value="members">Internal - Members</option>
<option value="choir">Internal - Choir</option>
<option value="management">Internal - Management</option>
<option value="birthdays">Internal - Birthdays</option>
</select>
<span>&nbsp; | &nbsp;</span>
<span>Filter: </span>

View File

@ -81,6 +81,8 @@ export class AdminComponent implements OnInit {
return 4;
case 'management':
return 3;
case 'birthdays':
return 5;
default:
return -1;
}
@ -93,6 +95,11 @@ export class AdminComponent implements OnInit {
}
checkEventMeetsFilterCriteria(event: Event): boolean {
// Always return birthdays regardless of date
if(event.calendarId === 5) {
return true;
}
switch (this.eventFilter) {
case '':
return true;

View File

@ -96,6 +96,11 @@ export class ApiService {
params = params.append('sessionId', session.sessionId);
params = params.append('sessionKey', session.sessionKey);
// Automatically set birthdays to recurring
if(event.calendarId === 5) {
event.repeatFrequency = 'YEARLY';
}
let createEvent: any = event;
return this.http.post(this.apiUrl, createEvent, {params});