From a8ac22fe006b417bc4a27cfe25a164975a20429e Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Fri, 26 Apr 2024 16:45:31 +0200 Subject: [PATCH] Include the unavailabilities to the "all" display in the calendar --- application/controllers/Calendar.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/controllers/Calendar.php b/application/controllers/Calendar.php index 3761b85a..8beef71e 100644 --- a/application/controllers/Calendar.php +++ b/application/controllers/Calendar.php @@ -620,9 +620,10 @@ class Calendar extends EA_Controller $record_id = request('record_id'); - $filter_type = request('filter_type'); $is_all = request('record_id') === FILTER_TYPE_ALL; + $filter_type = request('filter_type'); + if (!$filter_type && !$is_all) { json_response([ 'appointments' => [], @@ -682,7 +683,7 @@ class Calendar extends EA_Controller // Get unavailability periods (only for provider). $response['unavailabilities'] = []; - if ($filter_type == FILTER_TYPE_PROVIDER) { + if ($filter_type == FILTER_TYPE_PROVIDER || $is_all) { $where_clause = $where_id . ' = ' .