Skip to content

Commit

Permalink
Include the unavailabilities to the "all" display in the calendar
Browse files Browse the repository at this point in the history
  • Loading branch information
alextselegidis committed Apr 26, 2024
1 parent a2ba872 commit 6ee5e14
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions application/controllers/Calendar.php
Expand Up @@ -618,9 +618,10 @@ public function get_calendar_appointments(): void

$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' => [],
Expand Down Expand Up @@ -680,7 +681,7 @@ public function get_calendar_appointments(): void
// 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 .
' = ' .
Expand Down

0 comments on commit 6ee5e14

Please sign in to comment.