Unavailabilities can only attach a provider record

This commit is contained in:
Alex Tselegidis 2021-11-06 15:21:11 +01:00
parent bcc9b88623
commit 89b9c802a2

View file

@ -344,15 +344,6 @@ class Unavailabilities_model extends EA_Model {
{ {
switch ($resource) switch ($resource)
{ {
case 'service':
$unavailability['service'] = $this
->db
->get_where('services', [
'id' => $unavailability['id_services']
])
->row_array();
break;
case 'provider': case 'provider':
$unavailability['provider'] = $this $unavailability['provider'] = $this
->db ->db
@ -361,16 +352,7 @@ class Unavailabilities_model extends EA_Model {
]) ])
->row_array(); ->row_array();
break; break;
case 'customer':
$unavailability['customer'] = $this
->db
->get_where('users', [
'id' => $unavailability['id_users_customer']
])
->row_array();
break;
default: default:
throw new InvalidArgumentException('The requested unavailability relation is not supported: ' . $resource); throw new InvalidArgumentException('The requested unavailability relation is not supported: ' . $resource);
} }