mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-26 00:23:33 +03:00
Use the unavailabilities model instead of the appointments model
This commit is contained in:
parent
d7fc92bb80
commit
c226d188c9
2 changed files with 2 additions and 2 deletions
|
@ -416,7 +416,7 @@ class Calendar extends EA_Controller {
|
||||||
|
|
||||||
$unavailability_id = request('unavailability_id');
|
$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']);
|
$this->check_event_permissions($unavailability['id_users_provider']);
|
||||||
|
|
||||||
|
|
|
@ -363,7 +363,7 @@ class Availability {
|
||||||
int $exclude_appointment_id = NULL
|
int $exclude_appointment_id = NULL
|
||||||
): array
|
): array
|
||||||
{
|
{
|
||||||
$unavailability_events = $this->CI->appointments_model->get([
|
$unavailability_events = $this->CI->unavailabilities_model->get([
|
||||||
'is_unavailability' => TRUE,
|
'is_unavailability' => TRUE,
|
||||||
'DATE(start_datetime) <=' => $date,
|
'DATE(start_datetime) <=' => $date,
|
||||||
'DATE(end_datetime) >=' => $date,
|
'DATE(end_datetime) >=' => $date,
|
||||||
|
|
Loading…
Reference in a new issue