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; lastModifiedBy: string;
url: string; url: string;
wholeDay: boolean; wholeDay: boolean;
repeatFrequency: string;
status: string; status: string;
} }

View File

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

View File

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

View File

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