Update admin view to include the new birthdays calendar
All checks were successful
Jenkins Production Deployment
All checks were successful
Jenkins Production Deployment
This commit is contained in:
parent
a2ef25ad34
commit
8b0d1ca228
|
@ -13,5 +13,6 @@ export interface Event {
|
|||
lastModifiedBy: string;
|
||||
url: string;
|
||||
wholeDay: boolean;
|
||||
repeatFrequency: string;
|
||||
status: string;
|
||||
}
|
||||
|
|
|
@ -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> | </span>
|
||||
<span>Filter: </span>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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});
|
||||
|
|
Loading…
Reference in New Issue
Block a user