forked from mirrors/easyappointments
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
|
$appointment['service'] = $this
|
||||||
->db
|
->db
|
||||||
->get_where('services', [
|
->get_where('services', [
|
||||||
'id' => $appointment['id_services']
|
'id' => $appointment['id_services'] ?? $appointment['serviceId'] ?? NULL
|
||||||
])
|
])
|
||||||
->row_array();
|
->row_array();
|
||||||
break;
|
break;
|
||||||
|
@ -500,7 +500,7 @@ class Appointments_model extends EA_Model {
|
||||||
$appointment['provider'] = $this
|
$appointment['provider'] = $this
|
||||||
->db
|
->db
|
||||||
->get_where('users', [
|
->get_where('users', [
|
||||||
'id' => $appointment['id_users_provider']
|
'id' => $appointment['id_users_provider'] ?? $appointment['providerId'] ?? NULL
|
||||||
])
|
])
|
||||||
->row_array();
|
->row_array();
|
||||||
break;
|
break;
|
||||||
|
@ -509,7 +509,7 @@ class Appointments_model extends EA_Model {
|
||||||
$appointment['customer'] = $this
|
$appointment['customer'] = $this
|
||||||
->db
|
->db
|
||||||
->get_where('users', [
|
->get_where('users', [
|
||||||
'id' => $appointment['id_users_customer']
|
'id' => $appointment['id_users_customer'] ?? $appointment['customerId'] ?? NULL
|
||||||
])
|
])
|
||||||
->row_array();
|
->row_array();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -382,7 +382,7 @@ class Services_model extends EA_Model {
|
||||||
$service['service_category'] = $this
|
$service['service_category'] = $this
|
||||||
->db
|
->db
|
||||||
->get_where('service_categories', [
|
->get_where('service_categories', [
|
||||||
'id' => $service['id_service_categories']
|
'id' => $service['id_service_categories'] ?? $service['categoryId'] ?? NULL
|
||||||
])
|
])
|
||||||
->row_array();
|
->row_array();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -348,7 +348,7 @@ class Unavailabilities_model extends EA_Model {
|
||||||
$unavailability['provider'] = $this
|
$unavailability['provider'] = $this
|
||||||
->db
|
->db
|
||||||
->get_where('users', [
|
->get_where('users', [
|
||||||
'id' => $unavailability['id_users_provider']
|
'id' => $unavailability['id_users_provider'] ?? $unavailability['providerId'] ?? NULL
|
||||||
])
|
])
|
||||||
->row_array();
|
->row_array();
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue