Kalender Update
* Abgesagte Termine können nun ausgeblendet werden.
This commit is contained in:
@@ -119,6 +119,10 @@ endforeach;
|
|||||||
class="btn btn-light btn-light-search top-search-filter"><i
|
class="btn btn-light btn-light-search top-search-filter"><i
|
||||||
class="fa-duotone fa-solid fa-phone-volume fa-calendar-call fa-calendar-call-search"></i>
|
class="fa-duotone fa-solid fa-phone-volume fa-calendar-call fa-calendar-call-search"></i>
|
||||||
</button>
|
</button>
|
||||||
|
<button title="Abgesagte Termine" data-eventcancelled="1"
|
||||||
|
class="btn btn-light btn-light-search"><i class="fa-duotone fa-solid fa-calendar-symbol fa-calendar-circle-exclamation"></i>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -199,6 +199,7 @@ class CalendarModel
|
|||||||
}
|
}
|
||||||
$visibleCalendars = $r->visibleCalendars;
|
$visibleCalendars = $r->visibleCalendars;
|
||||||
$visibleCalendarTypes = $r->visibleCalendarTypes;
|
$visibleCalendarTypes = $r->visibleCalendarTypes;
|
||||||
|
|
||||||
if ($visibleCalendars) {
|
if ($visibleCalendars) {
|
||||||
$where .= " AND calendar_id IN (" . implode(",", $visibleCalendars) . ")";
|
$where .= " AND calendar_id IN (" . implode(",", $visibleCalendars) . ")";
|
||||||
$whereTimeRecording = " AND `Calendar`.`go_calendar_id` IN (" . implode(",", $visibleCalendars) . ")";
|
$whereTimeRecording = " AND `Calendar`.`go_calendar_id` IN (" . implode(",", $visibleCalendars) . ")";
|
||||||
@@ -206,6 +207,10 @@ class CalendarModel
|
|||||||
if ($visibleCalendarTypes) {
|
if ($visibleCalendarTypes) {
|
||||||
$where .= " AND event_type IN (" . implode(",", $visibleCalendarTypes) . ")";
|
$where .= " AND event_type IN (" . implode(",", $visibleCalendarTypes) . ")";
|
||||||
}
|
}
|
||||||
|
if ($r->visibleCancellation != 1) {
|
||||||
|
$where .= " AND canceld = '0' ";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$sql = "SELECT `cal_events`.id,`cal_events`.categories, uuid, calendar_id, `cal_events`.user_id, start_time, end_time, timezone, all_day_event, `cal_events`.name,`cal_calendars`.name calendar_name, description, location, repeat_end_time, reminder, ctime,cname, mtime,mname, muser_id, busy, status, resource_event_id, private, rrule, `cal_events`.background, `cal_events`.files_folder_id, read_only, category_id, exception_for_event_id, recurrence_id, is_organizer,event_type,busy,recurrence,rrule_events FROM cal_events INNER JOIN `cal_calendars` ON (`cal_calendars`.`id`=`cal_events`.`calendar_id`) WHERE 1=1 $where ORDER BY start_time DESC";
|
$sql = "SELECT `cal_events`.id,`cal_events`.categories, uuid, calendar_id, `cal_events`.user_id, start_time, end_time, timezone, all_day_event, `cal_events`.name,`cal_calendars`.name calendar_name, description, location, repeat_end_time, reminder, ctime,cname, mtime,mname, muser_id, busy, status, resource_event_id, private, rrule, `cal_events`.background, `cal_events`.files_folder_id, read_only, category_id, exception_for_event_id, recurrence_id, is_organizer,event_type,busy,recurrence,rrule_events FROM cal_events INNER JOIN `cal_calendars` ON (`cal_calendars`.`id`=`cal_events`.`calendar_id`) WHERE 1=1 $where ORDER BY start_time DESC";
|
||||||
@@ -998,7 +1003,7 @@ WHERE `TimerecordingCategory`.`hourday`!='1' AND `TimerecordingCategory`.`hourda
|
|||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function cancelCalendarEvent($r,$me)
|
public static function cancelCalendarEvent($r, $me)
|
||||||
{
|
{
|
||||||
$id = $r->id;
|
$id = $r->id;
|
||||||
$users = $r->users;
|
$users = $r->users;
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$.post(requestUrl, {visibleCalendars: visibleCalendars}, function (data) {
|
$.post(requestUrl, {visibleCalendars: visibleCalendars,visibleCancellation:1}, function (data) {
|
||||||
|
|
||||||
}, 'json').done(function (json) {
|
}, 'json').done(function (json) {
|
||||||
if (json.success == true) {
|
if (json.success == true) {
|
||||||
@@ -1504,13 +1504,13 @@ $(document).ready(function () {
|
|||||||
customer_info_text: customer_info_text,
|
customer_info_text: customer_info_text,
|
||||||
customer_info_type: customer_info_type,
|
customer_info_type: customer_info_type,
|
||||||
customer_info_type_text: customer_info_type_text,
|
customer_info_type_text: customer_info_type_text,
|
||||||
customer_info_check:customer_info_check,
|
customer_info_check: customer_info_check,
|
||||||
title: title
|
title: title
|
||||||
}, function (data) {
|
}, function (data) {
|
||||||
|
|
||||||
}).done(function (data) {
|
}).done(function (data) {
|
||||||
});
|
});
|
||||||
$('#EventModal').modal('hide');
|
$('#EventModal').modal('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -2508,6 +2508,7 @@ $(document).ready(function () {
|
|||||||
let checkbox = $(".calendar-check");
|
let checkbox = $(".calendar-check");
|
||||||
let calendarFilter = $('.btn-light-search');
|
let calendarFilter = $('.btn-light-search');
|
||||||
let visibleCalendars = [];
|
let visibleCalendars = [];
|
||||||
|
let visibleCancellation = 0;
|
||||||
let visibleCalendarTypes = [];
|
let visibleCalendarTypes = [];
|
||||||
let mycalendar_id = $('#calendar-id').data('calendarid');
|
let mycalendar_id = $('#calendar-id').data('calendarid');
|
||||||
visibleCalendars.push(0);
|
visibleCalendars.push(0);
|
||||||
@@ -2519,13 +2520,18 @@ $(document).ready(function () {
|
|||||||
calendarFilter.each(function () {
|
calendarFilter.each(function () {
|
||||||
if (!$(this).hasClass('top-search-filter')) {
|
if (!$(this).hasClass('top-search-filter')) {
|
||||||
visibleCalendarTypes.push($(this).data('ctype'));
|
visibleCalendarTypes.push($(this).data('ctype'));
|
||||||
|
if ($(this).data('eventcancelled')) {
|
||||||
|
visibleCancellation = 1;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$.post(requestUrl, {
|
$.post(requestUrl, {
|
||||||
visibleCalendars: visibleCalendars,
|
visibleCalendars: visibleCalendars,
|
||||||
visibleCalendarTypes: visibleCalendarTypes
|
visibleCalendarTypes: visibleCalendarTypes,
|
||||||
|
visibleCancellation: visibleCancellation
|
||||||
}, function (data) {
|
}, function (data) {
|
||||||
|
|
||||||
}, 'json').done(function (json) {
|
}, 'json').done(function (json) {
|
||||||
|
|||||||
Reference in New Issue
Block a user