Various minor JS errors in calendar_default_view.js

This commit is contained in:
Alex Tselegidis 2024-04-26 16:20:25 +02:00
parent ebb682f518
commit 6304391fd9

View file

@ -211,7 +211,7 @@ App.Utils.CalendarDefaultView = (function () {
$popoverTarget.popover('dispose'); $popoverTarget.popover('dispose');
} }
if (lastFocusedEventData.extendedProps.data.workingPlanException) { if (lastFocusedEventData.extendedProps.data.workingPlanException !== undefined) {
const providerId = $selectFilterItem.val(); const providerId = $selectFilterItem.val();
const provider = vars('available_providers').find( const provider = vars('available_providers').find(
@ -1256,7 +1256,7 @@ App.Utils.CalendarDefaultView = (function () {
calendarEventSource.push(unavailabilityEvent); calendarEventSource.push(unavailabilityEvent);
}); });
response.blocked_periods.forEach((blockedPeriod) => { response?.blocked_periods?.forEach((blockedPeriod) => {
const blockedPeriodEvent = { const blockedPeriodEvent = {
title: blockedPeriod.name, title: blockedPeriod.name,
start: moment(blockedPeriod.start_datetime).toDate(), start: moment(blockedPeriod.start_datetime).toDate(),