Merge branch 'develop'
This commit is contained in:
commit
2512159285
91 changed files with 1290 additions and 825 deletions
19
CHANGELOG.md
19
CHANGELOG.md
|
@ -3,6 +3,22 @@
|
||||||
This file contains the code changes that were introduced into each release (starting from v1.1.0) so that is easy for
|
This file contains the code changes that were introduced into each release (starting from v1.1.0) so that is easy for
|
||||||
developers to maintain and readjust their custom modifications on the main project codebase.
|
developers to maintain and readjust their custom modifications on the main project codebase.
|
||||||
|
|
||||||
|
## [1.4.1] - 2020-12-14
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- #952: Add timezone support in the REST API, when managing users.
|
||||||
|
- #955: Display confirmation modal when disabling a connected Google Calendar Sync.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- #945: Google Calendar sync throws an error with all day Google Calendar Events.
|
||||||
|
- #946: Typo in JavaScript code leads to a broken calendar view, when loading unavailability events with note contents.
|
||||||
|
- #948: Multiple attendant services may lead to double booking.
|
||||||
|
- #950: Cannot create provider without services via the API, some values (other endpoints) are optional too.
|
||||||
|
- #953: Current time indicator in fullcalendar is showing time in local timezone and not in the user selected timezone.
|
||||||
|
- #954: The password must be provided via the API when creating new users.
|
||||||
|
|
||||||
## [1.4.0] - 2020-12-09
|
## [1.4.0] - 2020-12-09
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -34,7 +50,6 @@ developers to maintain and readjust their custom modifications on the main proje
|
||||||
- #770: Store customer's language and use it with notifications or when the customer manages and existing appointment.
|
- #770: Store customer's language and use it with notifications or when the customer manages and existing appointment.
|
||||||
- #889: Notify admins and secretaries on appointment changes.
|
- #889: Notify admins and secretaries on appointment changes.
|
||||||
|
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- #386: Service price should be optional.
|
- #386: Service price should be optional.
|
||||||
|
@ -42,7 +57,6 @@ developers to maintain and readjust their custom modifications on the main proje
|
||||||
- #568: Sort providers alphabetically in the booking page.
|
- #568: Sort providers alphabetically in the booking page.
|
||||||
- #745: Add appointment notes preview in the event popover.
|
- #745: Add appointment notes preview in the event popover.
|
||||||
|
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- #171: Google calendar sync - wrong timezone for appointments.
|
- #171: Google calendar sync - wrong timezone for appointments.
|
||||||
|
@ -70,7 +84,6 @@ developers to maintain and readjust their custom modifications on the main proje
|
||||||
- #883: Appointment date is wrongly changed to today in some case.
|
- #883: Appointment date is wrongly changed to today in some case.
|
||||||
- #903: Notification not working when creating/updating/deleting an appointment from the REST API.
|
- #903: Notification not working when creating/updating/deleting an appointment from the REST API.
|
||||||
|
|
||||||
|
|
||||||
## [1.3.2] - 2018-07-29
|
## [1.3.2] - 2018-07-29
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
| Declare some of the global config values of Easy!Appointments.
|
| Declare some of the global config values of Easy!Appointments.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
$config['version'] = '1.4.0'; // This must be changed manually.
|
$config['version'] = '1.4.1'; // This must be changed manually.
|
||||||
$config['release_label'] = ''; // Leave empty for no title or add Alpha, Beta etc ...
|
$config['release_label'] = ''; // Leave empty for no title or add Alpha, Beta etc ...
|
||||||
$config['debug'] = Config::DEBUG_MODE;
|
$config['debug'] = Config::DEBUG_MODE;
|
||||||
|
|
||||||
|
@ -304,7 +304,7 @@ $config['cache_path'] = __DIR__ . '/../../storage/cache/';
|
||||||
| new release.
|
| new release.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
$config['cache_busting_token'] = '729RF';
|
$config['cache_busting_token'] = '924WX';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
@ -267,6 +267,8 @@ class Appointments extends EA_Controller {
|
||||||
$appointment = $appointments[0];
|
$appointment = $appointments[0];
|
||||||
unset($appointment['notes']);
|
unset($appointment['notes']);
|
||||||
|
|
||||||
|
$customer = $this->customers_model->get_row($appointment['id_users_customer']);
|
||||||
|
|
||||||
$provider = $this->providers_model->get_row($appointment['id_users_provider']);
|
$provider = $this->providers_model->get_row($appointment['id_users_provider']);
|
||||||
|
|
||||||
$service = $this->services_model->get_row($appointment['id_services']);
|
$service = $this->services_model->get_row($appointment['id_services']);
|
||||||
|
@ -285,6 +287,13 @@ class Appointments extends EA_Controller {
|
||||||
'email' => $provider['email'],
|
'email' => $provider['email'],
|
||||||
'timezone' => $provider['timezone'],
|
'timezone' => $provider['timezone'],
|
||||||
],
|
],
|
||||||
|
'customer_data' => [
|
||||||
|
'id' => $customer['id'],
|
||||||
|
'first_name' => $customer['first_name'],
|
||||||
|
'last_name' => $customer['last_name'],
|
||||||
|
'email' => $customer['email'],
|
||||||
|
'timezone' => $customer['timezone'],
|
||||||
|
],
|
||||||
'service_data' => $service,
|
'service_data' => $service,
|
||||||
'company_name' => $company_name,
|
'company_name' => $company_name,
|
||||||
];
|
];
|
||||||
|
|
|
@ -82,11 +82,11 @@ class Backend_api extends EA_Controller {
|
||||||
])
|
])
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($response['appointments'] as $index => $appointment)
|
foreach ($response['appointments'] as &$appointment)
|
||||||
{
|
{
|
||||||
$response['appointments'][$index]['provider'] = $this->providers_model->get_row($appointment['id_users_provider']);
|
$appointment['provider'] = $this->providers_model->get_row($appointment['id_users_provider']);
|
||||||
$response['appointments'][$index]['service'] = $this->services_model->get_row($appointment['id_services']);
|
$appointment['service'] = $this->services_model->get_row($appointment['id_services']);
|
||||||
$response['appointments'][$index]['customer'] = $this->customers_model->get_row($appointment['id_users_customer']);
|
$appointment['customer'] = $this->customers_model->get_row($appointment['id_users_customer']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$user_id = $this->session->userdata('user_id');
|
$user_id = $this->session->userdata('user_id');
|
||||||
|
@ -218,6 +218,11 @@ class Backend_api extends EA_Controller {
|
||||||
$response['unavailables'] = $this->appointments_model->get_batch($where_clause);
|
$response['unavailables'] = $this->appointments_model->get_batch($where_clause);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach ($response['unavailables'] as &$unavailable)
|
||||||
|
{
|
||||||
|
$unavailable['provider'] = $this->providers_model->get_row($unavailable['id_users_provider']);
|
||||||
|
}
|
||||||
|
|
||||||
$this->output
|
$this->output
|
||||||
->set_content_type('application/json')
|
->set_content_type('application/json')
|
||||||
->set_output(json_encode($response));
|
->set_output(json_encode($response));
|
||||||
|
@ -282,16 +287,6 @@ class Backend_api extends EA_Controller {
|
||||||
$appointment['id_users_customer'] = $customer['id'];
|
$appointment['id_users_customer'] = $customer['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$provider_timezone = $this->user_model->get_user_timezone($appointment['id_users_provider']);
|
|
||||||
|
|
||||||
$session_timezone = $this->timezones->get_session_timezone();
|
|
||||||
|
|
||||||
$appointment['start_datetime'] = $this->timezones->convert($appointment['start_datetime'],
|
|
||||||
$session_timezone, $provider_timezone);
|
|
||||||
|
|
||||||
$appointment['end_datetime'] = $this->timezones->convert($appointment['end_datetime'],
|
|
||||||
$session_timezone, $provider_timezone);
|
|
||||||
|
|
||||||
$appointment['id'] = $this->appointments_model->add($appointment);
|
$appointment['id'] = $this->appointments_model->add($appointment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -565,8 +560,7 @@ class Backend_api extends EA_Controller {
|
||||||
|
|
||||||
foreach ($customers as &$customer)
|
foreach ($customers as &$customer)
|
||||||
{
|
{
|
||||||
$appointments = $this->appointments_model
|
$appointments = $this->appointments_model->get_batch(['id_users_customer' => $customer['id']]);
|
||||||
->get_batch(['id_users_customer' => $customer['id']]);
|
|
||||||
|
|
||||||
foreach ($appointments as &$appointment)
|
foreach ($appointments as &$appointment)
|
||||||
{
|
{
|
||||||
|
@ -615,16 +609,6 @@ class Backend_api extends EA_Controller {
|
||||||
$provider = $this->providers_model->get_row($unavailable['id_users_provider']);
|
$provider = $this->providers_model->get_row($unavailable['id_users_provider']);
|
||||||
|
|
||||||
// Add appointment
|
// Add appointment
|
||||||
$provider_timezone = $this->user_model->get_user_timezone($unavailable['id_users_provider']);
|
|
||||||
|
|
||||||
$session_timezone = $this->timezones->get_session_timezone();
|
|
||||||
|
|
||||||
$unavailable['start_datetime'] = $this->timezones->convert($unavailable['start_datetime'],
|
|
||||||
$session_timezone, $provider_timezone);
|
|
||||||
|
|
||||||
$unavailable['end_datetime'] = $this->timezones->convert($unavailable['end_datetime'],
|
|
||||||
$session_timezone, $provider_timezone);
|
|
||||||
|
|
||||||
$unavailable['id'] = $this->appointments_model->add_unavailable($unavailable);
|
$unavailable['id'] = $this->appointments_model->add_unavailable($unavailable);
|
||||||
$unavailable = $this->appointments_model->get_row($unavailable['id']); // fetch all inserted data
|
$unavailable = $this->appointments_model->get_row($unavailable['id']); // fetch all inserted data
|
||||||
|
|
||||||
|
|
|
@ -182,6 +182,11 @@ class Google extends EA_Controller {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($google_event->getStart()->getDateTime() === $google_event->getEnd()->getDateTime())
|
||||||
|
{
|
||||||
|
continue; // Skip all day events
|
||||||
|
}
|
||||||
|
|
||||||
$results = $CI->appointments_model->get_batch(['id_google_calendar' => $google_event->getId()]);
|
$results = $CI->appointments_model->get_batch(['id_google_calendar' => $google_event->getId()]);
|
||||||
|
|
||||||
if ( ! empty($results))
|
if ( ! empty($results))
|
||||||
|
|
|
@ -87,11 +87,16 @@ class Admins extends API_V1_Controller {
|
||||||
$admin = $request->get_body();
|
$admin = $request->get_body();
|
||||||
$this->parser->decode($admin);
|
$this->parser->decode($admin);
|
||||||
|
|
||||||
if (isset($admin['id']))
|
if (array_key_exists('id', $admin))
|
||||||
{
|
{
|
||||||
unset($admin['id']);
|
unset($admin['id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( ! array_key_exists('settings', $admin))
|
||||||
|
{
|
||||||
|
throw new Exception('No settings property provided.');
|
||||||
|
}
|
||||||
|
|
||||||
$id = $this->admins_model->add($admin);
|
$id = $this->admins_model->add($admin);
|
||||||
|
|
||||||
// Fetch the new object from the database and return it to the client.
|
// Fetch the new object from the database and return it to the client.
|
||||||
|
|
|
@ -84,7 +84,7 @@ class Appointments extends API_V1_Controller {
|
||||||
}
|
}
|
||||||
catch (Exception $exception)
|
catch (Exception $exception)
|
||||||
{
|
{
|
||||||
exit($this->handle_exception($exception));
|
$this->handle_exception($exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,6 +120,7 @@ class Appointments extends API_V1_Controller {
|
||||||
|
|
||||||
$id = $this->appointments_model->add($appointment);
|
$id = $this->appointments_model->add($appointment);
|
||||||
|
|
||||||
|
$appointment = $this->appointments_model->get_row($id);
|
||||||
$service = $this->services_model->get_row($appointment['id_services']);
|
$service = $this->services_model->get_row($appointment['id_services']);
|
||||||
$provider = $this->providers_model->get_row($appointment['id_users_provider']);
|
$provider = $this->providers_model->get_row($appointment['id_users_provider']);
|
||||||
$customer = $this->customers_model->get_row($appointment['id_users_customer']);
|
$customer = $this->customers_model->get_row($appointment['id_users_customer']);
|
||||||
|
@ -142,7 +143,7 @@ class Appointments extends API_V1_Controller {
|
||||||
}
|
}
|
||||||
catch (Exception $exception)
|
catch (Exception $exception)
|
||||||
{
|
{
|
||||||
exit($this->handle_exception($exception));
|
$this->handle_exception($exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,7 +193,7 @@ class Appointments extends API_V1_Controller {
|
||||||
}
|
}
|
||||||
catch (Exception $exception)
|
catch (Exception $exception)
|
||||||
{
|
{
|
||||||
exit($this->handle_exception($exception));
|
$this->handle_exception($exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -231,7 +232,7 @@ class Appointments extends API_V1_Controller {
|
||||||
}
|
}
|
||||||
catch (Exception $exception)
|
catch (Exception $exception)
|
||||||
{
|
{
|
||||||
exit($this->handle_exception($exception));
|
$this->handle_exception($exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,11 +87,26 @@ class Providers extends API_V1_Controller {
|
||||||
$provider = $request->get_body();
|
$provider = $request->get_body();
|
||||||
$this->parser->decode($provider);
|
$this->parser->decode($provider);
|
||||||
|
|
||||||
if (isset($provider['id']))
|
if (array_key_exists('id', $provider))
|
||||||
{
|
{
|
||||||
unset($provider['id']);
|
unset($provider['id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( ! array_key_exists('services', $provider))
|
||||||
|
{
|
||||||
|
throw new Exception('No services property provided.');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! array_key_exists('settings', $provider))
|
||||||
|
{
|
||||||
|
throw new Exception('No settings property provided.');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! array_key_exists('working_plan', $provider['settings']['working_plan']))
|
||||||
|
{
|
||||||
|
$provider['settings']['working_plan'] = $this->settings_model->get_setting('company_working_plan');
|
||||||
|
}
|
||||||
|
|
||||||
$id = $this->providers_model->add($provider);
|
$id = $this->providers_model->add($provider);
|
||||||
|
|
||||||
// Fetch the new object from the database and return it to the client.
|
// Fetch the new object from the database and return it to the client.
|
||||||
|
|
|
@ -87,11 +87,21 @@ class Secretaries extends API_V1_Controller {
|
||||||
$secretary = $request->get_body();
|
$secretary = $request->get_body();
|
||||||
$this->parser->decode($secretary);
|
$this->parser->decode($secretary);
|
||||||
|
|
||||||
if (isset($secretary['id']))
|
if (array_key_exists('id', $secretary))
|
||||||
{
|
{
|
||||||
unset($secretary['id']);
|
unset($secretary['id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( ! array_key_exists('providers', $secretary))
|
||||||
|
{
|
||||||
|
throw new Exception('No providers property provided.');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! array_key_exists('settings', $secretary))
|
||||||
|
{
|
||||||
|
throw new Exception('No settings property provided.');
|
||||||
|
}
|
||||||
|
|
||||||
$id = $this->secretaries_model->add($secretary);
|
$id = $this->secretaries_model->add($secretary);
|
||||||
|
|
||||||
// Fetch the new object from the database and return it to the client.
|
// Fetch the new object from the database and return it to the client.
|
||||||
|
|
|
@ -88,7 +88,7 @@ class Settings extends API_V1_Controller {
|
||||||
}
|
}
|
||||||
catch (Exception $exception)
|
catch (Exception $exception)
|
||||||
{
|
{
|
||||||
exit($this->handle_exception($exception));
|
$this->handle_exception($exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ class Settings extends API_V1_Controller {
|
||||||
}
|
}
|
||||||
catch (Exception $exception)
|
catch (Exception $exception)
|
||||||
{
|
{
|
||||||
exit($this->handle_exception($exception));
|
$this->handle_exception($exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ class Settings extends API_V1_Controller {
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$result = $this->settings_model->remove_setting($name);
|
$this->settings_model->remove_setting($name);
|
||||||
|
|
||||||
$response = new Response([
|
$response = new Response([
|
||||||
'code' => 200,
|
'code' => 200,
|
||||||
|
@ -140,7 +140,7 @@ class Settings extends API_V1_Controller {
|
||||||
}
|
}
|
||||||
catch (Exception $exception)
|
catch (Exception $exception)
|
||||||
{
|
{
|
||||||
exit($this->handle_exception($exception));
|
$this->handle_exception($exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,7 @@ class Unavailabilities extends API_V1_Controller {
|
||||||
}
|
}
|
||||||
catch (Exception $exception)
|
catch (Exception $exception)
|
||||||
{
|
{
|
||||||
exit($this->handle_exception($exception));
|
$this->handle_exception($exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ class Unavailabilities extends API_V1_Controller {
|
||||||
}
|
}
|
||||||
catch (Exception $exception)
|
catch (Exception $exception)
|
||||||
{
|
{
|
||||||
exit($this->handle_exception($exception));
|
$this->handle_exception($exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ class Unavailabilities extends API_V1_Controller {
|
||||||
}
|
}
|
||||||
catch (Exception $exception)
|
catch (Exception $exception)
|
||||||
{
|
{
|
||||||
exit($this->handle_exception($exception));
|
$this->handle_exception($exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ class Unavailabilities extends API_V1_Controller {
|
||||||
}
|
}
|
||||||
catch (Exception $exception)
|
catch (Exception $exception)
|
||||||
{
|
{
|
||||||
exit($this->handle_exception($exception));
|
$this->handle_exception($exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php defined('BASEPATH') OR exit('No direct script access allowed');
|
||||||
// Arabic
|
// Arabic
|
||||||
$lang['page_title'] = 'احجز موعد مع';
|
$lang['page_title'] = 'احجز موعد مع';
|
||||||
$lang['service_and_provider'] = 'اختر الخدمة والمزود';
|
$lang['service_and_provider'] = 'اختر الخدمة والمزود';
|
||||||
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'تسجيل الخروج';
|
||||||
$lang['synchronize'] = 'المزامنة';
|
$lang['synchronize'] = 'المزامنة';
|
||||||
$lang['enable_sync'] = 'تمكين المزامنة';
|
$lang['enable_sync'] = 'تمكين المزامنة';
|
||||||
$lang['disable_sync'] = 'تعطيل المزامنة';
|
$lang['disable_sync'] = 'تعطيل المزامنة';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = 'اعادة التحميل';
|
$lang['reload'] = 'اعادة التحميل';
|
||||||
$lang['appointment'] = 'الموعد';
|
$lang['appointment'] = 'الموعد';
|
||||||
$lang['unavailable'] = 'غير متوفر';
|
$lang['unavailable'] = 'غير متوفر';
|
||||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Изход';
|
||||||
$lang['synchronize'] = 'синхронизиране';
|
$lang['synchronize'] = 'синхронизиране';
|
||||||
$lang['enable_sync'] = 'Активиране на синхронизиране';
|
$lang['enable_sync'] = 'Активиране на синхронизиране';
|
||||||
$lang['disable_sync'] = 'Изключване на синхронизиране';
|
$lang['disable_sync'] = 'Изключване на синхронизиране';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = 'Презареждане';
|
$lang['reload'] = 'Презареждане';
|
||||||
$lang['appointment'] = 'Час';
|
$lang['appointment'] = 'Час';
|
||||||
$lang['unavailable'] = 'не е на лице';
|
$lang['unavailable'] = 'не е на лице';
|
||||||
|
|
|
@ -62,6 +62,7 @@ $lang['log_out'] = 'Sortida';
|
||||||
$lang['synchronize'] = 'Sincronitza';
|
$lang['synchronize'] = 'Sincronitza';
|
||||||
$lang['enable_sync'] = 'Permet Sync';
|
$lang['enable_sync'] = 'Permet Sync';
|
||||||
$lang['disable_sync'] = 'No permetis Sync';
|
$lang['disable_sync'] = 'No permetis Sync';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = 'Recarrega';
|
$lang['reload'] = 'Recarrega';
|
||||||
$lang['appointment'] = 'Cita';
|
$lang['appointment'] = 'Cita';
|
||||||
$lang['unavailable'] = 'No disponible';
|
$lang['unavailable'] = 'No disponible';
|
||||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = '注销';
|
||||||
$lang['synchronize'] = '同步';
|
$lang['synchronize'] = '同步';
|
||||||
$lang['enable_sync'] = '开启同步';
|
$lang['enable_sync'] = '开启同步';
|
||||||
$lang['disable_sync'] = '关闭同步';
|
$lang['disable_sync'] = '关闭同步';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = '刷新';
|
$lang['reload'] = '刷新';
|
||||||
$lang['appointment'] = '预约';
|
$lang['appointment'] = '预约';
|
||||||
$lang['unavailable'] = '不可用';
|
$lang['unavailable'] = '不可用';
|
||||||
|
|
|
@ -62,6 +62,7 @@ $lang['log_out'] = 'Odhlášení';
|
||||||
$lang['synchronize'] = 'Synchronizace';
|
$lang['synchronize'] = 'Synchronizace';
|
||||||
$lang['enable_sync'] = 'Povolit synchronizaci';
|
$lang['enable_sync'] = 'Povolit synchronizaci';
|
||||||
$lang['disable_sync'] = 'Zakázat synchronizaci';
|
$lang['disable_sync'] = 'Zakázat synchronizaci';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = 'Obnovit';
|
$lang['reload'] = 'Obnovit';
|
||||||
$lang['appointment'] = 'Schůzka';
|
$lang['appointment'] = 'Schůzka';
|
||||||
$lang['unavailable'] = 'Nedostupnost';
|
$lang['unavailable'] = 'Nedostupnost';
|
||||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Log ud';
|
||||||
$lang['synchronize'] = 'Synkroniser';
|
$lang['synchronize'] = 'Synkroniser';
|
||||||
$lang['enable_sync'] = 'Aktivere';
|
$lang['enable_sync'] = 'Aktivere';
|
||||||
$lang['disable_sync'] = 'Deaktivere';
|
$lang['disable_sync'] = 'Deaktivere';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = 'Opdater';
|
$lang['reload'] = 'Opdater';
|
||||||
$lang['appointment'] = 'Aftale';
|
$lang['appointment'] = 'Aftale';
|
||||||
$lang['unavailable'] = 'Ikke tilgængelig';
|
$lang['unavailable'] = 'Ikke tilgængelig';
|
||||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Afmelden';
|
||||||
$lang['synchronize'] = 'Synchroniseren';
|
$lang['synchronize'] = 'Synchroniseren';
|
||||||
$lang['enable_sync'] = 'Synchronisatie inschakelen';
|
$lang['enable_sync'] = 'Synchronisatie inschakelen';
|
||||||
$lang['disable_sync'] = 'Synchronisatie uitschakelen';
|
$lang['disable_sync'] = 'Synchronisatie uitschakelen';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = 'Herladen';
|
$lang['reload'] = 'Herladen';
|
||||||
$lang['appointment'] = 'Afspraak';
|
$lang['appointment'] = 'Afspraak';
|
||||||
$lang['unavailable'] = 'Niet beschikbaar';
|
$lang['unavailable'] = 'Niet beschikbaar';
|
||||||
|
|
|
@ -65,6 +65,7 @@ $lang['log_out'] = 'Log Out';
|
||||||
$lang['synchronize'] = 'Synchronize';
|
$lang['synchronize'] = 'Synchronize';
|
||||||
$lang['enable_sync'] = 'Enable Sync';
|
$lang['enable_sync'] = 'Enable Sync';
|
||||||
$lang['disable_sync'] = 'Disable Sync';
|
$lang['disable_sync'] = 'Disable Sync';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = 'Reload';
|
$lang['reload'] = 'Reload';
|
||||||
$lang['appointment'] = 'Appointment';
|
$lang['appointment'] = 'Appointment';
|
||||||
$lang['unavailable'] = 'Unavailable';
|
$lang['unavailable'] = 'Unavailable';
|
||||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Kirjaudu ulos';
|
||||||
$lang['synchronize'] = 'Synkronoi';
|
$lang['synchronize'] = 'Synkronoi';
|
||||||
$lang['enable_sync'] = 'Aktivoi synkronointi';
|
$lang['enable_sync'] = 'Aktivoi synkronointi';
|
||||||
$lang['disable_sync'] = 'Poista synkronointi';
|
$lang['disable_sync'] = 'Poista synkronointi';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = 'Lataa uudelleen';
|
$lang['reload'] = 'Lataa uudelleen';
|
||||||
$lang['appointment'] = 'Varaus';
|
$lang['appointment'] = 'Varaus';
|
||||||
$lang['unavailable'] = 'Poissaolo';
|
$lang['unavailable'] = 'Poissaolo';
|
||||||
|
|
|
@ -64,6 +64,7 @@ $lang['log_out'] = 'Déconnexion';
|
||||||
$lang['synchronize'] = 'Synchronisation';
|
$lang['synchronize'] = 'Synchronisation';
|
||||||
$lang['enable_sync'] = 'Activer la synchronisation';
|
$lang['enable_sync'] = 'Activer la synchronisation';
|
||||||
$lang['disable_sync'] = 'Désactiver la synchronisation';
|
$lang['disable_sync'] = 'Désactiver la synchronisation';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = 'Actualiser';
|
$lang['reload'] = 'Actualiser';
|
||||||
$lang['appointment'] = 'Rendez-vous';
|
$lang['appointment'] = 'Rendez-vous';
|
||||||
$lang['unavailable'] = 'Indisponible';
|
$lang['unavailable'] = 'Indisponible';
|
||||||
|
|
|
@ -63,6 +63,7 @@ $lang['log_out'] = 'Abmelden';
|
||||||
$lang['synchronize'] = 'Synchronisieren';
|
$lang['synchronize'] = 'Synchronisieren';
|
||||||
$lang['enable_sync'] = 'Sync einschalten';
|
$lang['enable_sync'] = 'Sync einschalten';
|
||||||
$lang['disable_sync'] = 'Sync ausschalten';
|
$lang['disable_sync'] = 'Sync ausschalten';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = 'Neu laden';
|
$lang['reload'] = 'Neu laden';
|
||||||
$lang['appointment'] = 'Termin';
|
$lang['appointment'] = 'Termin';
|
||||||
$lang['unavailable'] = 'Nicht möglich';
|
$lang['unavailable'] = 'Nicht möglich';
|
||||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Αποσύνδεση';
|
||||||
$lang['synchronize'] = 'Συγχρονισμός';
|
$lang['synchronize'] = 'Συγχρονισμός';
|
||||||
$lang['enable_sync'] = 'Ενεργοποίηση Συγχρ.';
|
$lang['enable_sync'] = 'Ενεργοποίηση Συγχρ.';
|
||||||
$lang['disable_sync'] = 'Απενεργοποίηση Συγχρ.';
|
$lang['disable_sync'] = 'Απενεργοποίηση Συγχρ.';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = 'Επαναφόρτωση';
|
$lang['reload'] = 'Επαναφόρτωση';
|
||||||
$lang['appointment'] = 'Ραντεβού';
|
$lang['appointment'] = 'Ραντεβού';
|
||||||
$lang['unavailable'] = 'Μη Διαθέσιμος';
|
$lang['unavailable'] = 'Μη Διαθέσιμος';
|
||||||
|
|
|
@ -65,6 +65,7 @@ $lang['log_out'] = 'יציאה';
|
||||||
$lang['synchronize'] = 'סינכרון';
|
$lang['synchronize'] = 'סינכרון';
|
||||||
$lang['enable_sync'] = 'אפשר סינכרון';
|
$lang['enable_sync'] = 'אפשר סינכרון';
|
||||||
$lang['disable_sync'] = 'בטל סינכרון';
|
$lang['disable_sync'] = 'בטל סינכרון';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = 'רענון';
|
$lang['reload'] = 'רענון';
|
||||||
$lang['appointment'] = 'פגישה';
|
$lang['appointment'] = 'פגישה';
|
||||||
$lang['unavailable'] = 'אינו זמין';
|
$lang['unavailable'] = 'אינו זמין';
|
||||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'लॉग आउट';
|
||||||
$lang['synchronize'] = 'सिंक्रनाइज़';
|
$lang['synchronize'] = 'सिंक्रनाइज़';
|
||||||
$lang['enable_sync'] = 'सिंक सक्षम करें';
|
$lang['enable_sync'] = 'सिंक सक्षम करें';
|
||||||
$lang['disable_sync'] = 'सिंक अक्षम करें';
|
$lang['disable_sync'] = 'सिंक अक्षम करें';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = 'रीलोड';
|
$lang['reload'] = 'रीलोड';
|
||||||
$lang['appointment'] = 'अपॉइंटमेंट';
|
$lang['appointment'] = 'अपॉइंटमेंट';
|
||||||
$lang['unavailable'] = 'अनुपलब्ध';
|
$lang['unavailable'] = 'अनुपलब्ध';
|
||||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Kijelentkezés';
|
||||||
$lang['synchronize'] = 'Szinkronizálás';
|
$lang['synchronize'] = 'Szinkronizálás';
|
||||||
$lang['enable_sync'] = 'Szinkronizálás engedélyezése';
|
$lang['enable_sync'] = 'Szinkronizálás engedélyezése';
|
||||||
$lang['disable_sync'] = 'Szinkronizálás tiltása';
|
$lang['disable_sync'] = 'Szinkronizálás tiltása';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = 'Frissít';
|
$lang['reload'] = 'Frissít';
|
||||||
$lang['appointment'] = 'Időpont';
|
$lang['appointment'] = 'Időpont';
|
||||||
$lang['unavailable'] = 'Nem áll rendelkezésre';
|
$lang['unavailable'] = 'Nem áll rendelkezésre';
|
||||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Esci';
|
||||||
$lang['synchronize'] = 'Sincronizza';
|
$lang['synchronize'] = 'Sincronizza';
|
||||||
$lang['enable_sync'] = 'Abilita sincronizzazione';
|
$lang['enable_sync'] = 'Abilita sincronizzazione';
|
||||||
$lang['disable_sync'] = 'Disabilita sincronizzazione';
|
$lang['disable_sync'] = 'Disabilita sincronizzazione';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = 'Reload';
|
$lang['reload'] = 'Reload';
|
||||||
$lang['appointment'] = 'Appointment';
|
$lang['appointment'] = 'Appointment';
|
||||||
$lang['unavailable'] = 'Non disponibile';
|
$lang['unavailable'] = 'Non disponibile';
|
||||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'ログアウト';
|
||||||
$lang['synchronize'] = '同期';
|
$lang['synchronize'] = '同期';
|
||||||
$lang['enable_sync'] = '同期有効化';
|
$lang['enable_sync'] = '同期有効化';
|
||||||
$lang['disable_sync'] = '同期無効化';
|
$lang['disable_sync'] = '同期無効化';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = '再読込';
|
$lang['reload'] = '再読込';
|
||||||
$lang['appointment'] = '予約';
|
$lang['appointment'] = '予約';
|
||||||
$lang['unavailable'] = '空き無し';
|
$lang['unavailable'] = '空き無し';
|
||||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Ofmellen';
|
||||||
$lang['synchronize'] = 'Synchroniséieren';
|
$lang['synchronize'] = 'Synchroniséieren';
|
||||||
$lang['enable_sync'] = 'Sync aschalten';
|
$lang['enable_sync'] = 'Sync aschalten';
|
||||||
$lang['disable_sync'] = 'Sync ausschalten';
|
$lang['disable_sync'] = 'Sync ausschalten';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = 'Nei lueden';
|
$lang['reload'] = 'Nei lueden';
|
||||||
$lang['appointment'] = 'Termäin';
|
$lang['appointment'] = 'Termäin';
|
||||||
$lang['unavailable'] = 'Net méiglech';
|
$lang['unavailable'] = 'Net méiglech';
|
||||||
|
|
|
@ -62,6 +62,7 @@ $lang['log_out'] = 'लॉग आउट';
|
||||||
$lang['synchronize'] = 'समक्रमित करा';
|
$lang['synchronize'] = 'समक्रमित करा';
|
||||||
$lang['enable_sync'] = 'समक्रमित सक्षम करा';
|
$lang['enable_sync'] = 'समक्रमित सक्षम करा';
|
||||||
$lang['disable_sync'] = 'समक्रमित अक्षम कर';
|
$lang['disable_sync'] = 'समक्रमित अक्षम कर';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = 'रीलोड करा';
|
$lang['reload'] = 'रीलोड करा';
|
||||||
$lang['appointment'] = 'अपॉइंटमेंट';
|
$lang['appointment'] = 'अपॉइंटमेंट';
|
||||||
$lang['unavailable'] = 'अनुपलब्ध';
|
$lang['unavailable'] = 'अनुपलब्ध';
|
||||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Wyloguj';
|
||||||
$lang['synchronize'] = 'Synchronizuj';
|
$lang['synchronize'] = 'Synchronizuj';
|
||||||
$lang['enable_sync'] = 'Włącz Synch.';
|
$lang['enable_sync'] = 'Włącz Synch.';
|
||||||
$lang['disable_sync'] = 'Wyłącz Synch.';
|
$lang['disable_sync'] = 'Wyłącz Synch.';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = 'Odśwież';
|
$lang['reload'] = 'Odśwież';
|
||||||
$lang['appointment'] = 'Wizyta';
|
$lang['appointment'] = 'Wizyta';
|
||||||
$lang['unavailable'] = 'Niedostępne';
|
$lang['unavailable'] = 'Niedostępne';
|
||||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Sair';
|
||||||
$lang['synchronize'] = 'Sincronizar';
|
$lang['synchronize'] = 'Sincronizar';
|
||||||
$lang['enable_sync'] = 'Habilitar Sincronização';
|
$lang['enable_sync'] = 'Habilitar Sincronização';
|
||||||
$lang['disable_sync'] = 'Desabiltar Sincronização';
|
$lang['disable_sync'] = 'Desabiltar Sincronização';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = 'Atualizar';
|
$lang['reload'] = 'Atualizar';
|
||||||
$lang['appointment'] = 'Agenda';
|
$lang['appointment'] = 'Agenda';
|
||||||
$lang['unavailable'] = 'Indisponível';
|
$lang['unavailable'] = 'Indisponível';
|
||||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Sair';
|
||||||
$lang['synchronize'] = 'Sincronizar';
|
$lang['synchronize'] = 'Sincronizar';
|
||||||
$lang['enable_sync'] = 'Ativar Sincronização';
|
$lang['enable_sync'] = 'Ativar Sincronização';
|
||||||
$lang['disable_sync'] = 'Desativar Sincronização';
|
$lang['disable_sync'] = 'Desativar Sincronização';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = 'Carregar';
|
$lang['reload'] = 'Carregar';
|
||||||
$lang['appointment'] = 'Evento';
|
$lang['appointment'] = 'Evento';
|
||||||
$lang['unavailable'] = 'Indisponível';
|
$lang['unavailable'] = 'Indisponível';
|
||||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Iesire';
|
||||||
$lang['synchronize'] = 'Sincronizare';
|
$lang['synchronize'] = 'Sincronizare';
|
||||||
$lang['enable_sync'] = 'Activeaza Sincronizare';
|
$lang['enable_sync'] = 'Activeaza Sincronizare';
|
||||||
$lang['disable_sync'] = 'Dezactiveaza Sincronizare';
|
$lang['disable_sync'] = 'Dezactiveaza Sincronizare';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = 'Reîncarcare';
|
$lang['reload'] = 'Reîncarcare';
|
||||||
$lang['appointment'] = 'Întâlnire';
|
$lang['appointment'] = 'Întâlnire';
|
||||||
$lang['unavailable'] = 'Indisponibil';
|
$lang['unavailable'] = 'Indisponibil';
|
||||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Выйти';
|
||||||
$lang['synchronize'] = 'Синхронизация';
|
$lang['synchronize'] = 'Синхронизация';
|
||||||
$lang['enable_sync'] = 'Включить синхронизацию';
|
$lang['enable_sync'] = 'Включить синхронизацию';
|
||||||
$lang['disable_sync'] = 'Отключить синхронизацию';
|
$lang['disable_sync'] = 'Отключить синхронизацию';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = 'Перегрузить';
|
$lang['reload'] = 'Перегрузить';
|
||||||
$lang['appointment'] = 'Назначение';
|
$lang['appointment'] = 'Назначение';
|
||||||
$lang['unavailable'] = 'Недоступно';
|
$lang['unavailable'] = 'Недоступно';
|
||||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Odhlasiť sa';
|
||||||
$lang['synchronize'] = 'Synchronizovať';
|
$lang['synchronize'] = 'Synchronizovať';
|
||||||
$lang['enable_sync'] = 'Povoliť synchronizáciu';
|
$lang['enable_sync'] = 'Povoliť synchronizáciu';
|
||||||
$lang['disable_sync'] = 'Zakázať synchronizáciu';
|
$lang['disable_sync'] = 'Zakázať synchronizáciu';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = 'Obnoviť';
|
$lang['reload'] = 'Obnoviť';
|
||||||
$lang['appointment'] = 'Rezervácie';
|
$lang['appointment'] = 'Rezervácie';
|
||||||
$lang['unavailable'] = 'Nedostupné';
|
$lang['unavailable'] = 'Nedostupné';
|
||||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Cerrar sesión';
|
||||||
$lang['synchronize'] = 'Sincronizar';
|
$lang['synchronize'] = 'Sincronizar';
|
||||||
$lang['enable_sync'] = 'Habilitar sincronización';
|
$lang['enable_sync'] = 'Habilitar sincronización';
|
||||||
$lang['disable_sync'] = 'Deshabilitar sincronización';
|
$lang['disable_sync'] = 'Deshabilitar sincronización';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = 'Cargar nuevamente';
|
$lang['reload'] = 'Cargar nuevamente';
|
||||||
$lang['appointment'] = 'Cita';
|
$lang['appointment'] = 'Cita';
|
||||||
$lang['unavailable'] = 'No disponible';
|
$lang['unavailable'] = 'No disponible';
|
||||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Logga ut';
|
||||||
$lang['synchronize'] = 'Synkronisera';
|
$lang['synchronize'] = 'Synkronisera';
|
||||||
$lang['enable_sync'] = 'Aktivera';
|
$lang['enable_sync'] = 'Aktivera';
|
||||||
$lang['disable_sync'] = 'Deaktivera';
|
$lang['disable_sync'] = 'Deaktivera';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = 'Uppdatera';
|
$lang['reload'] = 'Uppdatera';
|
||||||
$lang['appointment'] = 'Bokning';
|
$lang['appointment'] = 'Bokning';
|
||||||
$lang['unavailable'] = 'Inte tillgänglig';
|
$lang['unavailable'] = 'Inte tillgänglig';
|
||||||
|
|
|
@ -60,6 +60,7 @@ $lang['log_out'] = 'Çıkış';
|
||||||
$lang['synchronize'] = 'Eşitle';
|
$lang['synchronize'] = 'Eşitle';
|
||||||
$lang['enable_sync'] = 'Eşitlemeyi Aç';
|
$lang['enable_sync'] = 'Eşitlemeyi Aç';
|
||||||
$lang['disable_sync'] = 'Eşitlemeyi Kapat';
|
$lang['disable_sync'] = 'Eşitlemeyi Kapat';
|
||||||
|
$lang['disable_sync_prompt'] = 'Are you sure that you want to disable the calendar synchronization?';
|
||||||
$lang['reload'] = 'Tekrar Yükle';
|
$lang['reload'] = 'Tekrar Yükle';
|
||||||
$lang['appointment'] = 'Randevu';
|
$lang['appointment'] = 'Randevu';
|
||||||
$lang['unavailable'] = 'Uygun Değil';
|
$lang['unavailable'] = 'Uygun Değil';
|
||||||
|
|
|
@ -388,11 +388,28 @@ class Availability {
|
||||||
|
|
||||||
while ($slot_end <= $period['end'])
|
while ($slot_end <= $period['end'])
|
||||||
{
|
{
|
||||||
|
// Make sure there is no other service appointment for this time slot.
|
||||||
|
$other_service_attendants_number = $this->CI->appointments_model->get_other_service_attendants_number(
|
||||||
|
$slot_start,
|
||||||
|
$slot_end,
|
||||||
|
$service['id'],
|
||||||
|
$provider['id'],
|
||||||
|
$exclude_appointment_id
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($other_service_attendants_number > 0)
|
||||||
|
{
|
||||||
|
$slot_start->add($interval);
|
||||||
|
$slot_end->add($interval);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Check reserved attendants for this time slot and see if current attendants fit.
|
// Check reserved attendants for this time slot and see if current attendants fit.
|
||||||
$appointment_attendants_number = $this->CI->appointments_model->get_attendants_number_for_period(
|
$appointment_attendants_number = $this->CI->appointments_model->get_attendants_number_for_period(
|
||||||
$slot_start,
|
$slot_start,
|
||||||
$slot_end,
|
$slot_end,
|
||||||
$service['id'],
|
$service['id'],
|
||||||
|
$provider['id'],
|
||||||
$exclude_appointment_id
|
$exclude_appointment_id
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -12,15 +12,15 @@
|
||||||
* ---------------------------------------------------------------------------- */
|
* ---------------------------------------------------------------------------- */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Google Synchronization Class
|
* Class Google_sync
|
||||||
*
|
*
|
||||||
* This class implements all the core synchronization between the Google Calendar
|
* This class implements all the core synchronization between the Google Calendar and the Easy!Appointments system.
|
||||||
* and the Easy!Appointments system. Do not place any model handling inside this
|
*
|
||||||
* library.
|
* Do not place any model handling inside this library.
|
||||||
*
|
*
|
||||||
* @package Libraries
|
* @package Libraries
|
||||||
*/
|
*/
|
||||||
class Google_Sync {
|
class Google_sync {
|
||||||
/**
|
/**
|
||||||
* CodeIgniter Instance
|
* CodeIgniter Instance
|
||||||
*
|
*
|
||||||
|
|
|
@ -13,10 +13,6 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Timezones
|
* Timezones
|
||||||
*
|
|
||||||
* @property CI_Loader $load
|
|
||||||
*
|
|
||||||
* @package Models
|
|
||||||
*/
|
*/
|
||||||
class Timezones {
|
class Timezones {
|
||||||
/**
|
/**
|
||||||
|
@ -484,36 +480,6 @@ class Timezones {
|
||||||
return $this->timezones;
|
return $this->timezones;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert the dates of an event to the timezone of the user.
|
|
||||||
*
|
|
||||||
* @param array $event Must contain the "start_datetime", "end_datetime" and "id_users_provider" properties.
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public function convert_event_timezone($event)
|
|
||||||
{
|
|
||||||
if ( ! isset($event['start_datetime'], $event['end_datetime'], $event['id_users_provider']))
|
|
||||||
{
|
|
||||||
throw new Exception('The provided event does not have the required properties: ' . print_r($event));
|
|
||||||
}
|
|
||||||
|
|
||||||
$user_timezone = $this->CI->user_model->get_user_timezone($event['id_users_provider']);
|
|
||||||
|
|
||||||
$session_timezone = $this->get_session_timezone();
|
|
||||||
|
|
||||||
$event['start_datetime'] = $this->convert($event['start_datetime'],
|
|
||||||
$user_timezone, $session_timezone);
|
|
||||||
|
|
||||||
$event['end_datetime'] = $this->convert($event['end_datetime'],
|
|
||||||
$user_timezone, $session_timezone);
|
|
||||||
|
|
||||||
return $event;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the session timezone or the default timezone as a fallback.
|
* Returns the session timezone or the default timezone as a fallback.
|
||||||
*
|
*
|
||||||
|
|
|
@ -116,6 +116,11 @@ class Admins_model extends EA_Model {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( ! isset($admin['id']) && ! isset($admin['settings']['password']))
|
||||||
|
{
|
||||||
|
throw new Exception('The user password cannot be empty for new users.');
|
||||||
|
}
|
||||||
|
|
||||||
// Validate calendar view mode.
|
// Validate calendar view mode.
|
||||||
if (isset($admin['settings']['calendar_view']) && ($admin['settings']['calendar_view'] !== CALENDAR_VIEW_DEFAULT
|
if (isset($admin['settings']['calendar_view']) && ($admin['settings']['calendar_view'] !== CALENDAR_VIEW_DEFAULT
|
||||||
&& $admin['settings']['calendar_view'] !== CALENDAR_VIEW_TABLE))
|
&& $admin['settings']['calendar_view'] !== CALENDAR_VIEW_TABLE))
|
||||||
|
|
|
@ -24,7 +24,6 @@ class Appointments_model extends EA_Model {
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
$this->load->helper('data_validation');
|
$this->load->helper('data_validation');
|
||||||
$this->load->library('timezones');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -317,11 +316,7 @@ class Appointments_model extends EA_Model {
|
||||||
. $appointment_id);
|
. $appointment_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
$appointment = $this->db->get_where('appointments', ['id' => $appointment_id])->row_array();
|
return $this->db->get_where('appointments', ['id' => $appointment_id])->row_array();
|
||||||
|
|
||||||
$appointment = $this->timezones->convert_event_timezone($appointment);
|
|
||||||
|
|
||||||
return $appointment;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -363,8 +358,6 @@ class Appointments_model extends EA_Model {
|
||||||
throw new Exception('The given field name does not exist in the database: ' . $field_name);
|
throw new Exception('The given field name does not exist in the database: ' . $field_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
$row_data = $this->timezones->convert_event_timezone($row_data);
|
|
||||||
|
|
||||||
return $row_data[$field_name];
|
return $row_data[$field_name];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -401,8 +394,6 @@ class Appointments_model extends EA_Model {
|
||||||
|
|
||||||
foreach ($appointments as &$appointment)
|
foreach ($appointments as &$appointment)
|
||||||
{
|
{
|
||||||
$appointment = $this->timezones->convert_event_timezone($appointment);
|
|
||||||
|
|
||||||
if ($aggregates)
|
if ($aggregates)
|
||||||
{
|
{
|
||||||
$appointment = $this->get_aggregates($appointment);
|
$appointment = $this->get_aggregates($appointment);
|
||||||
|
@ -556,11 +547,12 @@ class Appointments_model extends EA_Model {
|
||||||
* @param DateTime $slot_start When the slot starts
|
* @param DateTime $slot_start When the slot starts
|
||||||
* @param DateTime $slot_end When the slot ends.
|
* @param DateTime $slot_end When the slot ends.
|
||||||
* @param int $service_id Selected service ID.
|
* @param int $service_id Selected service ID.
|
||||||
|
* @param int $provider_id Selected provider ID.
|
||||||
* @param int|null $exclude_appointment_id Exclude an appointment from the availability generation.
|
* @param int|null $exclude_appointment_id Exclude an appointment from the availability generation.
|
||||||
*
|
*
|
||||||
* @return int Returns the number of attendants for selected time period.
|
* @return int Returns the number of attendants for selected time period.
|
||||||
*/
|
*/
|
||||||
public function get_attendants_number_for_period(DateTime $slot_start, DateTime $slot_end, $service_id, $exclude_appointment_id = NULL)
|
public function get_attendants_number_for_period(DateTime $slot_start, DateTime $slot_end, $service_id, $provider_id, $exclude_appointment_id = NULL)
|
||||||
{
|
{
|
||||||
if ($exclude_appointment_id)
|
if ($exclude_appointment_id)
|
||||||
{
|
{
|
||||||
|
@ -581,6 +573,44 @@ class Appointments_model extends EA_Model {
|
||||||
->group_end()
|
->group_end()
|
||||||
->group_end()
|
->group_end()
|
||||||
->where('id_services', $service_id)
|
->where('id_services', $service_id)
|
||||||
|
->where('id_users_provider', $provider_id)
|
||||||
|
->get()
|
||||||
|
->row()
|
||||||
|
->attendants_number;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the number of the other service attendants number for the provided time slot.
|
||||||
|
*
|
||||||
|
* @param DateTime $slot_start When the slot starts
|
||||||
|
* @param DateTime $slot_end When the slot ends.
|
||||||
|
* @param int $service_id Selected service ID.
|
||||||
|
* @param int|null $exclude_appointment_id Exclude an appointment from the availability generation.
|
||||||
|
*
|
||||||
|
* @return int Returns the number of attendants for selected time period.
|
||||||
|
*/
|
||||||
|
public function get_other_service_attendants_number(DateTime $slot_start, DateTime $slot_end, $service_id, $provider_id, $exclude_appointment_id = NULL)
|
||||||
|
{
|
||||||
|
if ($exclude_appointment_id)
|
||||||
|
{
|
||||||
|
$this->db->where('id !=', $exclude_appointment_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (int)$this->db
|
||||||
|
->select('count(*) AS attendants_number')
|
||||||
|
->from('appointments')
|
||||||
|
->group_start()
|
||||||
|
->group_start()
|
||||||
|
->where('start_datetime <=', $slot_start->format('Y-m-d H:i:s'))
|
||||||
|
->where('end_datetime >', $slot_start->format('Y-m-d H:i:s'))
|
||||||
|
->group_end()
|
||||||
|
->or_group_start()
|
||||||
|
->where('start_datetime <', $slot_end->format('Y-m-d H:i:s'))
|
||||||
|
->where('end_datetime >=', $slot_end->format('Y-m-d H:i:s'))
|
||||||
|
->group_end()
|
||||||
|
->group_end()
|
||||||
|
->where('id_services !=', $service_id)
|
||||||
|
->where('id_users_provider', $provider_id)
|
||||||
->get()
|
->get()
|
||||||
->row()
|
->row()
|
||||||
->attendants_number;
|
->attendants_number;
|
||||||
|
|
|
@ -73,7 +73,6 @@ class Providers_model extends EA_Model {
|
||||||
*/
|
*/
|
||||||
public function validate($provider)
|
public function validate($provider)
|
||||||
{
|
{
|
||||||
|
|
||||||
// If a provider id is present, check whether the record exist in the database.
|
// If a provider id is present, check whether the record exist in the database.
|
||||||
if (isset($provider['id']))
|
if (isset($provider['id']))
|
||||||
{
|
{
|
||||||
|
@ -147,6 +146,11 @@ class Providers_model extends EA_Model {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( ! isset($provider['id']) && ! isset($provider['settings']['password']))
|
||||||
|
{
|
||||||
|
throw new Exception('The user password cannot be empty for new users.');
|
||||||
|
}
|
||||||
|
|
||||||
// Validate calendar view mode.
|
// Validate calendar view mode.
|
||||||
if (isset($provider['settings']['calendar_view']) && ($provider['settings']['calendar_view'] !== CALENDAR_VIEW_DEFAULT
|
if (isset($provider['settings']['calendar_view']) && ($provider['settings']['calendar_view'] !== CALENDAR_VIEW_DEFAULT
|
||||||
&& $provider['settings']['calendar_view'] !== CALENDAR_VIEW_TABLE))
|
&& $provider['settings']['calendar_view'] !== CALENDAR_VIEW_TABLE))
|
||||||
|
|
|
@ -124,6 +124,11 @@ class Secretaries_model extends EA_Model {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( ! isset($secretary['id']) && ! isset($secretary['settings']['password']))
|
||||||
|
{
|
||||||
|
throw new Exception('The user password cannot be empty for new users.');
|
||||||
|
}
|
||||||
|
|
||||||
// Validate calendar view mode.
|
// Validate calendar view mode.
|
||||||
if (isset($secretary['settings']['calendar_view']) && ($secretary['settings']['calendar_view'] !== CALENDAR_VIEW_DEFAULT
|
if (isset($secretary['settings']['calendar_view']) && ($secretary['settings']['calendar_view'] !== CALENDAR_VIEW_DEFAULT
|
||||||
&& $secretary['settings']['calendar_view'] !== CALENDAR_VIEW_TABLE))
|
&& $secretary['settings']['calendar_view'] !== CALENDAR_VIEW_TABLE))
|
||||||
|
|
|
@ -363,7 +363,9 @@
|
||||||
<div class="col-12 col-md-6">
|
<div class="col-12 col-md-6">
|
||||||
<h4 class="captcha-title">
|
<h4 class="captcha-title">
|
||||||
CAPTCHA
|
CAPTCHA
|
||||||
<small class="fas fa-sync-alt"></small>
|
<button class="btn btn-link text-dark text-decoration-none py-0">
|
||||||
|
<i class="fas fa-sync-alt"></i>
|
||||||
|
</button>
|
||||||
</h4>
|
</h4>
|
||||||
<img class="captcha-image" src="<?= site_url('captcha') ?>">
|
<img class="captcha-image" src="<?= site_url('captcha') ?>">
|
||||||
<input class="captcha-text form-control" type="text" value=""/>
|
<input class="captcha-text form-control" type="text" value=""/>
|
||||||
|
|
|
@ -73,6 +73,8 @@
|
||||||
<script src="<?= base_url('assets/ext/jquery/jquery.min.js') ?>"></script>
|
<script src="<?= base_url('assets/ext/jquery/jquery.min.js') ?>"></script>
|
||||||
<script src="<?= base_url('assets/ext/bootstrap/js/bootstrap.bundle.min.js') ?>"></script>
|
<script src="<?= base_url('assets/ext/bootstrap/js/bootstrap.bundle.min.js') ?>"></script>
|
||||||
<script src="<?= base_url('assets/ext/datejs/date.min.js') ?>"></script>
|
<script src="<?= base_url('assets/ext/datejs/date.min.js') ?>"></script>
|
||||||
|
<script src="<?= asset_url('assets/ext/moment/moment.min.js') ?>"></script>
|
||||||
|
<script src="<?= asset_url('assets/ext/moment/moment-timezone-with-data.min.js') ?>"></script>
|
||||||
<script src="https://apis.google.com/js/client.js"></script>
|
<script src="https://apis.google.com/js/client.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -80,6 +82,7 @@
|
||||||
csrfToken: <?= json_encode($this->security->get_csrf_hash()) ?>,
|
csrfToken: <?= json_encode($this->security->get_csrf_hash()) ?>,
|
||||||
appointmentData: <?= json_encode($appointment_data) ?>,
|
appointmentData: <?= json_encode($appointment_data) ?>,
|
||||||
providerData: <?= json_encode($provider_data) ?>,
|
providerData: <?= json_encode($provider_data) ?>,
|
||||||
|
customerData: <?= json_encode($customer_data) ?>,
|
||||||
serviceData: <?= json_encode($service_data) ?>,
|
serviceData: <?= json_encode($service_data) ?>,
|
||||||
companyName: <?= json_encode($company_name) ?>,
|
companyName: <?= json_encode($company_name) ?>,
|
||||||
googleApiKey: <?= json_encode(config('google_api_key')) ?>,
|
googleApiKey: <?= json_encode(config('google_api_key')) ?>,
|
||||||
|
|
|
@ -154,16 +154,17 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="language">
|
<label for="language">
|
||||||
<?= lang('language') ?>
|
<?= lang('language') ?>
|
||||||
|
<span class="text-danger">*</span>
|
||||||
</label>
|
</label>
|
||||||
<select id="language" class="form-control"></select>
|
<select id="language" class="form-control required"></select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="timezone">
|
<label for="timezone">
|
||||||
<?= lang('timezone') ?>
|
<?= lang('timezone') ?>
|
||||||
|
<span class="text-danger">*</span>
|
||||||
</label>
|
</label>
|
||||||
<?= render_timezone_dropdown('id="timezone" class="form-control"') ?>
|
<?= render_timezone_dropdown('id="timezone" class="form-control required"') ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
<script src="<?= asset_url('assets/ext/tippy/tippy-bundle.umd.min.js') ?>"></script>
|
<script src="<?= asset_url('assets/ext/tippy/tippy-bundle.umd.min.js') ?>"></script>
|
||||||
<script src="<?= asset_url('assets/ext/jquery-ui/jquery-ui.min.js') ?>"></script>
|
<script src="<?= asset_url('assets/ext/jquery-ui/jquery-ui.min.js') ?>"></script>
|
||||||
<script src="<?= asset_url('assets/ext/moment/moment.min.js') ?>"></script>
|
<script src="<?= asset_url('assets/ext/moment/moment.min.js') ?>"></script>
|
||||||
|
<script src="<?= asset_url('assets/ext/moment/moment-timezone-with-data.min.js') ?>"></script>
|
||||||
<script src="<?= asset_url('assets/ext/datejs/date.min.js') ?>"></script>
|
<script src="<?= asset_url('assets/ext/datejs/date.min.js') ?>"></script>
|
||||||
<script src="<?= asset_url('assets/ext/trumbowyg/trumbowyg.min.js') ?>"></script>
|
<script src="<?= asset_url('assets/ext/trumbowyg/trumbowyg.min.js') ?>"></script>
|
||||||
<script src="<?= asset_url('assets/ext/select2/select2.min.js') ?>"></script>
|
<script src="<?= asset_url('assets/ext/select2/select2.min.js') ?>"></script>
|
||||||
|
|
|
@ -530,7 +530,7 @@
|
||||||
<?= lang('project_issues') ?>
|
<?= lang('project_issues') ?>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
|
||||||
<a href="https://www.facebook.com/easyappointments.org">
|
<a href="https://facebook.com/easyappts">
|
||||||
Facebook
|
Facebook
|
||||||
</a>
|
</a>
|
||||||
|
|
|
|
||||||
|
|
|
@ -261,9 +261,9 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="provider-timezone">
|
<label for="provider-timezone">
|
||||||
<?= lang('timezone') ?>
|
<?= lang('timezone') ?>
|
||||||
|
<span class="text-danger">*</span>
|
||||||
</label>
|
</label>
|
||||||
<?= render_timezone_dropdown('id="provider-timezone" class="form-control"') ?>
|
<?= render_timezone_dropdown('id="provider-timezone" class="form-control required"') ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
@ -549,9 +549,9 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="secretary-timezone">
|
<label for="secretary-timezone">
|
||||||
<?= lang('timezone') ?>
|
<?= lang('timezone') ?>
|
||||||
|
<span class="text-danger">*</span>
|
||||||
</label>
|
</label>
|
||||||
<?= render_timezone_dropdown('id="secretary-timezone" class="form-control"') ?>
|
<?= render_timezone_dropdown('id="secretary-timezone" class="form-control required"') ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
@ -757,8 +757,9 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="admin-timezone">
|
<label for="admin-timezone">
|
||||||
<?= lang('timezone') ?>
|
<?= lang('timezone') ?>
|
||||||
|
<span class="text-danger">*</span>
|
||||||
</label>
|
</label>
|
||||||
<?= render_timezone_dropdown('id="admin-timezone" class="form-control"') ?>
|
<?= render_timezone_dropdown('id="admin-timezone" class="form-control required"') ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
|
@ -849,12 +849,12 @@ body .form-horizontal .controls {
|
||||||
}
|
}
|
||||||
|
|
||||||
#settings-page .personal-info-wrapper {
|
#settings-page .personal-info-wrapper {
|
||||||
max-width: 400px;
|
max-width: 450px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#settings-page .miscellaneous-wrapper {
|
#settings-page .miscellaneous-wrapper {
|
||||||
max-width: 400px;
|
max-width: 450px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -384,7 +384,7 @@ body {
|
||||||
#success-frame .btn {
|
#success-frame .btn {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
max-width: 250px;
|
max-width: 300px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
@media (min-width: 768px) {
|
||||||
|
|
|
@ -82,7 +82,7 @@ window.BackendCalendar = window.BackendCalendar || {};
|
||||||
var successCallback = function () {
|
var successCallback = function () {
|
||||||
Backend.displayNotification(EALang.working_plan_exception_saved);
|
Backend.displayNotification(EALang.working_plan_exception_saved);
|
||||||
|
|
||||||
var workingPlanExceptions = jQuery.parseJSON(provider.settings.working_plan_exceptions) || {};
|
var workingPlanExceptions = JSON.parse(provider.settings.working_plan_exceptions) || {};
|
||||||
|
|
||||||
workingPlanExceptions[date] = workingPlanException;
|
workingPlanExceptions[date] = workingPlanException;
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ window.BackendCalendar = window.BackendCalendar || {};
|
||||||
var availableProvider = GlobalVariables.availableProviders[index];
|
var availableProvider = GlobalVariables.availableProviders[index];
|
||||||
|
|
||||||
if (Number(availableProvider.id) === Number(providerId)) {
|
if (Number(availableProvider.id) === Number(providerId)) {
|
||||||
availableProvider.settings.working_plan_exceptions = JSON.stringify(workingPlanExceptions);
|
GlobalVariables.availableProviders[index].settings.working_plan_exceptions = JSON.stringify(workingPlanExceptions);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,7 +181,7 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
|
||||||
var successCallback = function () {
|
var successCallback = function () {
|
||||||
Backend.displayNotification(EALang.working_plan_exception_deleted);
|
Backend.displayNotification(EALang.working_plan_exception_deleted);
|
||||||
|
|
||||||
var workingPlanExceptions = jQuery.parseJSON(provider.settings.working_plan_exceptions) || {};
|
var workingPlanExceptions = JSON.parse(provider.settings.working_plan_exceptions) || {};
|
||||||
delete workingPlanExceptions[date];
|
delete workingPlanExceptions[date];
|
||||||
|
|
||||||
for (var index in GlobalVariables.availableProviders) {
|
for (var index in GlobalVariables.availableProviders) {
|
||||||
|
@ -229,7 +229,6 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
GeneralFunctions.displayMessageBox(EALang.delete_appointment_title,
|
GeneralFunctions.displayMessageBox(EALang.delete_appointment_title,
|
||||||
EALang.write_appointment_removal_reason, buttons);
|
EALang.write_appointment_removal_reason, buttons);
|
||||||
|
|
||||||
|
@ -1069,7 +1068,7 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
|
||||||
var notes = unavailable.notes ? ' - ' + unavailable.notes : '';
|
var notes = unavailable.notes ? ' - ' + unavailable.notes : '';
|
||||||
|
|
||||||
if (unavailable.notes && unavailable.notes.length > 30) {
|
if (unavailable.notes && unavailable.notes.length > 30) {
|
||||||
notes = unavilable.notes.substring(0, 30) + '...'
|
notes = unavailable.notes.substring(0, 30) + '...';
|
||||||
}
|
}
|
||||||
|
|
||||||
var unavailabilityEvent = {
|
var unavailabilityEvent = {
|
||||||
|
@ -1099,8 +1098,8 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
|
||||||
throw new Error('Provider was not found.');
|
throw new Error('Provider was not found.');
|
||||||
}
|
}
|
||||||
|
|
||||||
var workingPlan = jQuery.parseJSON(provider.settings.working_plan);
|
var workingPlan = JSON.parse(provider.settings.working_plan);
|
||||||
var workingPlanExceptions = jQuery.parseJSON(provider.settings.working_plan_exceptions);
|
var workingPlanExceptions = JSON.parse(provider.settings.working_plan_exceptions);
|
||||||
var unavailabilityEvent;
|
var unavailabilityEvent;
|
||||||
var viewStart;
|
var viewStart;
|
||||||
var viewEnd;
|
var viewEnd;
|
||||||
|
@ -1412,7 +1411,6 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
|
||||||
|
|
||||||
// Initialize page calendar
|
// Initialize page calendar
|
||||||
$('#calendar').fullCalendar({
|
$('#calendar').fullCalendar({
|
||||||
nowIndicator: true,
|
|
||||||
defaultView: defaultView,
|
defaultView: defaultView,
|
||||||
height: getCalendarHeight(),
|
height: getCalendarHeight(),
|
||||||
editable: true,
|
editable: true,
|
||||||
|
@ -1567,12 +1565,10 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {};
|
||||||
$('#select-filter-item').prop('disabled', true);
|
$('#select-filter-item').prop('disabled', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GlobalVariables.user.role_slug === Backend.DB_SLUG_SECRETARY) {
|
|
||||||
$('#select-filter-item optgroup:eq(1)').remove();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (GlobalVariables.user.role_slug === Backend.DB_SLUG_SECRETARY) {
|
if (GlobalVariables.user.role_slug === Backend.DB_SLUG_SECRETARY) {
|
||||||
// Remove the providers that are not connected to the secretary.
|
// Remove the providers that are not connected to the secretary.
|
||||||
|
$('#select-filter-item optgroup:eq(1)').remove();
|
||||||
|
|
||||||
$('#select-filter-item option[type="provider"]').each(function (index, option) {
|
$('#select-filter-item option[type="provider"]').each(function (index, option) {
|
||||||
var provider = GlobalVariables.secretaryProviders.find(function (secretaryProviderId) {
|
var provider = GlobalVariables.secretaryProviders.find(function (secretaryProviderId) {
|
||||||
return Number($(option).val()) === Number(secretaryProviderId);
|
return Number($(option).val()) === Number(secretaryProviderId);
|
||||||
|
|
|
@ -81,31 +81,50 @@ window.BackendCalendarGoogleSync = window.BackendCalendarGoogleSync || {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Error) {
|
} catch (Error) {
|
||||||
// Accessing the document object before the window is loaded throws an error, but
|
// Accessing the document object before the window is loaded throws an error, but it will only
|
||||||
// it will only happen during the initialization of the window. Attaching "load"
|
// happen during the initialization of the window. Attaching "load" event handling is not
|
||||||
// event handling is not possible due to CORS restrictions.
|
// possible due to CORS restrictions.
|
||||||
}
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Disable synchronization for selected provider.
|
var buttons = [
|
||||||
// Update page elements and make an AJAX call to remove the google sync setting of the
|
{
|
||||||
// selected provider.
|
text: EALang.cancel,
|
||||||
var providerId = $('#select-filter-item').val();
|
click: function () {
|
||||||
|
$('#message-box').dialog('close');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: 'OK',
|
||||||
|
click: function () {
|
||||||
|
// Disable synchronization for selected provider.
|
||||||
|
var providerId = $('#select-filter-item').val();
|
||||||
|
|
||||||
var provider = GlobalVariables.availableProviders.find(function (availableProvider) {
|
var provider = GlobalVariables.availableProviders.find(function (availableProvider) {
|
||||||
return Number(availableProvider.id) === Number(providerId);
|
return Number(availableProvider.id) === Number(providerId);
|
||||||
});
|
});
|
||||||
|
|
||||||
provider.settings.google_sync = '0';
|
if (!provider) {
|
||||||
provider.settings.google_token = null;
|
throw new Error('Provider not found: ' + providerId);
|
||||||
|
}
|
||||||
|
|
||||||
disableProviderSync(provider.id);
|
provider.settings.google_sync = '0';
|
||||||
|
provider.settings.google_token = null;
|
||||||
|
|
||||||
$('#enable-sync').removeClass('btn-secondary enabled').addClass('btn-light');
|
disableProviderSync(provider.id);
|
||||||
$('#enable-sync span').text(EALang.enable_sync);
|
|
||||||
$('#google-sync').prop('disabled', true);
|
$('#enable-sync').removeClass('btn-secondary enabled').addClass('btn-light');
|
||||||
$('#select-filter-item option:selected').attr('google-sync', 'false');
|
$('#enable-sync span').text(EALang.enable_sync);
|
||||||
|
$('#google-sync').prop('disabled', true);
|
||||||
|
$('#select-filter-item option:selected').attr('google-sync', 'false');
|
||||||
|
|
||||||
|
$('#message-box').dialog('close');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
GeneralFunctions.displayMessageBox(EALang.disable_sync, EALang.disable_sync_prompt, buttons);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -158,8 +177,7 @@ window.BackendCalendarGoogleSync = window.BackendCalendarGoogleSync || {};
|
||||||
* @param {Number} providerId The selected provider record ID.
|
* @param {Number} providerId The selected provider record ID.
|
||||||
*/
|
*/
|
||||||
function disableProviderSync(providerId) {
|
function disableProviderSync(providerId) {
|
||||||
// Make an ajax call to the server in order to disable the setting
|
// Make an ajax call to the server in order to disable the setting from the database.
|
||||||
// from the database.
|
|
||||||
var url = GlobalVariables.baseUrl + '/index.php/backend_api/ajax_disable_provider_sync';
|
var url = GlobalVariables.baseUrl + '/index.php/backend_api/ajax_disable_provider_sync';
|
||||||
|
|
||||||
var data = {
|
var data = {
|
||||||
|
|
|
@ -157,7 +157,7 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {};
|
||||||
var successCallback = function () {
|
var successCallback = function () {
|
||||||
Backend.displayNotification(EALang.working_plan_exception_saved);
|
Backend.displayNotification(EALang.working_plan_exception_saved);
|
||||||
|
|
||||||
var workingPlanExceptions = jQuery.parseJSON(provider.settings.working_plan_exceptions) || {};
|
var workingPlanExceptions = JSON.parse(provider.settings.working_plan_exceptions) || {};
|
||||||
|
|
||||||
workingPlanExceptions[date] = workingPlanException;
|
workingPlanExceptions[date] = workingPlanException;
|
||||||
|
|
||||||
|
@ -259,7 +259,7 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {};
|
||||||
.done(function () {
|
.done(function () {
|
||||||
$('#message-box').dialog('close');
|
$('#message-box').dialog('close');
|
||||||
|
|
||||||
var workingPlanExceptions = jQuery.parseJSON(lastFocusedEventData.data.settings.working_plan_exceptions);
|
var workingPlanExceptions = JSON.parse(lastFocusedEventData.data.settings.working_plan_exceptions);
|
||||||
delete workingPlanExceptions[lastFocusedEventData.start.format('YYYY-MM-DD')];
|
delete workingPlanExceptions[lastFocusedEventData.start.format('YYYY-MM-DD')];
|
||||||
lastFocusedEventData.data.settings.working_plan_exceptions = JSON.stringify(workingPlanExceptions);
|
lastFocusedEventData.data.settings.working_plan_exceptions = JSON.stringify(workingPlanExceptions);
|
||||||
|
|
||||||
|
@ -574,8 +574,10 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {};
|
||||||
return matches.length;
|
return matches.length;
|
||||||
});
|
});
|
||||||
|
|
||||||
return (!filterProviderIds.length && !filterServiceIds.length) || servedServiceIds.length
|
return (!filterProviderIds.length && !filterServiceIds.length)
|
||||||
|| filterProviderIds.indexOf(provider.id) !== -1;
|
|| (filterProviderIds.length && !filterServiceIds.length && filterProviderIds.indexOf(provider.id) !== -1)
|
||||||
|
|| (!filterProviderIds.length && filterServiceIds.length && servedServiceIds.length)
|
||||||
|
|| (filterProviderIds.length && filterServiceIds.length && servedServiceIds.length && filterProviderIds.indexOf(provider.id) !== -1);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (GlobalVariables.user.role_slug === 'provider') {
|
if (GlobalVariables.user.role_slug === 'provider') {
|
||||||
|
@ -792,7 +794,6 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {};
|
||||||
eventClick: onEventClick,
|
eventClick: onEventClick,
|
||||||
eventResize: onEventResize,
|
eventResize: onEventResize,
|
||||||
eventDrop: onEventDrop,
|
eventDrop: onEventDrop,
|
||||||
dayClick: onDayClick,
|
|
||||||
viewRender: onViewRender
|
viewRender: onViewRender
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -804,43 +805,6 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {};
|
||||||
.prependTo($providerColumn);
|
.prependTo($providerColumn);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Calendar Day "Click" Callback
|
|
||||||
*
|
|
||||||
* When the user clicks on a day square on the calendar, then he will automatically be transferred to that
|
|
||||||
* day view calendar.
|
|
||||||
*/
|
|
||||||
function onDayClick(date) {
|
|
||||||
$('#insert-appointment').trigger('click');
|
|
||||||
|
|
||||||
var $dialog = $('#manage-appointment');
|
|
||||||
|
|
||||||
var providerId = $(this).closest('.provider-column').data('provider').id;
|
|
||||||
|
|
||||||
var provider = GlobalVariables.availableProviders.find(function (provider) {
|
|
||||||
return Number(provider.id) === Number(providerId);
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!provider) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var service = GlobalVariables.availableServices.find(function (service) {
|
|
||||||
return provider.services.indexOf(service.id) !== -1;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (provider.services.length) {
|
|
||||||
$dialog.find('#select-service').val([provider.services[0]]).trigger('change');
|
|
||||||
$dialog.find('#select-provider').val(provider.id);
|
|
||||||
|
|
||||||
$dialog.find('#start-datetime').val(GeneralFunctions.formatDate(date, GlobalVariables.dateFormat, true));
|
|
||||||
$dialog.find('#start-datetime').datepicker('setDate', date);
|
|
||||||
$dialog.find('#end-datetime').val(GeneralFunctions.formatDate(date.addMinutes(service.duration),
|
|
||||||
GlobalVariables.dateFormat, true));
|
|
||||||
$dialog.find('#end-datetime').datepicker('setDate', date);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function onViewRender(view, element) {
|
function onViewRender(view, element) {
|
||||||
$(element).fullCalendar('option', 'height', getCalendarHeight());
|
$(element).fullCalendar('option', 'height', getCalendarHeight());
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ window.BackendCalendarWorkingPlanExceptionsModal = window.BackendCalendarWorking
|
||||||
}
|
}
|
||||||
|
|
||||||
var selectedDate = date.toString('yyyy-MM-dd');
|
var selectedDate = date.toString('yyyy-MM-dd');
|
||||||
var workingPlanExceptions = jQuery.parseJSON(provider.settings.working_plan_exceptions);
|
var workingPlanExceptions = JSON.parse(provider.settings.working_plan_exceptions);
|
||||||
|
|
||||||
workingPlanExceptions[selectedDate] = {
|
workingPlanExceptions[selectedDate] = {
|
||||||
start: start.toString('HH:mm'),
|
start: start.toString('HH:mm'),
|
||||||
|
|
|
@ -259,6 +259,7 @@
|
||||||
.find('input, select, textarea')
|
.find('input, select, textarea')
|
||||||
.val('')
|
.val('')
|
||||||
.prop('disabled', true);
|
.prop('disabled', true);
|
||||||
|
$('.record-details #timezone').val('UTC');
|
||||||
|
|
||||||
$('#language').val('english');
|
$('#language').val('english');
|
||||||
|
|
||||||
|
@ -350,7 +351,7 @@
|
||||||
// Timezone
|
// Timezone
|
||||||
|
|
||||||
$('<small/>', {
|
$('<small/>', {
|
||||||
'text': GlobalVariables.timezones[GlobalVariables.user.timezone]
|
'text': GlobalVariables.timezones[appointment.provider.timezone]
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
|
@ -308,8 +308,12 @@
|
||||||
|
|
||||||
$('#admins .add-edit-delete-group').show();
|
$('#admins .add-edit-delete-group').show();
|
||||||
$('#admins .save-cancel-group').hide();
|
$('#admins .save-cancel-group').hide();
|
||||||
$('#admins .record-details').find('input, select, textarea').prop('disabled', true);
|
$('#admins .record-details')
|
||||||
$('#admins .record-details').find('input, textarea').val('');
|
.find('input, select, textarea')
|
||||||
|
.val('')
|
||||||
|
.prop('disabled', true);
|
||||||
|
$('#admins .record-details #admin-calendar-view').val('default');
|
||||||
|
$('#admins .record-details #admin-timezone').val('UTC');
|
||||||
$('#edit-admin, #delete-admin').prop('disabled', true);
|
$('#edit-admin, #delete-admin').prop('disabled', true);
|
||||||
|
|
||||||
$('#admins .has-error').removeClass('has-error');
|
$('#admins .has-error').removeClass('has-error');
|
||||||
|
|
|
@ -350,6 +350,8 @@
|
||||||
$('#providers .record-details').find('input, select, textarea')
|
$('#providers .record-details').find('input, select, textarea')
|
||||||
.val('')
|
.val('')
|
||||||
.prop('disabled', true);
|
.prop('disabled', true);
|
||||||
|
$('#providers .record-details #provider-calendar-view').val('default');
|
||||||
|
$('#providers .record-details #provider-timezone').val('UTC');
|
||||||
$('#providers .add-break, .add-working-plan-exception, #reset-working-plan').prop('disabled', true);
|
$('#providers .add-break, .add-working-plan-exception, #reset-working-plan').prop('disabled', true);
|
||||||
BackendUsers.wp.timepickers(true);
|
BackendUsers.wp.timepickers(true);
|
||||||
$('#providers .working-plan input:text').timepicker('destroy');
|
$('#providers .working-plan input:text').timepicker('destroy');
|
||||||
|
|
|
@ -324,6 +324,8 @@
|
||||||
.find('input, select, textarea')
|
.find('input, select, textarea')
|
||||||
.val('')
|
.val('')
|
||||||
.prop('disabled', true);
|
.prop('disabled', true);
|
||||||
|
$('#secretaries .record-details #secretary-calendar-view').val('default');
|
||||||
|
$('#secretaries .record-details #secretary-timezone').val('UTC');
|
||||||
$('#secretaries .add-edit-delete-group').show();
|
$('#secretaries .add-edit-delete-group').show();
|
||||||
$('#secretaries .save-cancel-group').hide();
|
$('#secretaries .save-cancel-group').hide();
|
||||||
$('#edit-secretary, #delete-secretary').prop('disabled', true);
|
$('#edit-secretary, #delete-secretary').prop('disabled', true);
|
||||||
|
|
|
@ -249,28 +249,28 @@ window.FrontendBook = window.FrontendBook || {};
|
||||||
* Some special tasks might be performed, depending the current wizard step.
|
* Some special tasks might be performed, depending the current wizard step.
|
||||||
*/
|
*/
|
||||||
$('.button-next').on('click', function () {
|
$('.button-next').on('click', function () {
|
||||||
// If we are on the first step and there is not provider selected do not continue
|
// If we are on the first step and there is not provider selected do not continue with the next step.
|
||||||
// with the next step.
|
|
||||||
if ($(this).attr('data-step_index') === '1' && !$('#select-provider').val()) {
|
if ($(this).attr('data-step_index') === '1' && !$('#select-provider').val()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we are on the 2nd tab then the user should have an appointment hour
|
// If we are on the 2nd tab then the user should have an appointment hour selected.
|
||||||
// selected.
|
|
||||||
if ($(this).attr('data-step_index') === '2') {
|
if ($(this).attr('data-step_index') === '2') {
|
||||||
if (!$('.selected-hour').length) {
|
if (!$('.selected-hour').length) {
|
||||||
if (!$('#select-hour-prompt').length) {
|
if (!$('#select-hour-prompt').length) {
|
||||||
$('#available-hours').append('<br><br>'
|
$('<div/>', {
|
||||||
+ '<span id="select-hour-prompt" class="text-danger">'
|
'id': 'select-hour-prompt',
|
||||||
+ EALang.appointment_hour_missing
|
'class': 'text-danger mb-4',
|
||||||
+ '</span>');
|
'text': EALang.appointment_hour_missing,
|
||||||
|
})
|
||||||
|
.prependTo('#available-hours');
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we are on the 3rd tab then we will need to validate the user's
|
// If we are on the 3rd tab then we will need to validate the user's input before proceeding to the next
|
||||||
// input before proceeding to the next step.
|
// step.
|
||||||
if ($(this).attr('data-step_index') === '3') {
|
if ($(this).attr('data-step_index') === '3') {
|
||||||
if (!validateCustomerForm()) {
|
if (!validateCustomerForm()) {
|
||||||
return; // Validation failed, do not continue.
|
return; // Validation failed, do not continue.
|
||||||
|
@ -433,7 +433,7 @@ window.FrontendBook = window.FrontendBook || {};
|
||||||
*
|
*
|
||||||
* @param {jQuery.Event} event
|
* @param {jQuery.Event} event
|
||||||
*/
|
*/
|
||||||
$('.captcha-title svg').on('click', function (event) {
|
$('.captcha-title button').on('click', function (event) {
|
||||||
$('.captcha-image').attr('src', GlobalVariables.baseUrl + '/index.php/captcha?' + Date.now());
|
$('.captcha-image').attr('src', GlobalVariables.baseUrl + '/index.php/captcha?' + Date.now());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -700,6 +700,9 @@ window.FrontendBook = window.FrontendBook || {};
|
||||||
$('#address').val(customer.address);
|
$('#address').val(customer.address);
|
||||||
$('#city').val(customer.city);
|
$('#city').val(customer.city);
|
||||||
$('#zip-code').val(customer.zip_code);
|
$('#zip-code').val(customer.zip_code);
|
||||||
|
if (customer.timezone) {
|
||||||
|
$('#select-timezone').val(customer.timezone)
|
||||||
|
}
|
||||||
var appointmentNotes = (appointment.notes !== null)
|
var appointmentNotes = (appointment.notes !== null)
|
||||||
? appointment.notes : '';
|
? appointment.notes : '';
|
||||||
$('#notes').val(appointmentNotes);
|
$('#notes').val(appointmentNotes);
|
||||||
|
|
|
@ -194,7 +194,7 @@ window.FrontendBookApi = window.FrontendBookApi || {};
|
||||||
$('#captcha-hint').fadeTo(400, 0);
|
$('#captcha-hint').fadeTo(400, 0);
|
||||||
}, 3000);
|
}, 3000);
|
||||||
|
|
||||||
$('.captcha-title svg').trigger('click');
|
$('.captcha-title button').trigger('click');
|
||||||
|
|
||||||
$captchaText.closest('.form-group').addClass('has-error');
|
$captchaText.closest('.form-group').addClass('has-error');
|
||||||
|
|
||||||
|
@ -205,7 +205,7 @@ window.FrontendBookApi = window.FrontendBookApi || {};
|
||||||
+ '/index.php/appointments/book_success/' + response.appointment_hash;
|
+ '/index.php/appointments/book_success/' + response.appointment_hash;
|
||||||
})
|
})
|
||||||
.fail(function (jqxhr, textStatus, errorThrown) {
|
.fail(function (jqxhr, textStatus, errorThrown) {
|
||||||
$('.captcha-title svg').trigger('click');
|
$('.captcha-title button').trigger('click');
|
||||||
})
|
})
|
||||||
.always(function () {
|
.always(function () {
|
||||||
$layer.remove();
|
$layer.remove();
|
||||||
|
|
|
@ -40,27 +40,21 @@ $(document).ready(function () {
|
||||||
throw new Error('Could not authorize user.');
|
throw new Error('Could not authorize user.');
|
||||||
}
|
}
|
||||||
|
|
||||||
// The user has granted access, add the appointment to his calendar.
|
// The user has granted access, add the appointment to his calendar. Before making the event.insert request
|
||||||
// Before making the event.insert request the the event resource data
|
// the the event resource data must be prepared.
|
||||||
// must be prepared.
|
var providerData = GlobalVariables.providerData;
|
||||||
var appointmentData = GlobalVariables.appointmentData;
|
|
||||||
|
|
||||||
appointmentData.start_datetime = GeneralFunctions.ISODateString(
|
var appointmentData = GlobalVariables.appointmentData;
|
||||||
Date.parseExact(appointmentData.start_datetime,
|
|
||||||
'yyyy-MM-dd HH:mm:ss'));
|
|
||||||
appointmentData.end_datetime = GeneralFunctions.ISODateString(
|
|
||||||
Date.parseExact(appointmentData.end_datetime,
|
|
||||||
'yyyy-MM-dd HH:mm:ss'));
|
|
||||||
|
|
||||||
// Create a valid Google Calendar API resource for the new event.
|
// Create a valid Google Calendar API resource for the new event.
|
||||||
var resource = {
|
var resource = {
|
||||||
summary: GlobalVariables.serviceData.name,
|
summary: GlobalVariables.serviceData.name,
|
||||||
location: GlobalVariables.companyName,
|
location: GlobalVariables.companyName,
|
||||||
start: {
|
start: {
|
||||||
dateTime: appointmentData.start_datetime
|
dateTime: moment.tz(appointmentData.start_datetime, providerData.timezone).format()
|
||||||
},
|
},
|
||||||
end: {
|
end: {
|
||||||
dateTime: appointmentData.end_datetime
|
dateTime: moment.tz(appointmentData.end_datetime, providerData.timezone).format()
|
||||||
},
|
},
|
||||||
attendees: [
|
attendees: [
|
||||||
{
|
{
|
||||||
|
|
|
@ -365,16 +365,21 @@ window.GeneralFunctions = window.GeneralFunctions || {};
|
||||||
var timeFormat = GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm';
|
var timeFormat = GlobalVariables.timeFormat === 'regular' ? 'h:mm tt' : 'HH:mm';
|
||||||
var hours = addHours ? ' ' + timeFormat : '';
|
var hours = addHours ? ' ' + timeFormat : '';
|
||||||
var result;
|
var result;
|
||||||
|
var parsedDate = Date.parse(date);
|
||||||
|
|
||||||
|
if (!parsedDate) {
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
|
||||||
switch (dateFormatSetting) {
|
switch (dateFormatSetting) {
|
||||||
case 'DMY':
|
case 'DMY':
|
||||||
result = Date.parse(date).toString('dd/MM/yyyy' + hours);
|
result = parsedDate.toString('dd/MM/yyyy' + hours);
|
||||||
break;
|
break;
|
||||||
case 'MDY':
|
case 'MDY':
|
||||||
result = Date.parse(date).toString('MM/dd/yyyy' + hours);
|
result = parsedDate.toString('MM/dd/yyyy' + hours);
|
||||||
break;
|
break;
|
||||||
case 'YMD':
|
case 'YMD':
|
||||||
result = Date.parse(date).toString('yyyy/MM/dd' + hours);
|
result = parsedDate.toString('yyyy/MM/dd' + hours);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Error('Invalid date format setting provided!', dateFormatSetting);
|
throw new Error('Invalid date format setting provided!', dateFormatSetting);
|
||||||
|
|
1025
composer.lock
generated
1025
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -89,6 +89,6 @@ php index.php help
|
||||||
|
|
||||||
This command will give more information about the console capabilities.
|
This command will give more information about the console capabilities.
|
||||||
|
|
||||||
*This document applies to Easy!Appointments v1.4.0.*
|
*This document applies to Easy!Appointments v1.4.1.*
|
||||||
|
|
||||||
[Back](readme.md)
|
[Back](readme.md)
|
||||||
|
|
|
@ -45,6 +45,6 @@ You can remove the docker containers with `docker rm easyappointments-server eas
|
||||||
|
|
||||||
You can remove the server image with `docker rmi easyappointments-server:v1`.
|
You can remove the server image with `docker rmi easyappointments-server:v1`.
|
||||||
|
|
||||||
*This document applies to Easy!Appointments v1.4.0.*
|
*This document applies to Easy!Appointments v1.4.1.*
|
||||||
|
|
||||||
[Back](readme.md)
|
[Back](readme.md)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#FAQ
|
# FAQ
|
||||||
|
|
||||||
## How do I check that my server has Apache, Php and MySQL already installed?
|
## How do I check that my server has Apache, Php and MySQL already installed?
|
||||||
|
|
||||||
|
@ -54,6 +54,6 @@ You get this warning because PHP is not configured with a timezone setting. This
|
||||||
`date_default_timezone_set('America/Los_Angeles'); // Use your own timezone string.`
|
`date_default_timezone_set('America/Los_Angeles'); // Use your own timezone string.`
|
||||||
|
|
||||||
|
|
||||||
*This document applies to Easy!Appointments v1.4.0.*
|
*This document applies to Easy!Appointments v1.4.1.*
|
||||||
|
|
||||||
[Back](readme.md)
|
[Back](readme.md)
|
||||||
|
|
|
@ -20,6 +20,6 @@ You are more than welcome to help with the translation progress of the user inte
|
||||||
|
|
||||||
It would be much appreciated if you would take 5 minutes of your time to fill this small form on your experience with Easy!Appointments. User feedback is very important and will help with the future planning of the project. Fill the [E!A Feedback Form](https://docs.google.com/forms/d/15dw1jl7lUgw4q-XXMn13Gx_e8zJxAiyWYMOdqtZqIHU/viewform).
|
It would be much appreciated if you would take 5 minutes of your time to fill this small form on your experience with Easy!Appointments. User feedback is very important and will help with the future planning of the project. Fill the [E!A Feedback Form](https://docs.google.com/forms/d/15dw1jl7lUgw4q-XXMn13Gx_e8zJxAiyWYMOdqtZqIHU/viewform).
|
||||||
|
|
||||||
*This document applies to Easy!Appointments v1.4.0.*
|
*This document applies to Easy!Appointments v1.4.1.*
|
||||||
|
|
||||||
[Back](readme.md)
|
[Back](readme.md)
|
||||||
|
|
|
@ -49,6 +49,6 @@ Google Developers – https://developers.google.com/google-apps/calendar
|
||||||
|
|
||||||
E!A Support Group – https://groups.google.com/forum/#!forum/easy-appointments
|
E!A Support Group – https://groups.google.com/forum/#!forum/easy-appointments
|
||||||
|
|
||||||
*This document applies to Easy!Appointments v1.4.0.*
|
*This document applies to Easy!Appointments v1.4.1.*
|
||||||
|
|
||||||
[Back](readme.md)
|
[Back](readme.md)
|
||||||
|
|
|
@ -8,7 +8,7 @@ Easy!Appointments is a web appointment scheduler that can be installed and run i
|
||||||
### Installation
|
### Installation
|
||||||
There are 6 steps you must follow during the installation process.
|
There are 6 steps you must follow during the installation process.
|
||||||
|
|
||||||
1. **Make sure that your server has at least the following applications/tools installed: Apache(v2.4), PHP(v5.6) and MySQL(v5.7).** Easy!Appointments needs these programs to run. Most of the web hosting companies provide these tools within their Linux hosting plans. If you want to install Easy!Appointments on your local server use one of the pre-made bundles available on the web (XAMPP, MAMP, WAMP ...), all of which are free to use. If you plan to use the Google Calendar synchronization you will need the **php_curl** extension installed and enabled as well.
|
1. **Make sure that your server has at least the following applications/tools installed: Apache(v2.4), PHP(v7.0) and MySQL(v5.7).** Easy!Appointments needs these programs to run. Most of the web hosting companies provide these tools within their Linux hosting plans. If you want to install Easy!Appointments on your local server use one of the pre-made bundles available on the web (XAMPP, MAMP, WAMP ...), all of which are free to use. If you plan to use the Google Calendar synchronization you will need the **php_curl** extension installed and enabled as well.
|
||||||
2. **Create a new database (or use an existing one).** The database is necessary for storing the system data. Therefore your hosting plan must include at least one MySQL database. You must also get the database administration credentials because they will be needed later on.
|
2. **Create a new database (or use an existing one).** The database is necessary for storing the system data. Therefore your hosting plan must include at least one MySQL database. You must also get the database administration credentials because they will be needed later on.
|
||||||
3. **Upload the Easy!Appointments source files to your server.** You can place the files into a directory with named "easyappointments" or "appointments" or "book" etc. Make sure that you mark the Easy!Appointments folder URL because it will be needed in the following step. For example if the system files are placed in the this directory ".../httpdocs/easyappointments/" then the URL to this folder will be "http://your-domain.com/easyappointments". This URL will be needed in the following steps.
|
3. **Upload the Easy!Appointments source files to your server.** You can place the files into a directory with named "easyappointments" or "appointments" or "book" etc. Make sure that you mark the Easy!Appointments folder URL because it will be needed in the following step. For example if the system files are placed in the this directory ".../httpdocs/easyappointments/" then the URL to this folder will be "http://your-domain.com/easyappointments". This URL will be needed in the following steps.
|
||||||
4. **Ensure that the "storage" directory is writable.** Session information, logs and any other kind of files will land into the "storage" directory so make sure that it has the correct permissions and that is writable.
|
4. **Ensure that the "storage" directory is writable.** Session information, logs and any other kind of files will land into the "storage" directory so make sure that it has the correct permissions and that is writable.
|
||||||
|
@ -29,6 +29,6 @@ Finally just add a link in your website that points to your Easy!Appointments in
|
||||||
|
|
||||||
Happy Bookin'!
|
Happy Bookin'!
|
||||||
|
|
||||||
*This document applies to Easy!Appointments v1.4.0.*
|
*This document applies to Easy!Appointments v1.4.1.*
|
||||||
|
|
||||||
[Back](readme.md)
|
[Back](readme.md)
|
||||||
|
|
|
@ -14,6 +14,6 @@ Easy!Appointments is based upon CodeIgniter (PHP Framework) and it uses its buil
|
||||||
|
|
||||||
Follow these steps in order to add or adjust your translations and modify the message of the user interface of Easy!Appointments. If you want contribute to the translation process of Easy!Appointments please read the [Get Involved](https://github.com/alextselegidis/easyappointments/wiki/Get-Involved!) wiki page for more information. Please share your translations with the user community.
|
Follow these steps in order to add or adjust your translations and modify the message of the user interface of Easy!Appointments. If you want contribute to the translation process of Easy!Appointments please read the [Get Involved](https://github.com/alextselegidis/easyappointments/wiki/Get-Involved!) wiki page for more information. Please share your translations with the user community.
|
||||||
|
|
||||||
*This document applies to Easy!Appointments v1.4.0.*
|
*This document applies to Easy!Appointments v1.4.1.*
|
||||||
|
|
||||||
[Back](readme.md)
|
[Back](readme.md)
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
# Easy!Appointments Documentation
|
# Easy!Appointments
|
||||||
|
|
||||||
Welcome to the documentation pages of Easy!Appointments. Navigate through the available sections and learn how to get the most out of your installation.
|
Welcome to the documentation pages of Easy!Appointments. Navigate through the available sections and learn how to get the most out of your installation.
|
||||||
|
|
||||||
- [Installation & Configuration](installation-guide.md)
|
- [Installation](installation-guide.md)
|
||||||
- [Update Guide](update-guide.md)
|
- [Update](update-guide.md)
|
||||||
- [Manage Translations](manage-translations.md)
|
- [Translations](manage-translations.md)
|
||||||
- [Google Calendar Sync](google-calendar-sync.md)
|
|
||||||
- [REST API](rest-api.md)
|
- [REST API](rest-api.md)
|
||||||
- [Console](console.md)
|
- [Console](console.md)
|
||||||
- [Docker](docker.md)
|
- [Docker](docker.md)
|
||||||
|
- [Google Calendar Sync](google-calendar-sync.md)
|
||||||
- [FAQ](faq.md)
|
- [FAQ](faq.md)
|
||||||
|
|
||||||
*This document applies to Easy!Appointments v1.4.0.*
|
*This document applies to Easy!Appointments v1.4.1.*
|
||||||
|
|
|
@ -472,6 +472,6 @@ fastcgi_param PHP_AUTH_PW $http_authorization;
|
||||||
|
|
||||||
[[Source]](http://serverfault.com/a/520943)
|
[[Source]](http://serverfault.com/a/520943)
|
||||||
|
|
||||||
*This document applies to Easy!Appointments v1.4.0.*
|
*This document applies to Easy!Appointments v1.4.1.*
|
||||||
|
|
||||||
[Back](readme.md)
|
[Back](readme.md)
|
||||||
|
|
|
@ -110,6 +110,6 @@ Open your browser to the Easy!Appointments installation URL, login to the backen
|
||||||
|
|
||||||
Use the data of the old `configuration.php` file in the new `config.php`.
|
Use the data of the old `configuration.php` file in the new `config.php`.
|
||||||
|
|
||||||
*This document applies to Easy!Appointments v1.4.0.*
|
*This document applies to Easy!Appointments v1.4.1.*
|
||||||
|
|
||||||
[Back](readme.md)
|
[Back](readme.md)
|
||||||
|
|
|
@ -29,7 +29,7 @@ class Admins implements ParsersInterface {
|
||||||
public function encode(array &$response)
|
public function encode(array &$response)
|
||||||
{
|
{
|
||||||
$encoded_response = [
|
$encoded_response = [
|
||||||
'id' => $response['id'] !== NULL ? (int)$response['id'] : NULL,
|
'id' => array_key_exists('id', $response) ? (int)$response['id'] : NULL,
|
||||||
'firstName' => $response['first_name'],
|
'firstName' => $response['first_name'],
|
||||||
'lastName' => $response['last_name'],
|
'lastName' => $response['last_name'],
|
||||||
'email' => $response['email'],
|
'email' => $response['email'],
|
||||||
|
@ -40,6 +40,7 @@ class Admins implements ParsersInterface {
|
||||||
'state' => $response['state'],
|
'state' => $response['state'],
|
||||||
'zip' => $response['zip_code'],
|
'zip' => $response['zip_code'],
|
||||||
'notes' => $response['notes'],
|
'notes' => $response['notes'],
|
||||||
|
'timezone' => $response['timezone'],
|
||||||
'settings' => [
|
'settings' => [
|
||||||
'username' => $response['settings']['username'],
|
'username' => $response['settings']['username'],
|
||||||
'notifications' => filter_var($response['settings']['notifications'], FILTER_VALIDATE_BOOLEAN),
|
'notifications' => filter_var($response['settings']['notifications'], FILTER_VALIDATE_BOOLEAN),
|
||||||
|
@ -60,85 +61,90 @@ class Admins implements ParsersInterface {
|
||||||
{
|
{
|
||||||
$decoded_request = $base ?: [];
|
$decoded_request = $base ?: [];
|
||||||
|
|
||||||
if ( ! empty($request['id']))
|
if (array_key_exists('id', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['id'] = $request['id'];
|
$decoded_request['id'] = $request['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['firstName']))
|
if (array_key_exists('firstName', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['first_name'] = $request['firstName'];
|
$decoded_request['first_name'] = $request['firstName'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['lastName']))
|
if (array_key_exists('lastName', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['last_name'] = $request['lastName'];
|
$decoded_request['last_name'] = $request['lastName'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['email']))
|
if (array_key_exists('email', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['email'] = $request['email'];
|
$decoded_request['email'] = $request['email'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['mobile']))
|
if (array_key_exists('mobile', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['mobile_number'] = $request['mobile'];
|
$decoded_request['mobile_number'] = $request['mobile'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['phone']))
|
if (array_key_exists('phone', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['phone_number'] = $request['phone'];
|
$decoded_request['phone_number'] = $request['phone'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['address']))
|
if (array_key_exists('address', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['address'] = $request['address'];
|
$decoded_request['address'] = $request['address'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['city']))
|
if (array_key_exists('city', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['city'] = $request['city'];
|
$decoded_request['city'] = $request['city'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['state']))
|
if (array_key_exists('state', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['state'] = $request['state'];
|
$decoded_request['state'] = $request['state'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['zip']))
|
if (array_key_exists('zip', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['zip_code'] = $request['zip'];
|
$decoded_request['zip_code'] = $request['zip'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['notes']))
|
if (array_key_exists('notes', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['notes'] = $request['notes'];
|
$decoded_request['notes'] = $request['notes'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['settings']))
|
if (array_key_exists('timezone', $request))
|
||||||
|
{
|
||||||
|
$decoded_request['timezone'] = $request['timezone'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (array_key_exists('settings', $request))
|
||||||
{
|
{
|
||||||
if (empty($decoded_request['settings']))
|
if (empty($decoded_request['settings']))
|
||||||
{
|
{
|
||||||
$decoded_request['settings'] = [];
|
$decoded_request['settings'] = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['settings']['username']))
|
if (array_key_exists('username', $request['settings']))
|
||||||
{
|
{
|
||||||
$decoded_request['settings']['username'] = $request['settings']['username'];
|
$decoded_request['settings']['username'] = $request['settings']['username'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['settings']['password']))
|
if (array_key_exists('password', $request['settings']))
|
||||||
{
|
{
|
||||||
$decoded_request['settings']['password'] = $request['settings']['password'];
|
$decoded_request['settings']['password'] = $request['settings']['password'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request['settings']['notifications'] !== NULL)
|
if (array_key_exists('notifications', $request['settings']))
|
||||||
{
|
{
|
||||||
$decoded_request['settings']['notifications'] = filter_var($request['settings']['notifications'],
|
$decoded_request['settings']['notifications'] = filter_var($request['settings']['notifications'],
|
||||||
FILTER_VALIDATE_BOOLEAN);
|
FILTER_VALIDATE_BOOLEAN);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['settings']['calendarView']))
|
if (array_key_exists('calendarView', $request['settings']))
|
||||||
{
|
{
|
||||||
$decoded_request['settings']['calendar_view'] = $request['settings']['calendarView'];
|
$decoded_request['settings']['calendar_view'] = $request['settings']['calendarView'];
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ class Appointments implements ParsersInterface {
|
||||||
public function encode(array &$response)
|
public function encode(array &$response)
|
||||||
{
|
{
|
||||||
$encoded_response = [
|
$encoded_response = [
|
||||||
'id' => $response['id'] !== NULL ? (int)$response['id'] : NULL,
|
'id' => array_key_exists('id', $response) ? (int)$response['id'] : NULL,
|
||||||
'book' => $response['book_datetime'],
|
'book' => $response['book_datetime'],
|
||||||
'start' => $response['start_datetime'],
|
'start' => $response['start_datetime'],
|
||||||
'end' => $response['end_datetime'],
|
'end' => $response['end_datetime'],
|
||||||
|
@ -76,57 +76,57 @@ class Appointments implements ParsersInterface {
|
||||||
{
|
{
|
||||||
$decoded_request = $base ?: [];
|
$decoded_request = $base ?: [];
|
||||||
|
|
||||||
if ( ! empty($request['id']))
|
if (array_key_exists('id', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['id'] = $request['id'];
|
$decoded_request['id'] = $request['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['book']))
|
if (array_key_exists('book', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['book_datetime'] = $request['book'];
|
$decoded_request['book_datetime'] = $request['book'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['start']))
|
if (array_key_exists('start', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['start_datetime'] = $request['start'];
|
$decoded_request['start_datetime'] = $request['start'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['end']))
|
if (array_key_exists('end', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['end_datetime'] = $request['end'];
|
$decoded_request['end_datetime'] = $request['end'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['hash']))
|
if (array_key_exists('hash', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['hash'] = $request['hash'];
|
$decoded_request['hash'] = $request['hash'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['location']))
|
if (array_key_exists('location', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['location'] = $request['location'];
|
$decoded_request['location'] = $request['location'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['notes']))
|
if (array_key_exists('notes', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['notes'] = $request['notes'];
|
$decoded_request['notes'] = $request['notes'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['customerId']))
|
if (array_key_exists('customerId', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['id_users_customer'] = $request['customerId'];
|
$decoded_request['id_users_customer'] = $request['customerId'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['providerId']))
|
if (array_key_exists('providerId', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['id_users_provider'] = $request['providerId'];
|
$decoded_request['id_users_provider'] = $request['providerId'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['serviceId']))
|
if (array_key_exists('serviceId', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['id_services'] = $request['serviceId'];
|
$decoded_request['id_services'] = $request['serviceId'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['googleCalendarId']))
|
if (array_key_exists('googleCalendarId', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['id_google_calendar'] = $request['googleCalendarId'];
|
$decoded_request['id_google_calendar'] = $request['googleCalendarId'];
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,9 +29,9 @@ class Categories implements ParsersInterface {
|
||||||
public function encode(array &$response)
|
public function encode(array &$response)
|
||||||
{
|
{
|
||||||
$encoded_response = [
|
$encoded_response = [
|
||||||
'id' => $response['id'] !== NULL ? (int)$response['id'] : NULL,
|
'id' => array_key_exists('id', $response) ? (int)$response['id'] : NULL,
|
||||||
'name' => $response['name'],
|
'name' => $response['name'],
|
||||||
'description' => $response['description']
|
'description' => array_key_exists('description', $response) ? $response['description'] : NULL
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $encoded_response;
|
$response = $encoded_response;
|
||||||
|
@ -47,17 +47,17 @@ class Categories implements ParsersInterface {
|
||||||
{
|
{
|
||||||
$decoded_request = $base ?: [];
|
$decoded_request = $base ?: [];
|
||||||
|
|
||||||
if ( ! empty($request['id']))
|
if (array_key_exists('id', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['id'] = $request['id'];
|
$decoded_request['id'] = $request['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['name']))
|
if (array_key_exists('name', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['name'] = $request['name'];
|
$decoded_request['name'] = $request['name'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['description']))
|
if (array_key_exists('description', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['description'] = $request['description'];
|
$decoded_request['description'] = $request['description'];
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ class Customers implements ParsersInterface {
|
||||||
public function encode(array &$response)
|
public function encode(array &$response)
|
||||||
{
|
{
|
||||||
$encoded_response = [
|
$encoded_response = [
|
||||||
'id' => $response['id'] !== NULL ? (int)$response['id'] : NULL,
|
'id' => array_key_exists('id', $response) ? (int)$response['id'] : NULL,
|
||||||
'firstName' => $response['first_name'],
|
'firstName' => $response['first_name'],
|
||||||
'lastName' => $response['last_name'],
|
'lastName' => $response['last_name'],
|
||||||
'email' => $response['email'],
|
'email' => $response['email'],
|
||||||
|
@ -53,47 +53,47 @@ class Customers implements ParsersInterface {
|
||||||
{
|
{
|
||||||
$decoded_request = $base ?: [];
|
$decoded_request = $base ?: [];
|
||||||
|
|
||||||
if ( ! empty($request['id']))
|
if ( array_key_exists('id', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['id'] = $request['id'];
|
$decoded_request['id'] = $request['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['firstName']))
|
if ( array_key_exists('firstName', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['first_name'] = $request['firstName'];
|
$decoded_request['first_name'] = $request['firstName'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['lastName']))
|
if ( array_key_exists('lastName', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['last_name'] = $request['lastName'];
|
$decoded_request['last_name'] = $request['lastName'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['email']))
|
if ( array_key_exists('email', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['email'] = $request['email'];
|
$decoded_request['email'] = $request['email'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['phone']))
|
if ( array_key_exists('phone', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['phone_number'] = $request['phone'];
|
$decoded_request['phone_number'] = $request['phone'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['address']))
|
if ( array_key_exists('address', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['address'] = $request['address'];
|
$decoded_request['address'] = $request['address'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['city']))
|
if ( array_key_exists('city', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['city'] = $request['city'];
|
$decoded_request['city'] = $request['city'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['zip']))
|
if ( array_key_exists('zip', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['zip_code'] = $request['zip'];
|
$decoded_request['zip_code'] = $request['zip'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['notes']))
|
if ( array_key_exists('notes', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['notes'] = $request['notes'];
|
$decoded_request['notes'] = $request['notes'];
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ class Providers implements ParsersInterface {
|
||||||
public function encode(array &$response)
|
public function encode(array &$response)
|
||||||
{
|
{
|
||||||
$encoded_response = [
|
$encoded_response = [
|
||||||
'id' => $response['id'] !== NULL ? (int)$response['id'] : NULL,
|
'id' => array_key_exists('id', $response) ? (int)$response['id'] : NULL,
|
||||||
'firstName' => $response['first_name'],
|
'firstName' => $response['first_name'],
|
||||||
'lastName' => $response['last_name'],
|
'lastName' => $response['last_name'],
|
||||||
'email' => $response['email'],
|
'email' => $response['email'],
|
||||||
|
@ -40,6 +40,7 @@ class Providers implements ParsersInterface {
|
||||||
'state' => $response['state'],
|
'state' => $response['state'],
|
||||||
'zip' => $response['zip_code'],
|
'zip' => $response['zip_code'],
|
||||||
'notes' => $response['notes'],
|
'notes' => $response['notes'],
|
||||||
|
'timezone' => $response['timezone'],
|
||||||
];
|
];
|
||||||
|
|
||||||
if (array_key_exists('services', $response))
|
if (array_key_exists('services', $response))
|
||||||
|
@ -53,13 +54,27 @@ class Providers implements ParsersInterface {
|
||||||
'username' => $response['settings']['username'],
|
'username' => $response['settings']['username'],
|
||||||
'notifications' => filter_var($response['settings']['notifications'], FILTER_VALIDATE_BOOLEAN),
|
'notifications' => filter_var($response['settings']['notifications'], FILTER_VALIDATE_BOOLEAN),
|
||||||
'calendarView' => $response['settings']['calendar_view'],
|
'calendarView' => $response['settings']['calendar_view'],
|
||||||
'googleSync' => filter_var($response['settings']['google_sync'], FILTER_VALIDATE_BOOLEAN),
|
'googleSync' => array_key_exists('google_sync', $response['settings'])
|
||||||
'googleCalendar' => $response['settings']['google_calendar'],
|
? filter_var($response['settings']['google_sync'], FILTER_VALIDATE_BOOLEAN)
|
||||||
'googleToken' => $response['settings']['google_token'],
|
: NULL,
|
||||||
'syncFutureDays' => $response['settings']['sync_future_days'] !== NULL ? (int)$response['settings']['sync_future_days'] : NULL,
|
'googleCalendar' => array_key_exists('google_calendar', $response['settings'])
|
||||||
'syncPastDays' => $response['settings']['sync_past_days'] !== NULL ? (int)$response['settings']['sync_past_days'] : NULL,
|
? $response['settings']['google_calendar']
|
||||||
'workingPlan' => json_decode($response['settings']['working_plan'], TRUE),
|
: NULL,
|
||||||
'workingPlanExceptions' => json_decode($response['settings']['working_plan_exceptions'], TRUE),
|
'googleToken' => array_key_exists('google_token', $response['settings'])
|
||||||
|
? $response['settings']['google_token']
|
||||||
|
: NULL,
|
||||||
|
'syncFutureDays' => array_key_exists('sync_future_days', $response['settings'])
|
||||||
|
? (int)$response['settings']['sync_future_days']
|
||||||
|
: NULL,
|
||||||
|
'syncPastDays' => array_key_exists('sync_past_days', $response['settings'])
|
||||||
|
? (int)$response['settings']['sync_past_days']
|
||||||
|
: NULL,
|
||||||
|
'workingPlan' => array_key_exists('working_plan', $response['settings'])
|
||||||
|
? json_decode($response['settings']['working_plan'], TRUE)
|
||||||
|
: NULL,
|
||||||
|
'workingPlanExceptions' => array_key_exists('working_plan_exceptions', $response['settings'])
|
||||||
|
? json_decode($response['settings']['working_plan_exceptions'], TRUE)
|
||||||
|
: NULL,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,126 +91,131 @@ class Providers implements ParsersInterface {
|
||||||
{
|
{
|
||||||
$decoded_request = $base ?: [];
|
$decoded_request = $base ?: [];
|
||||||
|
|
||||||
if ( ! empty($request['id']))
|
if (array_key_exists('id', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['id'] = $request['id'];
|
$decoded_request['id'] = $request['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['firstName']))
|
if (array_key_exists('firstName', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['first_name'] = $request['firstName'];
|
$decoded_request['first_name'] = $request['firstName'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['lastName']))
|
if (array_key_exists('lastName', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['last_name'] = $request['lastName'];
|
$decoded_request['last_name'] = $request['lastName'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['email']))
|
if (array_key_exists('email', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['email'] = $request['email'];
|
$decoded_request['email'] = $request['email'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['mobile']))
|
if (array_key_exists('mobile', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['mobile_number'] = $request['mobile'];
|
$decoded_request['mobile_number'] = $request['mobile'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['phone']))
|
if (array_key_exists('phone', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['phone_number'] = $request['phone'];
|
$decoded_request['phone_number'] = $request['phone'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['address']))
|
if (array_key_exists('address', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['address'] = $request['address'];
|
$decoded_request['address'] = $request['address'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['city']))
|
if (array_key_exists('city', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['city'] = $request['city'];
|
$decoded_request['city'] = $request['city'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['state']))
|
if (array_key_exists('state', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['state'] = $request['state'];
|
$decoded_request['state'] = $request['state'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['zip']))
|
if (array_key_exists('zip', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['zip_code'] = $request['zip'];
|
$decoded_request['zip_code'] = $request['zip'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['notes']))
|
if (array_key_exists('notes', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['notes'] = $request['notes'];
|
$decoded_request['notes'] = $request['notes'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['services']))
|
if (array_key_exists('timezone', $request))
|
||||||
|
{
|
||||||
|
$decoded_request['timezone'] = $request['timezone'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (array_key_exists('services', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['services'] = $request['services'];
|
$decoded_request['services'] = $request['services'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['settings']))
|
if (array_key_exists('settings', $request))
|
||||||
{
|
{
|
||||||
if (empty($decoded_request['settings']))
|
if (empty($decoded_request['settings']))
|
||||||
{
|
{
|
||||||
$decoded_request['settings'] = [];
|
$decoded_request['settings'] = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['settings']['username']))
|
if (array_key_exists('username', $request['settings']))
|
||||||
{
|
{
|
||||||
$decoded_request['settings']['username'] = $request['settings']['username'];
|
$decoded_request['settings']['username'] = $request['settings']['username'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['settings']['password']))
|
if (array_key_exists('password', $request['settings']))
|
||||||
{
|
{
|
||||||
$decoded_request['settings']['password'] = $request['settings']['password'];
|
$decoded_request['settings']['password'] = $request['settings']['password'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['settings']['calendarView']))
|
if (array_key_exists('calendarView', $request['settings']))
|
||||||
{
|
{
|
||||||
$decoded_request['settings']['calendar_view'] = $request['settings']['calendarView'];
|
$decoded_request['settings']['calendar_view'] = $request['settings']['calendarView'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request['settings']['notifications'] !== NULL)
|
if (array_key_exists('notifications', $request['settings']))
|
||||||
{
|
{
|
||||||
$decoded_request['settings']['notifications'] = filter_var($request['settings']['notifications'],
|
$decoded_request['settings']['notifications'] = filter_var($request['settings']['notifications'],
|
||||||
FILTER_VALIDATE_BOOLEAN);
|
FILTER_VALIDATE_BOOLEAN);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request['settings']['googleSync'] !== NULL)
|
if (array_key_exists('googleSync', $request['settings']))
|
||||||
{
|
{
|
||||||
$decoded_request['settings']['google_sync'] = filter_var($request['settings']['googleSync'],
|
$decoded_request['settings']['google_sync'] = filter_var($request['settings']['googleSync'],
|
||||||
FILTER_VALIDATE_BOOLEAN);
|
FILTER_VALIDATE_BOOLEAN);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['settings']['googleCalendar']))
|
if (array_key_exists('googleCalendar', $request['settings']))
|
||||||
{
|
{
|
||||||
$decoded_request['settings']['google_calendar'] = $request['settings']['googleCalendar'];
|
$decoded_request['settings']['google_calendar'] = $request['settings']['googleCalendar'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['settings']['googleToken']))
|
if (array_key_exists('googleToken', $request['settings']))
|
||||||
{
|
{
|
||||||
$decoded_request['settings']['google_token'] = $request['settings']['googleToken'];
|
$decoded_request['settings']['google_token'] = $request['settings']['googleToken'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['settings']['syncFutureDays']))
|
if (array_key_exists('syncFutureDays', $request['settings']))
|
||||||
{
|
{
|
||||||
$decoded_request['settings']['sync_future_days'] = $request['settings']['syncFutureDays'];
|
$decoded_request['settings']['sync_future_days'] = $request['settings']['syncFutureDays'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['settings']['syncPastDays']))
|
if (array_key_exists('syncPastDays', $request['settings']))
|
||||||
{
|
{
|
||||||
$decoded_request['settings']['sync_past_days'] = $request['settings']['syncPastDays'];
|
$decoded_request['settings']['sync_past_days'] = $request['settings']['syncPastDays'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['settings']['workingPlan']))
|
if (array_key_exists('workingPlan', $request['settings']))
|
||||||
{
|
{
|
||||||
$decoded_request['settings']['working_plan'] = json_encode($request['settings']['workingPlan']);
|
$decoded_request['settings']['working_plan'] = json_encode($request['settings']['workingPlan']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['settings']['workingPlanExceptions']))
|
if (array_key_exists('workingPlanExceptions', $request['settings']))
|
||||||
{
|
{
|
||||||
$decoded_request['settings']['working_plan_exceptions'] = json_encode($request['settings']['workingPlanExceptions']);
|
$decoded_request['settings']['working_plan_exceptions'] = json_encode($request['settings']['workingPlanExceptions']);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ class Secretaries implements ParsersInterface {
|
||||||
public function encode(array &$response)
|
public function encode(array &$response)
|
||||||
{
|
{
|
||||||
$encoded_response = [
|
$encoded_response = [
|
||||||
'id' => $response['id'] !== NULL ? (int)$response['id'] : NULL,
|
'id' => array_key_exists('id', $response) ? (int)$response['id'] : NULL,
|
||||||
'firstName' => $response['first_name'],
|
'firstName' => $response['first_name'],
|
||||||
'lastName' => $response['last_name'],
|
'lastName' => $response['last_name'],
|
||||||
'email' => $response['email'],
|
'email' => $response['email'],
|
||||||
|
@ -41,6 +41,7 @@ class Secretaries implements ParsersInterface {
|
||||||
'zip' => $response['zip_code'],
|
'zip' => $response['zip_code'],
|
||||||
'notes' => $response['notes'],
|
'notes' => $response['notes'],
|
||||||
'providers' => $response['providers'],
|
'providers' => $response['providers'],
|
||||||
|
'timezone' => $response['timezone'],
|
||||||
'settings' => [
|
'settings' => [
|
||||||
'username' => $response['settings']['username'],
|
'username' => $response['settings']['username'],
|
||||||
'notifications' => filter_var($response['settings']['notifications'], FILTER_VALIDATE_BOOLEAN),
|
'notifications' => filter_var($response['settings']['notifications'], FILTER_VALIDATE_BOOLEAN),
|
||||||
|
@ -61,90 +62,95 @@ class Secretaries implements ParsersInterface {
|
||||||
{
|
{
|
||||||
$decoded_request = $base ?: [];
|
$decoded_request = $base ?: [];
|
||||||
|
|
||||||
if ( ! empty($request['id']))
|
if (array_key_exists('id', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['id'] = $request['id'];
|
$decoded_request['id'] = $request['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['firstName']))
|
if (array_key_exists('firstName', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['first_name'] = $request['firstName'];
|
$decoded_request['first_name'] = $request['firstName'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['lastName']))
|
if (array_key_exists('lastName', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['last_name'] = $request['lastName'];
|
$decoded_request['last_name'] = $request['lastName'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['email']))
|
if (array_key_exists('email', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['email'] = $request['email'];
|
$decoded_request['email'] = $request['email'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['mobile']))
|
if (array_key_exists('mobile', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['mobile_number'] = $request['mobile'];
|
$decoded_request['mobile_number'] = $request['mobile'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['phone']))
|
if (array_key_exists('phone', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['phone_number'] = $request['phone'];
|
$decoded_request['phone_number'] = $request['phone'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['address']))
|
if (array_key_exists('address', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['address'] = $request['address'];
|
$decoded_request['address'] = $request['address'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['city']))
|
if (array_key_exists('city', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['city'] = $request['city'];
|
$decoded_request['city'] = $request['city'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['state']))
|
if (array_key_exists('state', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['state'] = $request['state'];
|
$decoded_request['state'] = $request['state'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['zip']))
|
if (array_key_exists('zip', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['zip_code'] = $request['zip'];
|
$decoded_request['zip_code'] = $request['zip'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['notes']))
|
if (array_key_exists('notes', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['notes'] = $request['notes'];
|
$decoded_request['notes'] = $request['notes'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['providers']))
|
if (array_key_exists('timezone', $request))
|
||||||
|
{
|
||||||
|
$decoded_request['timezone'] = $request['timezone'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (array_key_exists('providers', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['providers'] = $request['providers'];
|
$decoded_request['providers'] = $request['providers'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['settings']))
|
if (array_key_exists('settings', $request))
|
||||||
{
|
{
|
||||||
if (empty($decoded_request['settings']))
|
if (empty($decoded_request['settings']))
|
||||||
{
|
{
|
||||||
$decoded_request['settings'] = [];
|
$decoded_request['settings'] = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['settings']['username']))
|
if (array_key_exists('username', $request['settings']))
|
||||||
{
|
{
|
||||||
$decoded_request['settings']['username'] = $request['settings']['username'];
|
$decoded_request['settings']['username'] = $request['settings']['username'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['settings']['password']))
|
if (array_key_exists('password', $request['settings']))
|
||||||
{
|
{
|
||||||
$decoded_request['settings']['password'] = $request['settings']['password'];
|
$decoded_request['settings']['password'] = $request['settings']['password'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request['settings']['notifications'] !== NULL)
|
if (array_key_exists('notifications', $request['settings']))
|
||||||
{
|
{
|
||||||
$decoded_request['settings']['notifications'] = filter_var($request['settings']['notifications'],
|
$decoded_request['settings']['notifications'] = filter_var($request['settings']['notifications'],
|
||||||
FILTER_VALIDATE_BOOLEAN);
|
FILTER_VALIDATE_BOOLEAN);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['settings']['calendarView']))
|
if (array_key_exists('calendarView', $request['settings']))
|
||||||
{
|
{
|
||||||
$decoded_request['settings']['calendar_view'] = $request['settings']['calendarView'];
|
$decoded_request['settings']['calendar_view'] = $request['settings']['calendarView'];
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ class Services implements ParsersInterface {
|
||||||
public function encode(array &$response)
|
public function encode(array &$response)
|
||||||
{
|
{
|
||||||
$encoded_response = [
|
$encoded_response = [
|
||||||
'id' => $response['id'] !== NULL ? (int)$response['id'] : NULL,
|
'id' => array_key_exists('id', $response) ? (int)$response['id'] : NULL,
|
||||||
'name' => $response['name'],
|
'name' => $response['name'],
|
||||||
'duration' => (int)$response['duration'],
|
'duration' => (int)$response['duration'],
|
||||||
'price' => (float)$response['price'],
|
'price' => (float)$response['price'],
|
||||||
|
@ -54,52 +54,52 @@ class Services implements ParsersInterface {
|
||||||
{
|
{
|
||||||
$decoded_request = $base ?: [];
|
$decoded_request = $base ?: [];
|
||||||
|
|
||||||
if ( ! empty($request['id']))
|
if (array_key_exists('id', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['id'] = $request['id'];
|
$decoded_request['id'] = $request['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['name']))
|
if (array_key_exists('name', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['name'] = $request['name'];
|
$decoded_request['name'] = $request['name'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['duration']))
|
if (array_key_exists('duration', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['duration'] = $request['duration'];
|
$decoded_request['duration'] = $request['duration'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['price']))
|
if (array_key_exists('price', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['price'] = $request['price'];
|
$decoded_request['price'] = $request['price'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['currency']))
|
if (array_key_exists('currency', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['currency'] = $request['currency'];
|
$decoded_request['currency'] = $request['currency'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['description']))
|
if (array_key_exists('description', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['description'] = $request['description'];
|
$decoded_request['description'] = $request['description'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['location']))
|
if (array_key_exists('location', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['location'] = $request['location'];
|
$decoded_request['location'] = $request['location'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['availabilitiesType']))
|
if (array_key_exists('availabilitiesType', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['availabilities_type'] = $request['availabilitiesType'];
|
$decoded_request['availabilities_type'] = $request['availabilitiesType'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['attendantsNumber']))
|
if (array_key_exists('attendantsNumber', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['attendants_number'] = $request['attendantsNumber'];
|
$decoded_request['attendants_number'] = $request['attendantsNumber'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['categoryId']))
|
if (array_key_exists('categoryId', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['id_service_categories'] = $request['categoryId'];
|
$decoded_request['id_service_categories'] = $request['categoryId'];
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,12 +46,12 @@ class Settings implements ParsersInterface {
|
||||||
{
|
{
|
||||||
$decoded_request = $base ?: [];
|
$decoded_request = $base ?: [];
|
||||||
|
|
||||||
if ( ! empty($request['name']))
|
if (array_key_exists('name', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['name'] = $request['name'];
|
$decoded_request['name'] = $request['name'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['value']))
|
if (array_key_exists('value', $request))
|
||||||
{
|
{
|
||||||
$decoded_request['value'] = $request['value'];
|
$decoded_request['value'] = $request['value'];
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,13 +29,17 @@ class Unavailabilities implements ParsersInterface {
|
||||||
public function encode(array &$response)
|
public function encode(array &$response)
|
||||||
{
|
{
|
||||||
$encoded_response = [
|
$encoded_response = [
|
||||||
'id' => $response['id'] !== NULL ? (int)$response['id'] : NULL,
|
'id' => array_key_exists('id', $response) ? (int)$response['id'] : NULL,
|
||||||
'book' => $response['book_datetime'],
|
'book' => $response['book_datetime'],
|
||||||
'start' => $response['start_datetime'],
|
'start' => $response['start_datetime'],
|
||||||
'end' => $response['end_datetime'],
|
'end' => $response['end_datetime'],
|
||||||
'notes' => $response['notes'],
|
'notes' => $response['notes'],
|
||||||
'providerId' => $response['id_users_provider'] !== NULL ? (int)$response['id_users_provider'] : NULL,
|
'providerId' => array_key_exists('id_users_provider', $response)
|
||||||
'googleCalendarId' => $response['id_google_calendar'] !== NULL ? (int)$response['id_google_calendar'] : NULL
|
? (int)$response['id_users_provider']
|
||||||
|
: NULL,
|
||||||
|
'googleCalendarId' => array_key_exists('id_google_calendar', $response)
|
||||||
|
? (int)$response['id_google_calendar']
|
||||||
|
: NULL
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $encoded_response;
|
$response = $encoded_response;
|
||||||
|
@ -51,37 +55,37 @@ class Unavailabilities implements ParsersInterface {
|
||||||
{
|
{
|
||||||
$decodedRequest = $base ?: [];
|
$decodedRequest = $base ?: [];
|
||||||
|
|
||||||
if ( ! empty($request['id']))
|
if (array_key_exists('id', $request))
|
||||||
{
|
{
|
||||||
$decodedRequest['id'] = $request['id'];
|
$decodedRequest['id'] = $request['id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['book']))
|
if (array_key_exists('book', $request))
|
||||||
{
|
{
|
||||||
$decodedRequest['book_datetime'] = $request['book'];
|
$decodedRequest['book_datetime'] = $request['book'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['start']))
|
if (array_key_exists('start', $request))
|
||||||
{
|
{
|
||||||
$decodedRequest['start_datetime'] = $request['start'];
|
$decodedRequest['start_datetime'] = $request['start'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['end']))
|
if (array_key_exists('end', $request))
|
||||||
{
|
{
|
||||||
$decodedRequest['end_datetime'] = $request['end'];
|
$decodedRequest['end_datetime'] = $request['end'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['notes']))
|
if (array_key_exists('notes', $request))
|
||||||
{
|
{
|
||||||
$decodedRequest['notes'] = $request['notes'];
|
$decodedRequest['notes'] = $request['notes'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['providerId']))
|
if (array_key_exists('providerId', $request))
|
||||||
{
|
{
|
||||||
$decodedRequest['id_users_provider'] = $request['providerId'];
|
$decodedRequest['id_users_provider'] = $request['providerId'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($request['googleCalendarId']))
|
if (array_key_exists('googleCalendarId', $request))
|
||||||
{
|
{
|
||||||
$decodedRequest['id_google_calendar'] = $request['googleCalendarId'];
|
$decodedRequest['id_google_calendar'] = $request['googleCalendarId'];
|
||||||
}
|
}
|
||||||
|
|
13
gulpfile.js
13
gulpfile.js
|
@ -15,6 +15,7 @@ const fs = require('fs-extra');
|
||||||
const zip = require('zip-dir');
|
const zip = require('zip-dir');
|
||||||
const plugins = require('gulp-load-plugins')();
|
const plugins = require('gulp-load-plugins')();
|
||||||
const {execSync} = require('child_process');
|
const {execSync} = require('child_process');
|
||||||
|
const del = require('del');
|
||||||
|
|
||||||
// Gulp error handling.
|
// Gulp error handling.
|
||||||
const source = gulp.src;
|
const source = gulp.src;
|
||||||
|
@ -68,16 +69,18 @@ gulp.task('package', (done) => {
|
||||||
console.log(stderr);
|
console.log(stderr);
|
||||||
});
|
});
|
||||||
|
|
||||||
execSync('cd build && find . -name ".DS_Store" -type f -delete', function (err, stdout, stderr) {
|
del.sync('**/.DS_Store');
|
||||||
console.log(stdout);
|
|
||||||
console.log(stderr);
|
|
||||||
});
|
|
||||||
|
|
||||||
fs.removeSync('build/composer.lock');
|
fs.removeSync('build/composer.lock');
|
||||||
|
|
||||||
|
del.sync('**/.DS_Store');
|
||||||
|
|
||||||
|
del.sync('build/vendor/codeigniter/framework/user_guide');
|
||||||
|
|
||||||
zip('build', {saveTo: archive}, function (err) {
|
zip('build', {saveTo: archive}, function (err) {
|
||||||
if (err)
|
if (err) {
|
||||||
console.log('Zip Error', err);
|
console.log('Zip Error', err);
|
||||||
|
}
|
||||||
|
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
226
package-lock.json
generated
226
package-lock.json
generated
|
@ -14,6 +14,29 @@
|
||||||
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.1.tgz",
|
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.1.tgz",
|
||||||
"integrity": "sha512-OEdH7SyC1suTdhBGW91/zBfR6qaIhThbcN8PUXtXilY4GYnSBbVqOntdHbC1vXwsDnX0Qix2m2+DSU1J51ybOQ=="
|
"integrity": "sha512-OEdH7SyC1suTdhBGW91/zBfR6qaIhThbcN8PUXtXilY4GYnSBbVqOntdHbC1vXwsDnX0Qix2m2+DSU1J51ybOQ=="
|
||||||
},
|
},
|
||||||
|
"@nodelib/fs.scandir": {
|
||||||
|
"version": "2.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz",
|
||||||
|
"integrity": "sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==",
|
||||||
|
"requires": {
|
||||||
|
"@nodelib/fs.stat": "2.0.3",
|
||||||
|
"run-parallel": "^1.1.9"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@nodelib/fs.stat": {
|
||||||
|
"version": "2.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz",
|
||||||
|
"integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA=="
|
||||||
|
},
|
||||||
|
"@nodelib/fs.walk": {
|
||||||
|
"version": "1.2.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz",
|
||||||
|
"integrity": "sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==",
|
||||||
|
"requires": {
|
||||||
|
"@nodelib/fs.scandir": "2.1.3",
|
||||||
|
"fastq": "^1.6.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@popperjs/core": {
|
"@popperjs/core": {
|
||||||
"version": "2.5.3",
|
"version": "2.5.3",
|
||||||
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.5.3.tgz",
|
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.5.3.tgz",
|
||||||
|
@ -48,6 +71,15 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"aggregate-error": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==",
|
||||||
|
"requires": {
|
||||||
|
"clean-stack": "^2.0.0",
|
||||||
|
"indent-string": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"ajv": {
|
"ajv": {
|
||||||
"version": "4.11.8",
|
"version": "4.11.8",
|
||||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz",
|
"resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz",
|
||||||
|
@ -263,6 +295,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"array-union": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw=="
|
||||||
|
},
|
||||||
"array-unique": {
|
"array-unique": {
|
||||||
"version": "0.3.2",
|
"version": "0.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
|
||||||
|
@ -606,6 +643,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"clean-stack": {
|
||||||
|
"version": "2.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz",
|
||||||
|
"integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A=="
|
||||||
|
},
|
||||||
"cli": {
|
"cli": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz",
|
||||||
|
@ -923,6 +965,31 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"del": {
|
||||||
|
"version": "6.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/del/-/del-6.0.0.tgz",
|
||||||
|
"integrity": "sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ==",
|
||||||
|
"requires": {
|
||||||
|
"globby": "^11.0.1",
|
||||||
|
"graceful-fs": "^4.2.4",
|
||||||
|
"is-glob": "^4.0.1",
|
||||||
|
"is-path-cwd": "^2.2.0",
|
||||||
|
"is-path-inside": "^3.0.2",
|
||||||
|
"p-map": "^4.0.0",
|
||||||
|
"rimraf": "^3.0.2",
|
||||||
|
"slash": "^3.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"rimraf": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
|
||||||
|
"requires": {
|
||||||
|
"glob": "^7.1.3"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"detect-file": {
|
"detect-file": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz",
|
||||||
|
@ -934,6 +1001,21 @@
|
||||||
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
|
||||||
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A=="
|
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A=="
|
||||||
},
|
},
|
||||||
|
"dir-glob": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
|
||||||
|
"integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
|
||||||
|
"requires": {
|
||||||
|
"path-type": "^4.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"path-type": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"doctrine": {
|
"doctrine": {
|
||||||
"version": "1.5.0",
|
"version": "1.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz",
|
||||||
|
@ -1489,12 +1571,81 @@
|
||||||
"time-stamp": "^1.0.0"
|
"time-stamp": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"fast-glob": {
|
||||||
|
"version": "3.2.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.4.tgz",
|
||||||
|
"integrity": "sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ==",
|
||||||
|
"requires": {
|
||||||
|
"@nodelib/fs.stat": "^2.0.2",
|
||||||
|
"@nodelib/fs.walk": "^1.2.3",
|
||||||
|
"glob-parent": "^5.1.0",
|
||||||
|
"merge2": "^1.3.0",
|
||||||
|
"micromatch": "^4.0.2",
|
||||||
|
"picomatch": "^2.2.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"braces": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
||||||
|
"requires": {
|
||||||
|
"fill-range": "^7.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"fill-range": {
|
||||||
|
"version": "7.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||||
|
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
||||||
|
"requires": {
|
||||||
|
"to-regex-range": "^5.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"glob-parent": {
|
||||||
|
"version": "5.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
|
||||||
|
"integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
|
||||||
|
"requires": {
|
||||||
|
"is-glob": "^4.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"is-number": {
|
||||||
|
"version": "7.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
||||||
|
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="
|
||||||
|
},
|
||||||
|
"micromatch": {
|
||||||
|
"version": "4.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz",
|
||||||
|
"integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==",
|
||||||
|
"requires": {
|
||||||
|
"braces": "^3.0.1",
|
||||||
|
"picomatch": "^2.0.5"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"to-regex-range": {
|
||||||
|
"version": "5.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||||
|
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
||||||
|
"requires": {
|
||||||
|
"is-number": "^7.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"fast-levenshtein": {
|
"fast-levenshtein": {
|
||||||
"version": "2.0.6",
|
"version": "2.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
|
||||||
"integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=",
|
"integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"fastq": {
|
||||||
|
"version": "1.9.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.9.0.tgz",
|
||||||
|
"integrity": "sha512-i7FVWL8HhVY+CTkwFxkN2mk3h+787ixS5S63eb78diVRc1MCssarHq3W5cj0av7YDSwmaV928RNag+U1etRQ7w==",
|
||||||
|
"requires": {
|
||||||
|
"reusify": "^1.0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
"figures": {
|
"figures": {
|
||||||
"version": "1.7.0",
|
"version": "1.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz",
|
||||||
|
@ -11252,6 +11403,26 @@
|
||||||
"integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==",
|
"integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"globby": {
|
||||||
|
"version": "11.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz",
|
||||||
|
"integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==",
|
||||||
|
"requires": {
|
||||||
|
"array-union": "^2.1.0",
|
||||||
|
"dir-glob": "^3.0.1",
|
||||||
|
"fast-glob": "^3.1.1",
|
||||||
|
"ignore": "^5.1.4",
|
||||||
|
"merge2": "^1.3.0",
|
||||||
|
"slash": "^3.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"ignore": {
|
||||||
|
"version": "5.1.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz",
|
||||||
|
"integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"glogg": {
|
"glogg": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz",
|
||||||
|
@ -11264,8 +11435,7 @@
|
||||||
"graceful-fs": {
|
"graceful-fs": {
|
||||||
"version": "4.2.4",
|
"version": "4.2.4",
|
||||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz",
|
||||||
"integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==",
|
"integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"growly": {
|
"growly": {
|
||||||
"version": "1.3.0",
|
"version": "1.3.0",
|
||||||
|
@ -11638,6 +11808,11 @@
|
||||||
"integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
|
"integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"indent-string": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg=="
|
||||||
|
},
|
||||||
"inflight": {
|
"inflight": {
|
||||||
"version": "1.0.6",
|
"version": "1.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||||
|
@ -11828,8 +12003,7 @@
|
||||||
"is-extglob": {
|
"is-extglob": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
||||||
"integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
|
"integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"is-fullwidth-code-point": {
|
"is-fullwidth-code-point": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
@ -11844,7 +12018,6 @@
|
||||||
"version": "4.0.1",
|
"version": "4.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
|
||||||
"integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
|
"integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"is-extglob": "^2.1.1"
|
"is-extglob": "^2.1.1"
|
||||||
}
|
}
|
||||||
|
@ -11900,6 +12073,16 @@
|
||||||
"integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=",
|
"integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"is-path-cwd": {
|
||||||
|
"version": "2.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz",
|
||||||
|
"integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ=="
|
||||||
|
},
|
||||||
|
"is-path-inside": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz",
|
||||||
|
"integrity": "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg=="
|
||||||
|
},
|
||||||
"is-plain-object": {
|
"is-plain-object": {
|
||||||
"version": "2.0.4",
|
"version": "2.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
|
||||||
|
@ -12407,6 +12590,11 @@
|
||||||
"integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=",
|
"integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"merge2": {
|
||||||
|
"version": "1.4.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
|
||||||
|
"integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="
|
||||||
|
},
|
||||||
"micromatch": {
|
"micromatch": {
|
||||||
"version": "3.1.10",
|
"version": "3.1.10",
|
||||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
|
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
|
||||||
|
@ -12757,6 +12945,14 @@
|
||||||
"lcid": "^1.0.0"
|
"lcid": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"p-map": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==",
|
||||||
|
"requires": {
|
||||||
|
"aggregate-error": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"pako": {
|
"pako": {
|
||||||
"version": "1.0.11",
|
"version": "1.0.11",
|
||||||
"resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
|
"resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
|
||||||
|
@ -12859,6 +13055,11 @@
|
||||||
"pinkie-promise": "^2.0.0"
|
"pinkie-promise": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"picomatch": {
|
||||||
|
"version": "2.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
|
||||||
|
"integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg=="
|
||||||
|
},
|
||||||
"pify": {
|
"pify": {
|
||||||
"version": "2.3.0",
|
"version": "2.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
||||||
|
@ -13274,6 +13475,11 @@
|
||||||
"integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==",
|
"integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"reusify": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
|
||||||
|
"integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw=="
|
||||||
|
},
|
||||||
"rimraf": {
|
"rimraf": {
|
||||||
"version": "2.6.2",
|
"version": "2.6.2",
|
||||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
|
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
|
||||||
|
@ -13317,6 +13523,11 @@
|
||||||
"once": "^1.3.0"
|
"once": "^1.3.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"run-parallel": {
|
||||||
|
"version": "1.1.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.10.tgz",
|
||||||
|
"integrity": "sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw=="
|
||||||
|
},
|
||||||
"rx-lite": {
|
"rx-lite": {
|
||||||
"version": "3.1.2",
|
"version": "3.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz",
|
||||||
|
@ -13394,6 +13605,11 @@
|
||||||
"integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==",
|
"integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"slash": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q=="
|
||||||
|
},
|
||||||
"slice-ansi": {
|
"slice-ansi": {
|
||||||
"version": "0.0.4",
|
"version": "0.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz",
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
"bootstrap": "^4.5.3",
|
"bootstrap": "^4.5.3",
|
||||||
"cookieconsent": "^3.1.1",
|
"cookieconsent": "^3.1.1",
|
||||||
"datejs": "0.0.2",
|
"datejs": "0.0.2",
|
||||||
|
"del": "^6.0.0",
|
||||||
"fullcalendar": "^3.10.2",
|
"fullcalendar": "^3.10.2",
|
||||||
"jquery": "^3.5.1",
|
"jquery": "^3.5.1",
|
||||||
"jquery-ui": "^1.12.0",
|
"jquery-ui": "^1.12.0",
|
||||||
|
|
18
swagger.yml
18
swagger.yml
|
@ -798,15 +798,15 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/Setting'
|
$ref: '#/definitions/Setting'
|
||||||
'/settings/{settingId}':
|
'/settings/{settingName}':
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- settings
|
- settings
|
||||||
summary: Get single setting
|
summary: Get single setting
|
||||||
parameters:
|
parameters:
|
||||||
- name: settingId
|
- name: settingName
|
||||||
in: path
|
in: path
|
||||||
type: integer
|
type: string
|
||||||
required: true
|
required: true
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
|
@ -818,7 +818,7 @@ paths:
|
||||||
- settings
|
- settings
|
||||||
summary: Update single setting
|
summary: Update single setting
|
||||||
parameters:
|
parameters:
|
||||||
- name: settingId
|
- name: settingName
|
||||||
in: path
|
in: path
|
||||||
type: integer
|
type: integer
|
||||||
required: true
|
required: true
|
||||||
|
@ -836,7 +836,7 @@ paths:
|
||||||
- settings
|
- settings
|
||||||
summary: Delete single setting
|
summary: Delete single setting
|
||||||
parameters:
|
parameters:
|
||||||
- name: settingId
|
- name: settingName
|
||||||
in: path
|
in: path
|
||||||
type: integer
|
type: integer
|
||||||
required: true
|
required: true
|
||||||
|
@ -977,6 +977,8 @@ definitions:
|
||||||
type: string
|
type: string
|
||||||
notes:
|
notes:
|
||||||
type: string
|
type: string
|
||||||
|
timezone:
|
||||||
|
type: string
|
||||||
settings:
|
settings:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
@ -1012,6 +1014,8 @@ definitions:
|
||||||
type: string
|
type: string
|
||||||
notes:
|
notes:
|
||||||
type: string
|
type: string
|
||||||
|
timezone:
|
||||||
|
type: string
|
||||||
services:
|
services:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
|
@ -1026,7 +1030,7 @@ definitions:
|
||||||
notifications:
|
notifications:
|
||||||
type: boolean
|
type: boolean
|
||||||
calendarView:
|
calendarView:
|
||||||
type: boolean
|
type: string
|
||||||
googleSync:
|
googleSync:
|
||||||
type: boolean
|
type: boolean
|
||||||
googleCalendar:
|
googleCalendar:
|
||||||
|
@ -1063,6 +1067,8 @@ definitions:
|
||||||
type: string
|
type: string
|
||||||
notes:
|
notes:
|
||||||
type: string
|
type: string
|
||||||
|
timezone:
|
||||||
|
type: string
|
||||||
providers:
|
providers:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
|
|
Loading…
Reference in a new issue