From e2fe600b943072411b6dbb77ead23db3b3124005 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eero=20J=C3=A4=C3=A4skel=C3=A4inen?= Date: Wed, 16 Nov 2022 16:00:06 +0200 Subject: [PATCH 1/2] CalendarTableView: Added missing declaration on unavailabilityPeriod --- assets/js/utils/calendar_table_view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/utils/calendar_table_view.js b/assets/js/utils/calendar_table_view.js index b550a093..90bf51b2 100755 --- a/assets/js/utils/calendar_table_view.js +++ b/assets/js/utils/calendar_table_view.js @@ -887,7 +887,7 @@ App.Utils.CalendarTableView = (function () { const workDateStart = moment(start.format('YYYY-MM-DD') + ' ' + workingPlan[selDayName].start); if (start < workDateStart) { - unavailabilityPeriod = { + const unavailabilityPeriod = { title: lang('not_working'), start: start.toDate(), end: workDateStart.toDate(), From ad6bf65667feaeef5cd645b74bbdc8c8dc033440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eero=20J=C3=A4=C3=A4skel=C3=A4inen?= Date: Thu, 17 Nov 2022 12:47:30 +0200 Subject: [PATCH 2/2] Strip providers script vars' keys to fix 'find() undefined' JS error --- application/controllers/Calendar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/controllers/Calendar.php b/application/controllers/Calendar.php index 6ba4efb1..ff3b68a2 100644 --- a/application/controllers/Calendar.php +++ b/application/controllers/Calendar.php @@ -129,7 +129,7 @@ class Calendar extends EA_Controller { 'timezones' => $this->timezones->to_array(), 'privileges' => $privileges, 'calendar_view' => $calendar_view, - 'available_providers' => $available_providers, + 'available_providers' => array_values($available_providers), // Strip keys to prevent unintended array-to-object conversion 'available_services' => $available_services, 'secretary_providers' => $secretary_providers, 'edit_appointment' => $edit_appointment,