mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-28 10:53:40 +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'],
|
'state' => $provider['state'],
|
||||||
'zip' => $provider['zip_code'],
|
'zip' => $provider['zip_code'],
|
||||||
'notes' => $provider['notes'],
|
'notes' => $provider['notes'],
|
||||||
|
'is_private' => $provider['is_private'],
|
||||||
'timezone' => $provider['timezone'],
|
'timezone' => $provider['timezone'],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -864,6 +865,10 @@ class Providers_model extends EA_Model
|
||||||
$decoded_resource['services'] = $provider['services'];
|
$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 (array_key_exists('settings', $provider)) {
|
||||||
if (empty($decoded_resource['settings'])) {
|
if (empty($decoded_resource['settings'])) {
|
||||||
$decoded_resource['settings'] = [];
|
$decoded_resource['settings'] = [];
|
||||||
|
|
|
@ -417,6 +417,7 @@ class Services_model extends EA_Model
|
||||||
'location' => $service['location'],
|
'location' => $service['location'],
|
||||||
'availabilitiesType' => $service['availabilities_type'],
|
'availabilitiesType' => $service['availabilities_type'],
|
||||||
'attendantsNumber' => (int) $service['attendants_number'],
|
'attendantsNumber' => (int) $service['attendants_number'],
|
||||||
|
'isPrivate' => (bool) $service['is_private'],
|
||||||
'serviceCategoryId' =>
|
'serviceCategoryId' =>
|
||||||
$service['id_service_categories'] !== null ? (int) $service['id_service_categories'] : null,
|
$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'];
|
$decoded_resource['id_service_categories'] = $service['serviceCategoryId'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (array_key_exists('isPrivate', $service)) {
|
||||||
|
$decoded_resource['is_private'] = (bool) $service['isPrivate'];
|
||||||
|
}
|
||||||
|
|
||||||
$service = $decoded_resource;
|
$service = $decoded_resource;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
12
openapi.yml
12
openapi.yml
|
@ -2024,6 +2024,8 @@ components:
|
||||||
type: string
|
type: string
|
||||||
attendantsNumber:
|
attendantsNumber:
|
||||||
type: integer
|
type: integer
|
||||||
|
isPrivate:
|
||||||
|
type: boolean
|
||||||
categoryId:
|
categoryId:
|
||||||
type: integer
|
type: integer
|
||||||
example:
|
example:
|
||||||
|
@ -2036,6 +2038,7 @@ components:
|
||||||
description: This is a test service.
|
description: This is a test service.
|
||||||
availabilitiesType: flexible
|
availabilitiesType: flexible
|
||||||
attendantsNumber: 1
|
attendantsNumber: 1
|
||||||
|
isPrivate: false
|
||||||
serviceCategoryId: null
|
serviceCategoryId: null
|
||||||
ServicePayload:
|
ServicePayload:
|
||||||
type: object
|
type: object
|
||||||
|
@ -2056,6 +2059,8 @@ components:
|
||||||
type: string
|
type: string
|
||||||
attendantsNumber:
|
attendantsNumber:
|
||||||
type: integer
|
type: integer
|
||||||
|
isPrivate:
|
||||||
|
type: boolean
|
||||||
serviceCategoryId:
|
serviceCategoryId:
|
||||||
type: integer
|
type: integer
|
||||||
example:
|
example:
|
||||||
|
@ -2067,6 +2072,7 @@ components:
|
||||||
description: This is a test service.
|
description: This is a test service.
|
||||||
availabilitiesType: flexible
|
availabilitiesType: flexible
|
||||||
attendantsNumber: 1
|
attendantsNumber: 1
|
||||||
|
isPrivate: false
|
||||||
serviceCategoryId: null
|
serviceCategoryId: null
|
||||||
ServiceCategoryRecord:
|
ServiceCategoryRecord:
|
||||||
type: object
|
type: object
|
||||||
|
@ -2226,6 +2232,8 @@ components:
|
||||||
type: string
|
type: string
|
||||||
language:
|
language:
|
||||||
type: string
|
type: string
|
||||||
|
isPrivate:
|
||||||
|
type: boolean
|
||||||
services:
|
services:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
|
@ -2277,6 +2285,7 @@ components:
|
||||||
timezone: UTC
|
timezone: UTC
|
||||||
language: english
|
language: english
|
||||||
services: [ ]
|
services: [ ]
|
||||||
|
isPrivate: false
|
||||||
settings:
|
settings:
|
||||||
username: chrisdoe
|
username: chrisdoe
|
||||||
password: Password@123
|
password: Password@123
|
||||||
|
@ -2340,6 +2349,8 @@ components:
|
||||||
type: string
|
type: string
|
||||||
language:
|
language:
|
||||||
type: string
|
type: string
|
||||||
|
isPrivate:
|
||||||
|
type: boolean
|
||||||
services:
|
services:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
|
@ -2390,6 +2401,7 @@ components:
|
||||||
notes: This is a test provider.
|
notes: This is a test provider.
|
||||||
timezone: UTC
|
timezone: UTC
|
||||||
language: english
|
language: english
|
||||||
|
isPrivate: false
|
||||||
services: [ ]
|
services: [ ]
|
||||||
settings:
|
settings:
|
||||||
username: chrisdoe
|
username: chrisdoe
|
||||||
|
|
Loading…
Reference in a new issue