mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-26 16:42:27 +03:00
Unavailabilities can only attach a provider record
This commit is contained in:
parent
bcc9b88623
commit
89b9c802a2
1 changed files with 1 additions and 19 deletions
|
@ -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
|
||||||
|
@ -362,15 +353,6 @@ 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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue