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;
|
lastModifiedBy: string;
|
||||||
url: string;
|
url: string;
|
||||||
wholeDay: boolean;
|
wholeDay: boolean;
|
||||||
|
repeatFrequency: string;
|
||||||
status: string;
|
status: string;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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> | </span>
|
<span> | </span>
|
||||||
<span>Filter: </span>
|
<span>Filter: </span>
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user