Use the unavailabilities model to pull the proper records for the table view.

This commit is contained in:
Alex Tselegidis 2022-01-18 17:38:02 +01:00
parent 2f057ac28b
commit 628e5a2dfa
1 changed files with 1 additions and 3 deletions

View File

@ -483,12 +483,10 @@ class Calendar extends EA_Controller {
$response = [
'appointments' => $this->appointments_model->get([
'is_unavailability' => FALSE,
'start_datetime >=' => $start_date,
'end_datetime <=' => $end_date
]),
'unavailability_events' => $this->appointments_model->get([
'is_unavailability' => TRUE,
'unavailabilities' => $this->unavailabilities_model->get([
'start_datetime >=' => $start_date,
'end_datetime <=' => $end_date
])