change agenda

This commit is contained in:
Peter Maquiran
2023-03-30 14:31:58 +01:00
parent 8deed4cf94
commit b7d878851e
13 changed files with 350 additions and 723 deletions
+22
View File
@@ -62,6 +62,16 @@ export class CalendarService {
})
}
removeRangeForCalendar(rangeStartDate, rangeEndDate, profile, calendarId) {
this._eventSource = this._eventSource.filter((e)=> {
if(new Date(rangeStartDate).getTime() <= new Date(e.startTime).getTime() &&
new Date(rangeEndDate).getTime() >= new Date(e.endTime).getTime() && e.CalendarId == calendarId) {
return false
}
return true
})
}
pushEvent(eventsList: EventList[], profile: 'pr' | 'md') {
let news = []
@@ -95,6 +105,18 @@ export class CalendarService {
}, 10)
}
getEventsByCalendarIds(ids:any[]): EventListStore[] {
let result = [];
for (const calendar of ids) {
const events = this._eventSource.filter(e => e.CalendarId == calendar.calendarId)
result = result.concat(events)
}
return result
}
delete() {
this._eventSource = []