Merge branch 'spidev' into 'master'

Kalender Update

See merge request fronk/thetool!1330
This commit is contained in:
Daniel Spitzer
2025-05-13 18:37:17 +00:00
3 changed files with 17 additions and 2 deletions
+11
View File
@@ -998,6 +998,7 @@ if (typeof (EventSource) !== 'undefined') {
let calendarFilter = $('.btn-light-search');
let visibleCalendars = [];
let visibleCalendarTypes = [];
let visibleCancellation = 0;
let mycalendar_id = $('#calendar-id').data('calendarid');
visibleCalendars.push(0);
checkbox.each(function () {
@@ -1010,6 +1011,9 @@ if (typeof (EventSource) !== 'undefined') {
if ($(this).data('ctype')) {
visibleCalendarTypes.push(parseInt($(this).data('ctype')));
}
if ($(this).data('eventcancelled')) {
visibleCancellation = $(this).data('eventcancelled');
}
}
});
jsondata = JSON.parse(e.data);
@@ -1020,6 +1024,13 @@ if (typeof (EventSource) !== 'undefined') {
if (visibleCalendarTypes.length > 0 && !visibleCalendarTypes.includes(parseInt(event.event_type)) && event.change_type != '3') {
return;
}
if (visibleCancellation == 0 && event.change_type != '3' && event.canceld == 1) {
let cevent = calendar.getEventById(event.cal_events_id);
if (cevent) {
cevent.remove();
}
return;
}
let cevent = calendar.getEventById(event.cal_events_id);
let rights = false;
let movable = false;