Release 2.0.32 (#4256)

This commit is contained in:
Kevin Papst
2023-08-31 15:33:53 +02:00
committed by GitHub
parent 452de88e18
commit 31348da4c0
42 changed files with 412 additions and 130 deletions

View File

@@ -458,6 +458,23 @@ export default class KimaiCalendar {
name: 'google',
editable: false,
}};
} else if (source.type === 'json') {
calendarSource = {...calendarSource, ...{
id: 'json-' + source.id,
editable: false,
events: (fetchInfo, successCallback, failureCallback) => {
let url = source.url.replace('{from}', DATES.formatForAPI(fetchInfo.start));
url = url.replace('{to}', DATES.formatForAPI(fetchInfo.end));
API.get(url, {}, result => {
let apiEvents = [];
for (const record of result) {
apiEvents.push(record);
}
successCallback(apiEvents);
}, failureCallback);
},
}};
} else if (source.type === 'ical') {
calendarSource = {...calendarSource, ...{
id: 'ical-' + source.id,