mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-25 16:13:17 +03:00
Make sure the attach method works with API properties
This commit is contained in:
parent
89b9c802a2
commit
bd8144f7cb
3 changed files with 5 additions and 5 deletions
|
@ -491,7 +491,7 @@ class Appointments_model extends EA_Model {
|
|||
$appointment['service'] = $this
|
||||
->db
|
||||
->get_where('services', [
|
||||
'id' => $appointment['id_services']
|
||||
'id' => $appointment['id_services'] ?? $appointment['serviceId'] ?? NULL
|
||||
])
|
||||
->row_array();
|
||||
break;
|
||||
|
@ -500,7 +500,7 @@ class Appointments_model extends EA_Model {
|
|||
$appointment['provider'] = $this
|
||||
->db
|
||||
->get_where('users', [
|
||||
'id' => $appointment['id_users_provider']
|
||||
'id' => $appointment['id_users_provider'] ?? $appointment['providerId'] ?? NULL
|
||||
])
|
||||
->row_array();
|
||||
break;
|
||||
|
@ -509,7 +509,7 @@ class Appointments_model extends EA_Model {
|
|||
$appointment['customer'] = $this
|
||||
->db
|
||||
->get_where('users', [
|
||||
'id' => $appointment['id_users_customer']
|
||||
'id' => $appointment['id_users_customer'] ?? $appointment['customerId'] ?? NULL
|
||||
])
|
||||
->row_array();
|
||||
break;
|
||||
|
|
|
@ -382,7 +382,7 @@ class Services_model extends EA_Model {
|
|||
$service['service_category'] = $this
|
||||
->db
|
||||
->get_where('service_categories', [
|
||||
'id' => $service['id_service_categories']
|
||||
'id' => $service['id_service_categories'] ?? $service['categoryId'] ?? NULL
|
||||
])
|
||||
->row_array();
|
||||
break;
|
||||
|
|
|
@ -348,7 +348,7 @@ class Unavailabilities_model extends EA_Model {
|
|||
$unavailability['provider'] = $this
|
||||
->db
|
||||
->get_where('users', [
|
||||
'id' => $unavailability['id_users_provider']
|
||||
'id' => $unavailability['id_users_provider'] ?? $unavailability['providerId'] ?? NULL
|
||||
])
|
||||
->row_array();
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue