From c226d188c9ac29e4d9dc4520239a6513fef0b680 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Tue, 18 Jul 2023 07:54:47 +0200 Subject: [PATCH] Use the unavailabilities model instead of the appointments model --- application/controllers/Calendar.php | 2 +- application/libraries/Availability.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/controllers/Calendar.php b/application/controllers/Calendar.php index af247f0d..967a4ec5 100644 --- a/application/controllers/Calendar.php +++ b/application/controllers/Calendar.php @@ -416,7 +416,7 @@ class Calendar extends EA_Controller { $unavailability_id = request('unavailability_id'); - $unavailability = $this->appointments_model->find($unavailability_id); + $unavailability = $this->unavailabilities_model->find($unavailability_id); $this->check_event_permissions($unavailability['id_users_provider']); diff --git a/application/libraries/Availability.php b/application/libraries/Availability.php index fef7300e..3854dc0e 100644 --- a/application/libraries/Availability.php +++ b/application/libraries/Availability.php @@ -363,7 +363,7 @@ class Availability { int $exclude_appointment_id = NULL ): array { - $unavailability_events = $this->CI->appointments_model->get([ + $unavailability_events = $this->CI->unavailabilities_model->get([ 'is_unavailability' => TRUE, 'DATE(start_datetime) <=' => $date, 'DATE(end_datetime) >=' => $date,