mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-10 01:52:22 +03:00
Add missing isPrivate to service and provider records
This commit is contained in:
parent
05e4829aaa
commit
a993b83025
3 changed files with 22 additions and 0 deletions
|
@ -748,6 +748,7 @@ class Providers_model extends EA_Model
|
|||
'state' => $provider['state'],
|
||||
'zip' => $provider['zip_code'],
|
||||
'notes' => $provider['notes'],
|
||||
'is_private' => $provider['is_private'],
|
||||
'timezone' => $provider['timezone'],
|
||||
];
|
||||
|
||||
|
@ -864,6 +865,10 @@ class Providers_model extends EA_Model
|
|||
$decoded_resource['services'] = $provider['services'];
|
||||
}
|
||||
|
||||
if (array_key_exists('isPrivate', $provider)) {
|
||||
$decoded_resource['is_private'] = (bool) $provider['isPrivate'];
|
||||
}
|
||||
|
||||
if (array_key_exists('settings', $provider)) {
|
||||
if (empty($decoded_resource['settings'])) {
|
||||
$decoded_resource['settings'] = [];
|
||||
|
|
|
@ -417,6 +417,7 @@ class Services_model extends EA_Model
|
|||
'location' => $service['location'],
|
||||
'availabilitiesType' => $service['availabilities_type'],
|
||||
'attendantsNumber' => (int) $service['attendants_number'],
|
||||
'isPrivate' => (bool) $service['is_private'],
|
||||
'serviceCategoryId' =>
|
||||
$service['id_service_categories'] !== null ? (int) $service['id_service_categories'] : null,
|
||||
];
|
||||
|
@ -474,6 +475,10 @@ class Services_model extends EA_Model
|
|||
$decoded_resource['id_service_categories'] = $service['serviceCategoryId'];
|
||||
}
|
||||
|
||||
if (array_key_exists('isPrivate', $service)) {
|
||||
$decoded_resource['is_private'] = (bool) $service['isPrivate'];
|
||||
}
|
||||
|
||||
$service = $decoded_resource;
|
||||
}
|
||||
}
|
||||
|
|
12
openapi.yml
12
openapi.yml
|
@ -2024,6 +2024,8 @@ components:
|
|||
type: string
|
||||
attendantsNumber:
|
||||
type: integer
|
||||
isPrivate:
|
||||
type: boolean
|
||||
categoryId:
|
||||
type: integer
|
||||
example:
|
||||
|
@ -2036,6 +2038,7 @@ components:
|
|||
description: This is a test service.
|
||||
availabilitiesType: flexible
|
||||
attendantsNumber: 1
|
||||
isPrivate: false
|
||||
serviceCategoryId: null
|
||||
ServicePayload:
|
||||
type: object
|
||||
|
@ -2056,6 +2059,8 @@ components:
|
|||
type: string
|
||||
attendantsNumber:
|
||||
type: integer
|
||||
isPrivate:
|
||||
type: boolean
|
||||
serviceCategoryId:
|
||||
type: integer
|
||||
example:
|
||||
|
@ -2067,6 +2072,7 @@ components:
|
|||
description: This is a test service.
|
||||
availabilitiesType: flexible
|
||||
attendantsNumber: 1
|
||||
isPrivate: false
|
||||
serviceCategoryId: null
|
||||
ServiceCategoryRecord:
|
||||
type: object
|
||||
|
@ -2226,6 +2232,8 @@ components:
|
|||
type: string
|
||||
language:
|
||||
type: string
|
||||
isPrivate:
|
||||
type: boolean
|
||||
services:
|
||||
type: array
|
||||
items:
|
||||
|
@ -2277,6 +2285,7 @@ components:
|
|||
timezone: UTC
|
||||
language: english
|
||||
services: [ ]
|
||||
isPrivate: false
|
||||
settings:
|
||||
username: chrisdoe
|
||||
password: Password@123
|
||||
|
@ -2340,6 +2349,8 @@ components:
|
|||
type: string
|
||||
language:
|
||||
type: string
|
||||
isPrivate:
|
||||
type: boolean
|
||||
services:
|
||||
type: array
|
||||
items:
|
||||
|
@ -2390,6 +2401,7 @@ components:
|
|||
notes: This is a test provider.
|
||||
timezone: UTC
|
||||
language: english
|
||||
isPrivate: false
|
||||
services: [ ]
|
||||
settings:
|
||||
username: chrisdoe
|
||||
|
|
Loading…
Reference in a new issue