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 71474a7d94
commit 81e202342e
1 changed files with 2 additions and 2 deletions

View File

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