diff --git a/.prettierrc.json b/.prettierrc.json
index 742418e5..1356b56e 100644
--- a/.prettierrc.json
+++ b/.prettierrc.json
@@ -5,8 +5,8 @@
"bracketSpacing": false,
"bracketSameLine": false,
"quoteProps": "preserve",
- "trailingComma": "none",
- "trailingCommaPHP": false,
+ "trailingComma": "all",
+ "trailingCommaPHP": true,
"phpVersion": "8.0",
"plugins": ["@prettier/plugin-php"]
}
diff --git a/application/config/config.php b/application/config/config.php
index 454c62e5..064e4288 100644
--- a/application/config/config.php
+++ b/application/config/config.php
@@ -17,7 +17,7 @@
$protocol =
(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') ||
- (isset($_SERVER['SERVER_PORT']) && (int) $_SERVER['SERVER_PORT'] === 443) ||
+ (isset($_SERVER['SERVER_PORT']) && (int)$_SERVER['SERVER_PORT'] === 443) ||
(isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')
? 'https://'
: 'http://';
@@ -26,7 +26,8 @@ $domain = $_SERVER['HTTP_HOST'] ?? 'localhost';
$request_uri = dirname($_SERVER['SCRIPT_NAME']);
-if ($request_uri === '.') {
+if ($request_uri === '.')
+{
$request_uri = '';
}
@@ -195,7 +196,7 @@ $config['charset'] = 'UTF-8';
| setting this variable to TRUE (boolean). See the user guide for details.
|
*/
-$config['enable_hooks'] = true;
+$config['enable_hooks'] = TRUE;
/*
|--------------------------------------------------------------------------
@@ -255,8 +256,8 @@ $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
| use segment based URLs.
|
*/
-$config['allow_get_array'] = true;
-$config['enable_query_strings'] = false;
+$config['allow_get_array'] = TRUE;
+$config['enable_query_strings'] = FALSE;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';
$config['directory_trigger'] = 'd'; // experimental not currently in use
@@ -349,9 +350,9 @@ $config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ea_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = __DIR__ . '/../../storage/sessions';
-$config['sess_match_ip'] = false;
+$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
-$config['sess_regenerate_destroy'] = false;
+$config['sess_regenerate_destroy'] = FALSE;
/*
|--------------------------------------------------------------------------
@@ -367,7 +368,7 @@ $config['sess_regenerate_destroy'] = false;
$config['cookie_prefix'] = '';
$config['cookie_domain'] = '';
$config['cookie_path'] = '/';
-$config['cookie_secure'] = strpos($config['base_url'], 'https') !== false;
+$config['cookie_secure'] = strpos($config['base_url'], 'https') !== FALSE;
/*
|--------------------------------------------------------------------------
@@ -381,7 +382,7 @@ $config['cookie_secure'] = strpos($config['base_url'], 'https') !== false;
| 'csrf_cookie_name' = The cookie name
| 'csrf_expire' = The number in seconds the token should expire.
*/
-$config['csrf_protection'] = true;
+$config['csrf_protection'] = TRUE;
$config['csrf_token_name'] = 'csrf_token';
$config['csrf_cookie_name'] = 'csrf_cookie';
$config['csrf_expire'] = 7200;
@@ -404,7 +405,7 @@ $config['csrf_exclude_uris'] = ['api/v1/.*', 'booking/.*', 'booking_cancellation
| by the output class. Do not 'echo' any values with compression enabled.
|
*/
-$config['compress_output'] = false;
+$config['compress_output'] = FALSE;
/*
|--------------------------------------------------------------------------
@@ -429,7 +430,7 @@ $config['time_reference'] = 'local';
| in your view files. Options are TRUE or FALSE (boolean)
|
*/
-$config['rewrite_short_tags'] = false;
+$config['rewrite_short_tags'] = FALSE;
/*
|--------------------------------------------------------------------------
@@ -453,7 +454,7 @@ $config['proxy_ips'] = '';
| will control the number of requests a client can sent to the app.
|
*/
-$config['rate_limiting'] = true;
+$config['rate_limiting'] = TRUE;
/* End of file config.php */
/* Location: ./application/config/config.php */
diff --git a/application/config/database.php b/application/config/database.php
index f77fa1fc..6cf6b0a6 100644
--- a/application/config/database.php
+++ b/application/config/database.php
@@ -47,7 +47,7 @@
*/
$active_group = 'default';
-$query_builder = true;
+$query_builder = TRUE;
$db['default']['hostname'] = Config::DB_HOST;
$db['default']['username'] = Config::DB_USERNAME;
@@ -55,15 +55,15 @@ $db['default']['password'] = Config::DB_PASSWORD;
$db['default']['database'] = Config::DB_NAME;
$db['default']['dbdriver'] = 'mysqli';
$db['default']['dbprefix'] = 'ea_';
-$db['default']['pconnect'] = true;
-$db['default']['db_debug'] = true;
-$db['default']['cache_on'] = false;
+$db['default']['pconnect'] = TRUE;
+$db['default']['db_debug'] = TRUE;
+$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8mb4';
$db['default']['dbcollat'] = 'utf8mb4_unicode_ci';
$db['default']['swap_pre'] = '';
-$db['default']['autoinit'] = true;
-$db['default']['stricton'] = false;
+$db['default']['autoinit'] = TRUE;
+$db['default']['stricton'] = FALSE;
/* End of file database.php */
/* Location: ./application/config/database.php */
diff --git a/application/config/migration.php b/application/config/migration.php
index b1107828..3df89b21 100755
--- a/application/config/migration.php
+++ b/application/config/migration.php
@@ -9,7 +9,7 @@
| whenever you intend to do a schema migration.
|
*/
-$config['migration_enabled'] = true;
+$config['migration_enabled'] = TRUE;
/*
|--------------------------------------------------------------------------
diff --git a/application/config/mimes.php b/application/config/mimes.php
index 7f6bccd3..411bb53c 100644
--- a/application/config/mimes.php
+++ b/application/config/mimes.php
@@ -14,7 +14,7 @@ return [
'application/mac-binhex40',
'application/mac-binhex',
'application/x-binhex40',
- 'application/x-mac-binhex40'
+ 'application/x-mac-binhex40',
],
'cpt' => 'application/mac-compactpro',
'csv' => [
@@ -28,14 +28,14 @@ return [
'application/csv',
'application/excel',
'application/vnd.msexcel',
- 'text/plain'
+ 'text/plain',
],
'bin' => [
'application/macbinary',
'application/mac-binary',
'application/octet-stream',
'application/x-binary',
- 'application/x-macbinary'
+ 'application/x-macbinary',
],
'dms' => 'application/octet-stream',
'lha' => 'application/octet-stream',
@@ -66,18 +66,18 @@ return [
'application/excel',
'application/download',
'application/vnd.ms-office',
- 'application/msword'
+ 'application/msword',
],
'ppt' => [
'application/powerpoint',
'application/vnd.ms-powerpoint',
'application/vnd.ms-office',
- 'application/msword'
+ 'application/msword',
],
'pptx' => [
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
'application/x-zip',
- 'application/zip'
+ 'application/zip',
],
'wbxml' => 'application/wbxml',
'wmlc' => 'application/wmlc',
@@ -94,7 +94,7 @@ return [
'application/x-php',
'text/php',
'text/x-php',
- 'application/x-httpd-php-source'
+ 'application/x-httpd-php-source',
],
'php4' => 'application/x-httpd-php',
'php3' => 'application/x-httpd-php',
@@ -113,7 +113,7 @@ return [
'application/zip',
'application/x-zip-compressed',
'application/s-compressed',
- 'multipart/x-zip'
+ 'multipart/x-zip',
],
'rar' => ['application/x-rar', 'application/rar', 'application/x-rar-compressed'],
'mid' => 'audio/midi',
@@ -141,7 +141,7 @@ return [
'image/x-ms-bmp',
'application/bmp',
'application/x-bmp',
- 'application/x-win-bitmap'
+ 'application/x-win-bitmap',
],
'gif' => 'image/gif',
'jpeg' => ['image/jpeg', 'image/pjpeg'],
@@ -181,20 +181,20 @@ return [
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/zip',
'application/msword',
- 'application/x-zip'
+ 'application/x-zip',
],
'dot' => ['application/msword', 'application/vnd.ms-office'],
'dotx' => [
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/zip',
- 'application/msword'
+ 'application/msword',
],
'xlsx' => [
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'application/zip',
'application/vnd.ms-excel',
'application/msword',
- 'application/x-zip'
+ 'application/x-zip',
],
'word' => ['application/msword', 'application/octet-stream'],
'xl' => 'application/excel',
@@ -245,14 +245,14 @@ return [
'application/x-compressed',
'application/x-zip-compressed',
'application/zip',
- 'multipart/x-zip'
+ 'multipart/x-zip',
],
'7zip' => [
'application/x-7z-compressed',
'application/x-compressed',
'application/x-zip-compressed',
'application/zip',
- 'multipart/x-zip'
+ 'multipart/x-zip',
],
'cdr' => [
'application/cdr',
@@ -261,14 +261,14 @@ return [
'application/x-coreldraw',
'image/cdr',
'image/x-cdr',
- 'zz-application/zz-winassoc-cdr'
+ 'zz-application/zz-winassoc-cdr',
],
'wma' => ['audio/x-ms-wma', 'video/x-ms-asf'],
'jar' => [
'application/java-archive',
'application/x-java-application',
'application/x-jar',
- 'application/x-compressed'
+ 'application/x-compressed',
],
'svg' => ['image/svg+xml', 'application/xml', 'text/xml'],
'vcf' => 'text/x-vcard',
@@ -290,5 +290,5 @@ return [
'odt' => 'application/vnd.oasis.opendocument.text',
'odm' => 'application/vnd.oasis.opendocument.text-master',
'ott' => 'application/vnd.oasis.opendocument.text-template',
- 'oth' => 'application/vnd.oasis.opendocument.text-web'
+ 'oth' => 'application/vnd.oasis.opendocument.text-web',
];
diff --git a/application/config/routes.php b/application/config/routes.php
index 0ee2d88e..d52a18ee 100644
--- a/application/config/routes.php
+++ b/application/config/routes.php
@@ -55,7 +55,7 @@ $route['default_controller'] = 'booking';
$route['404_override'] = '';
-$route['translate_uri_dashes'] = false;
+$route['translate_uri_dashes'] = FALSE;
/*
| -------------------------------------------------------------------------
@@ -86,16 +86,19 @@ header('Access-Control-Allow-Origin: ' . ($_SERVER['HTTP_ORIGIN'] ?? '*')); // N
header('Access-Control-Allow-Credentials: "true"');
-if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD'])) {
+if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD']))
+{
// May also be using PUT, PATCH, HEAD etc
header('Access-Control-Allow-Methods: GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD');
}
-if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS'])) {
+if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']))
+{
header('Access-Control-Allow-Headers: ' . $_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']);
}
-if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
+if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'OPTIONS')
+{
exit(0);
}
diff --git a/application/config/testing/routes.php b/application/config/testing/routes.php
index a5d538fe..090173cb 100644
--- a/application/config/testing/routes.php
+++ b/application/config/testing/routes.php
@@ -13,7 +13,7 @@
$route['default_controller'] = 'test/index';
$route['404_override'] = 'test/index'; // when in doubt, use the hammer
-$route['translate_uri_dashes'] = false;
+$route['translate_uri_dashes'] = FALSE;
/* End of file routes.php */
/* Location: ./application/config/testing/routes.php */
diff --git a/application/controllers/About.php b/application/controllers/About.php
index 2cb21c7d..e6580b6c 100644
--- a/application/controllers/About.php
+++ b/application/controllers/About.php
@@ -64,14 +64,14 @@ class About extends EA_Controller
script_vars([
'user_id' => $user_id,
- 'role_slug' => $role_slug
+ 'role_slug' => $role_slug,
]);
html_vars([
'page_title' => lang('settings'),
'active_menu' => PRIV_SYSTEM_SETTINGS,
'user_display_name' => $this->accounts->get_user_display_name($user_id),
- 'privileges' => $this->roles_model->get_permissions_by_slug($role_slug)
+ 'privileges' => $this->roles_model->get_permissions_by_slug($role_slug),
]);
$this->load->view('pages/about');
diff --git a/application/controllers/Account.php b/application/controllers/Account.php
index 3547cced..a69a9656 100644
--- a/application/controllers/Account.php
+++ b/application/controllers/Account.php
@@ -63,14 +63,14 @@ class Account extends EA_Controller
$account = $this->users_model->find($user_id);
script_vars([
- 'account' => $account
+ 'account' => $account,
]);
html_vars([
'page_title' => lang('settings'),
'active_menu' => PRIV_SYSTEM_SETTINGS,
'user_display_name' => $this->accounts->get_user_display_name($user_id),
- 'grouped_timezones' => $this->timezones->to_grouped_array()
+ 'grouped_timezones' => $this->timezones->to_grouped_array(),
]);
$this->load->view('pages/account');
@@ -104,7 +104,7 @@ class Account extends EA_Controller
'notes',
'timezone',
'language',
- 'settings'
+ 'settings',
]);
$this->users_model->only($account['settings'], ['username', 'password', 'notifications', 'calendar_view']);
@@ -119,7 +119,7 @@ class Account extends EA_Controller
'user_email' => $account['email'],
'username' => $account['settings']['username'],
'timezone' => $account['timezone'],
- 'language' => $account['language']
+ 'language' => $account['language'],
]);
response();
@@ -141,7 +141,7 @@ class Account extends EA_Controller
$is_valid = $this->users_model->validate_username($username, $user_id);
json_response([
- 'is_valid' => $is_valid
+ 'is_valid' => $is_valid,
]);
} catch (Throwable $e) {
json_exception($e);
diff --git a/application/controllers/Admins.php b/application/controllers/Admins.php
index 1fee46a8..f5f20998 100644
--- a/application/controllers/Admins.php
+++ b/application/controllers/Admins.php
@@ -63,7 +63,7 @@ class Admins extends EA_Controller
'user_id' => $user_id,
'role_slug' => $role_slug,
'timezones' => $this->timezones->to_array(),
- 'min_password_length' => MIN_PASSWORD_LENGTH
+ 'min_password_length' => MIN_PASSWORD_LENGTH,
]);
html_vars([
@@ -71,7 +71,7 @@ class Admins extends EA_Controller
'active_menu' => PRIV_USERS,
'user_display_name' => $this->accounts->get_user_display_name($user_id),
'grouped_timezones' => $this->timezones->to_grouped_array(),
- 'privileges' => $this->roles_model->get_permissions_by_slug($role_slug)
+ 'privileges' => $this->roles_model->get_permissions_by_slug($role_slug),
]);
$this->load->view('pages/admins');
@@ -128,7 +128,7 @@ class Admins extends EA_Controller
'notes',
'timezone',
'language',
- 'settings'
+ 'settings',
]);
$this->admins_model->only($admin['settings'], ['username', 'password', 'notifications', 'calendar_view']);
@@ -141,7 +141,7 @@ class Admins extends EA_Controller
json_response([
'success' => true,
- 'id' => $admin_id
+ 'id' => $admin_id,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -194,7 +194,7 @@ class Admins extends EA_Controller
'notes',
'timezone',
'language',
- 'settings'
+ 'settings',
]);
$this->admins_model->only($admin['settings'], ['username', 'password', 'notifications', 'calendar_view']);
@@ -207,7 +207,7 @@ class Admins extends EA_Controller
json_response([
'success' => true,
- 'id' => $admin_id
+ 'id' => $admin_id,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -233,7 +233,7 @@ class Admins extends EA_Controller
$this->webhooks_client->trigger(WEBHOOK_ADMIN_DELETE, $admin);
json_response([
- 'success' => true
+ 'success' => true,
]);
} catch (Throwable $e) {
json_exception($e);
diff --git a/application/controllers/Api_settings.php b/application/controllers/Api_settings.php
index 910cd41e..77b05adf 100644
--- a/application/controllers/Api_settings.php
+++ b/application/controllers/Api_settings.php
@@ -56,13 +56,13 @@ class Api_settings extends EA_Controller
script_vars([
'user_id' => $user_id,
'role_slug' => $role_slug,
- 'api_settings' => $this->settings_model->get('name like "api_%"')
+ 'api_settings' => $this->settings_model->get('name like "api_%"'),
]);
html_vars([
'page_title' => lang('api'),
'active_menu' => PRIV_SYSTEM_SETTINGS,
- 'user_display_name' => $this->accounts->get_user_display_name($user_id)
+ 'user_display_name' => $this->accounts->get_user_display_name($user_id),
]);
$this->load->view('pages/api_settings');
diff --git a/application/controllers/Appointments.php b/application/controllers/Appointments.php
index e07fb824..fc566197 100644
--- a/application/controllers/Appointments.php
+++ b/application/controllers/Appointments.php
@@ -97,7 +97,7 @@ class Appointments extends EA_Controller
'is_unavailability',
'id_users_provider',
'id_users_customer',
- 'id_services'
+ 'id_services',
]);
$appointment_id = $this->appointments_model->save($appointment);
@@ -108,7 +108,7 @@ class Appointments extends EA_Controller
json_response([
'success' => true,
- 'id' => $appointment_id
+ 'id' => $appointment_id,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -157,14 +157,14 @@ class Appointments extends EA_Controller
'is_unavailability',
'id_users_provider',
'id_users_customer',
- 'id_services'
+ 'id_services',
]);
$appointment_id = $this->appointments_model->save($appointment);
json_response([
'success' => true,
- 'id' => $appointment_id
+ 'id' => $appointment_id,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -190,7 +190,7 @@ class Appointments extends EA_Controller
$this->webhooks_client->trigger(WEBHOOK_APPOINTMENT_DELETE, $appointment);
json_response([
- 'success' => true
+ 'success' => true,
]);
} catch (Throwable $e) {
json_exception($e);
diff --git a/application/controllers/Blocked_periods.php b/application/controllers/Blocked_periods.php
index 41829553..3a8ca58c 100644
--- a/application/controllers/Blocked_periods.php
+++ b/application/controllers/Blocked_periods.php
@@ -64,7 +64,7 @@ class Blocked_periods extends EA_Controller
'role_slug' => $role_slug,
'date_format' => setting('date_format'),
'time_format' => setting('time_format'),
- 'first_weekday' => setting('first_weekday')
+ 'first_weekday' => setting('first_weekday'),
]);
html_vars([
@@ -72,7 +72,7 @@ class Blocked_periods extends EA_Controller
'active_menu' => PRIV_BLOCKED_PERIODS,
'user_display_name' => $this->accounts->get_user_display_name($user_id),
'timezones' => $this->timezones->to_array(),
- 'privileges' => $this->roles_model->get_permissions_by_slug($role_slug)
+ 'privileges' => $this->roles_model->get_permissions_by_slug($role_slug),
]);
$this->load->view('pages/blocked_periods');
@@ -126,7 +126,7 @@ class Blocked_periods extends EA_Controller
json_response([
'success' => true,
- 'id' => $blocked_period_id
+ 'id' => $blocked_period_id,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -170,7 +170,7 @@ class Blocked_periods extends EA_Controller
'name',
'start_datetime',
'end_datetime',
- 'notes'
+ 'notes',
]);
$blocked_period_id = $this->blocked_periods_model->save($blocked_period);
@@ -181,7 +181,7 @@ class Blocked_periods extends EA_Controller
json_response([
'success' => true,
- 'id' => $blocked_period_id
+ 'id' => $blocked_period_id,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -207,7 +207,7 @@ class Blocked_periods extends EA_Controller
$this->webhooks_client->trigger(WEBHOOK_BLOCKED_PERIOD_DELETE, $blocked_period);
json_response([
- 'success' => true
+ 'success' => true,
]);
} catch (Throwable $e) {
json_exception($e);
diff --git a/application/controllers/Booking.php b/application/controllers/Booking.php
index 3ec007bc..426ee021 100755
--- a/application/controllers/Booking.php
+++ b/application/controllers/Booking.php
@@ -91,7 +91,7 @@ class Booking extends EA_Controller
'message_text' => $disable_booking_message,
'message_icon' => base_url('assets/img/error.png'),
'google_analytics_code' => $google_analytics_code,
- 'matomo_analytics_url' => $matomo_analytics_url
+ 'matomo_analytics_url' => $matomo_analytics_url,
]);
$this->load->view('pages/booking_message');
@@ -110,7 +110,7 @@ class Booking extends EA_Controller
'first_name',
'last_name',
'services',
- 'timezone'
+ 'timezone',
]);
}
@@ -169,7 +169,7 @@ class Booking extends EA_Controller
'message_text' => lang('appointment_does_not_exist_in_db'),
'message_icon' => base_url('assets/img/error.png'),
'google_analytics_code' => $google_analytics_code,
- 'matomo_analytics_url' => $matomo_analytics_url
+ 'matomo_analytics_url' => $matomo_analytics_url,
]);
$this->load->view('pages/booking_message');
@@ -193,11 +193,11 @@ class Booking extends EA_Controller
'page_title' => lang('page_title') . ' ' . $company_name,
'message_title' => lang('appointment_locked'),
'message_text' => strtr(lang('appointment_locked_message'), [
- '{$limit}' => sprintf('%02d:%02d', $hours, $minutes)
+ '{$limit}' => sprintf('%02d:%02d', $hours, $minutes),
]),
'message_icon' => base_url('assets/img/error.png'),
'google_analytics_code' => $google_analytics_code,
- 'matomo_analytics_url' => $matomo_analytics_url
+ 'matomo_analytics_url' => $matomo_analytics_url,
]);
$this->load->view('pages/booking_message');
@@ -232,7 +232,7 @@ class Booking extends EA_Controller
'future_booking_limit' => setting('future_booking_limit'),
'appointment_data' => $appointment,
'provider_data' => $provider,
- 'customer_data' => $customer
+ 'customer_data' => $customer,
]);
html_vars([
@@ -278,7 +278,7 @@ class Booking extends EA_Controller
'customer_token' => $customer_token,
'appointment_data' => $appointment,
'provider_data' => $provider,
- 'customer_data' => $customer
+ 'customer_data' => $customer,
]);
$this->load->view('pages/booking');
@@ -335,7 +335,7 @@ class Booking extends EA_Controller
if ($require_captcha && strtoupper($captcha_phrase) !== strtoupper($captcha)) {
json_response([
- 'captcha_verification' => false
+ 'captcha_verification' => false,
]);
return;
@@ -347,7 +347,7 @@ class Booking extends EA_Controller
$existing_appointments = $this->appointments_model->get([
'id_users_customer' => $customer['id'],
'start_datetime <=' => $appointment['start_datetime'],
- 'end_datetime >=' => $appointment['end_datetime']
+ 'end_datetime >=' => $appointment['end_datetime'],
]);
if (count($existing_appointments)) {
@@ -370,7 +370,7 @@ class Booking extends EA_Controller
'first_name' => $customer['first_name'] ?? '-',
'last_name' => $customer['last_name'] ?? '-',
'email' => $customer['email'] ?? '-',
- 'ip' => $customer_ip
+ 'ip' => $customer_ip,
];
if (setting('display_terms_and_conditions')) {
@@ -399,7 +399,7 @@ class Booking extends EA_Controller
'state',
'zip_code',
'timezone',
- 'language'
+ 'language',
]);
$customer_id = $this->customers_model->save($customer);
@@ -424,7 +424,7 @@ class Booking extends EA_Controller
'is_unavailability',
'id_users_provider',
'id_users_customer',
- 'id_services'
+ 'id_services',
]);
$appointment_id = $this->appointments_model->save($appointment);
@@ -435,7 +435,7 @@ class Booking extends EA_Controller
'company_link' => setting('company_link'),
'company_email' => setting('company_email'),
'date_format' => setting('date_format'),
- 'time_format' => setting('time_format')
+ 'time_format' => setting('time_format'),
];
$this->synchronization->sync_appointment_saved($appointment, $service, $provider, $customer, $settings);
@@ -446,14 +446,14 @@ class Booking extends EA_Controller
$provider,
$customer,
$settings,
- $manage_mode
+ $manage_mode,
);
$this->webhooks_client->trigger(WEBHOOK_APPOINTMENT_SAVE, $appointment);
$response = [
'appointment_id' => $appointment['id'],
- 'appointment_hash' => $appointment['hash']
+ 'appointment_hash' => $appointment['hash'],
];
json_response($response);
@@ -504,7 +504,7 @@ class Booking extends EA_Controller
$date,
$service,
$provider,
- $exclude_appointment_id
+ $exclude_appointment_id,
);
$is_still_available = false;
@@ -610,7 +610,7 @@ class Booking extends EA_Controller
$selected_date,
$service,
$provider,
- $exclude_appointment_id
+ $exclude_appointment_id,
);
$available_hours = array_merge($available_hours, $provider_available_hours);
@@ -628,7 +628,7 @@ class Booking extends EA_Controller
$selected_date,
$service,
$provider,
- $exclude_appointment_id
+ $exclude_appointment_id,
);
}
@@ -684,7 +684,7 @@ class Booking extends EA_Controller
$current_date->format('Y-m-d'),
$service,
$provider,
- $exclude_appointment_id
+ $exclude_appointment_id,
);
if (!empty($available_hours)) {
@@ -700,7 +700,7 @@ class Booking extends EA_Controller
if (count($unavailable_dates) === $number_of_days_in_month) {
json_response([
- 'is_month_unavailable' => true
+ 'is_month_unavailable' => true,
]);
return;
diff --git a/application/controllers/Booking_cancellation.php b/application/controllers/Booking_cancellation.php
index 40c8aabb..e92d0c85 100755
--- a/application/controllers/Booking_cancellation.php
+++ b/application/controllers/Booking_cancellation.php
@@ -65,7 +65,7 @@ class Booking_cancellation extends EA_Controller
'message_text' => lang('appointment_does_not_exist_in_db'),
'message_icon' => base_url('assets/img/error.png'),
'google_analytics_code' => setting('google_analytics_code'),
- 'matomo_analytics_url' => setting('matomo_analytics_url')
+ 'matomo_analytics_url' => setting('matomo_analytics_url'),
]);
$this->load->view('pages/booking_message');
@@ -86,7 +86,7 @@ class Booking_cancellation extends EA_Controller
'company_email' => setting('company_email'),
'company_link' => setting('company_link'),
'date_format' => setting('date_format'),
- 'time_format' => setting('time_format')
+ 'time_format' => setting('time_format'),
];
$this->appointments_model->delete($appointment['id']);
@@ -99,7 +99,7 @@ class Booking_cancellation extends EA_Controller
$provider,
$customer,
$settings,
- $cancellation_reason
+ $cancellation_reason,
);
$this->webhooks_client->trigger(WEBHOOK_APPOINTMENT_DELETE, $appointment);
@@ -111,7 +111,7 @@ class Booking_cancellation extends EA_Controller
'page_title' => lang('appointment_cancelled_title'),
'company_color' => setting('company_color'),
'google_analytics_code' => setting('google_analytics_code'),
- 'matomo_analytics_url' => setting('matomo_analytics_url')
+ 'matomo_analytics_url' => setting('matomo_analytics_url'),
]);
$this->load->view('pages/booking_cancellation');
diff --git a/application/controllers/Booking_confirmation.php b/application/controllers/Booking_confirmation.php
index 7f71b593..7e6fb689 100755
--- a/application/controllers/Booking_confirmation.php
+++ b/application/controllers/Booking_confirmation.php
@@ -61,7 +61,7 @@ class Booking_confirmation extends EA_Controller
'company_color' => setting('company_color'),
'google_analytics_code' => setting('google_analytics_code'),
'matomo_analytics_url' => setting('matomo_analytics_url'),
- 'add_to_google_url' => $add_to_google_url
+ 'add_to_google_url' => $add_to_google_url,
]);
$this->load->view('pages/booking_confirmation');
diff --git a/application/controllers/Booking_settings.php b/application/controllers/Booking_settings.php
index 5743a436..c3901cdb 100644
--- a/application/controllers/Booking_settings.php
+++ b/application/controllers/Booking_settings.php
@@ -65,13 +65,13 @@ class Booking_settings extends EA_Controller
script_vars([
'user_id' => $user_id,
'role_slug' => $role_slug,
- 'booking_settings' => $this->settings_model->get_batch()
+ 'booking_settings' => $this->settings_model->get_batch(),
]);
html_vars([
'page_title' => lang('settings'),
'active_menu' => PRIV_SYSTEM_SETTINGS,
- 'user_display_name' => $this->accounts->get_user_display_name($user_id)
+ 'user_display_name' => $this->accounts->get_user_display_name($user_id),
]);
$this->load->view('pages/booking_settings');
diff --git a/application/controllers/Business_settings.php b/application/controllers/Business_settings.php
index 5a60909a..55b0e45a 100644
--- a/application/controllers/Business_settings.php
+++ b/application/controllers/Business_settings.php
@@ -67,13 +67,13 @@ class Business_settings extends EA_Controller
'role_slug' => $role_slug,
'business_settings' => $this->settings_model->get(),
'first_weekday' => setting('first_weekday'),
- 'time_format' => setting('time_format')
+ 'time_format' => setting('time_format'),
]);
html_vars([
'page_title' => lang('settings'),
'active_menu' => PRIV_SYSTEM_SETTINGS,
- 'user_display_name' => $this->accounts->get_user_display_name($user_id)
+ 'user_display_name' => $this->accounts->get_user_display_name($user_id),
]);
$this->load->view('pages/business_settings');
diff --git a/application/controllers/Calendar.php b/application/controllers/Calendar.php
index f1adc59d..9f054ddf 100644
--- a/application/controllers/Calendar.php
+++ b/application/controllers/Calendar.php
@@ -112,7 +112,7 @@ class Calendar extends EA_Controller
$available_providers = array_values(
array_filter($available_providers, function ($available_provider) use ($user_id) {
return (int) $available_provider['id'] === (int) $user_id;
- })
+ }),
);
}
@@ -120,7 +120,7 @@ class Calendar extends EA_Controller
$available_providers = array_values(
array_filter($available_providers, function ($available_provider) use ($secretary_providers) {
return in_array($available_provider['id'], $secretary_providers);
- })
+ }),
);
}
@@ -144,7 +144,7 @@ class Calendar extends EA_Controller
'available_services' => $available_services,
'secretary_providers' => $secretary_providers,
'edit_appointment' => $edit_appointment,
- 'customers' => $this->customers_model->get(null, 50, null, 'update_datetime DESC')
+ 'customers' => $this->customers_model->get(null, 50, null, 'update_datetime DESC'),
]);
html_vars([
@@ -167,7 +167,7 @@ class Calendar extends EA_Controller
'require_address' => setting('require_address'),
'require_city' => setting('require_city'),
'require_zip_code' => setting('require_zip_code'),
- 'require_notes' => setting('require_notes')
+ 'require_notes' => setting('require_notes'),
]);
$this->load->view('pages/calendar');
@@ -208,7 +208,7 @@ class Calendar extends EA_Controller
'zip_code',
'timezone',
'language',
- 'notes'
+ 'notes',
]);
$customer['id'] = $this->customers_model->save($customer);
@@ -250,7 +250,7 @@ class Calendar extends EA_Controller
'is_unavailability',
'id_users_provider',
'id_users_customer',
- 'id_services'
+ 'id_services',
]);
$appointment['id'] = $this->appointments_model->save($appointment);
@@ -270,7 +270,7 @@ class Calendar extends EA_Controller
'company_link' => setting('company_link'),
'company_email' => setting('company_email'),
'date_format' => setting('date_format'),
- 'time_format' => setting('time_format')
+ 'time_format' => setting('time_format'),
];
$this->synchronization->sync_appointment_saved($appointment, $service, $provider, $customer, $settings);
@@ -281,13 +281,13 @@ class Calendar extends EA_Controller
$provider,
$customer,
$settings,
- $manage_mode
+ $manage_mode,
);
$this->webhooks_client->trigger(WEBHOOK_APPOINTMENT_SAVE, $appointment);
json_response([
- 'success' => true
+ 'success' => true,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -346,7 +346,7 @@ class Calendar extends EA_Controller
'company_email' => setting('company_email'),
'company_link' => setting('company_link'),
'date_format' => setting('date_format'),
- 'time_format' => setting('time_format')
+ 'time_format' => setting('time_format'),
];
// Delete appointment record from the database.
@@ -358,7 +358,7 @@ class Calendar extends EA_Controller
$provider,
$customer,
$settings,
- $cancellation_reason
+ $cancellation_reason,
);
$this->synchronization->sync_appointment_deleted($appointment, $provider);
@@ -366,7 +366,7 @@ class Calendar extends EA_Controller
$this->webhooks_client->trigger(WEBHOOK_APPOINTMENT_DELETE, $appointment);
json_response([
- 'success' => true
+ 'success' => true,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -406,7 +406,7 @@ class Calendar extends EA_Controller
json_response([
'success' => true,
- 'warnings' => $warnings ?? []
+ 'warnings' => $warnings ?? [],
]);
} catch (Throwable $e) {
json_exception($e);
@@ -438,7 +438,7 @@ class Calendar extends EA_Controller
$this->webhooks_client->trigger(WEBHOOK_UNAVAILABILITY_DELETE, $unavailability);
json_response([
- 'success' => true
+ 'success' => true,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -468,7 +468,7 @@ class Calendar extends EA_Controller
$this->providers_model->save_working_plan_exception($provider_id, $date, $working_plan_exception);
json_response([
- 'success' => true
+ 'success' => true,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -494,7 +494,7 @@ class Calendar extends EA_Controller
$this->providers_model->delete_working_plan_exception($provider_id, $date);
json_response([
- 'success' => true
+ 'success' => true,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -522,12 +522,12 @@ class Calendar extends EA_Controller
$response = [
'appointments' => $this->appointments_model->get([
'start_datetime >=' => $start_date,
- 'end_datetime <=' => $end_date
+ 'end_datetime <=' => $end_date,
]),
'unavailabilities' => $this->unavailabilities_model->get([
'start_datetime >=' => $start_date,
- 'end_datetime <=' => $end_date
- ])
+ 'end_datetime <=' => $end_date,
+ ]),
];
foreach ($response['appointments'] as &$appointment) {
@@ -613,7 +613,7 @@ class Calendar extends EA_Controller
if (!$filter_type && $record_id !== FILTER_TYPE_ALL) {
json_response([
'appointments' => [],
- 'unavailabilities' => []
+ 'unavailabilities' => [],
]);
return;
diff --git a/application/controllers/Consents.php b/application/controllers/Consents.php
index 990838b2..3104deb0 100644
--- a/application/controllers/Consents.php
+++ b/application/controllers/Consents.php
@@ -53,7 +53,7 @@ class Consents extends EA_Controller
// Do not create a new consent.
json_response([
- 'success' => true
+ 'success' => true,
]);
return;
@@ -64,7 +64,7 @@ class Consents extends EA_Controller
json_response([
'success' => true,
- 'id' => $consent['id']
+ 'id' => $consent['id'],
]);
} catch (Throwable $e) {
json_exception($e);
diff --git a/application/controllers/Console.php b/application/controllers/Console.php
index f4032379..a81ad3d0 100644
--- a/application/controllers/Console.php
+++ b/application/controllers/Console.php
@@ -58,7 +58,7 @@ class Console extends EA_Controller
$password = $this->instance->seed();
response(
- PHP_EOL . '⇾ Installation completed, login with "administrator" / "' . $password . '".' . PHP_EOL . PHP_EOL
+ PHP_EOL . '⇾ Installation completed, login with "administrator" / "' . $password . '".' . PHP_EOL . PHP_EOL,
);
}
@@ -173,7 +173,7 @@ class Console extends EA_Controller
'⇾ php index.php console backup',
'⇾ php index.php console sync',
'',
- ''
+ '',
];
response(implode(PHP_EOL, $help));
diff --git a/application/controllers/Customers.php b/application/controllers/Customers.php
index a8aabef0..b69294bb 100644
--- a/application/controllers/Customers.php
+++ b/application/controllers/Customers.php
@@ -86,7 +86,7 @@ class Customers extends EA_Controller
'date_format' => $date_format,
'time_format' => $time_format,
'timezones' => $this->timezones->to_array(),
- 'secretary_providers' => $secretary_providers
+ 'secretary_providers' => $secretary_providers,
]);
html_vars([
@@ -103,7 +103,7 @@ class Customers extends EA_Controller
'require_address' => $require_address,
'require_city' => $require_city,
'require_zip_code' => $require_zip_code,
- 'available_languages' => config('available_languages')
+ 'available_languages' => config('available_languages'),
]);
$this->load->view('pages/customers');
@@ -211,7 +211,7 @@ class Customers extends EA_Controller
'custom_field_2',
'custom_field_3',
'custom_field_4',
- 'custom_field_5'
+ 'custom_field_5',
]);
$customer_id = $this->customers_model->save($customer);
@@ -222,7 +222,7 @@ class Customers extends EA_Controller
json_response([
'success' => true,
- 'id' => $customer_id
+ 'id' => $customer_id,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -264,7 +264,7 @@ class Customers extends EA_Controller
'custom_field_2',
'custom_field_3',
'custom_field_4',
- 'custom_field_5'
+ 'custom_field_5',
]);
$customer_id = $this->customers_model->save($customer);
@@ -275,7 +275,7 @@ class Customers extends EA_Controller
json_response([
'success' => true,
- 'id' => $customer_id
+ 'id' => $customer_id,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -307,7 +307,7 @@ class Customers extends EA_Controller
$this->webhooks_client->trigger(WEBHOOK_CUSTOMER_DELETE, $customer);
json_response([
- 'success' => true
+ 'success' => true,
]);
} catch (Throwable $e) {
json_exception($e);
diff --git a/application/controllers/General_settings.php b/application/controllers/General_settings.php
index bc97101e..4b63c8dd 100644
--- a/application/controllers/General_settings.php
+++ b/application/controllers/General_settings.php
@@ -62,14 +62,14 @@ class General_settings extends EA_Controller
script_vars([
'user_id' => $user_id,
'role_slug' => $role_slug,
- 'general_settings' => $this->settings_model->get()
+ 'general_settings' => $this->settings_model->get(),
]);
html_vars([
'page_title' => lang('settings'),
'active_menu' => PRIV_SYSTEM_SETTINGS,
'user_display_name' => $this->accounts->get_user_display_name($user_id),
- 'available_themes' => $available_themes
+ 'available_themes' => $available_themes,
]);
$this->load->view('pages/general_settings');
diff --git a/application/controllers/Google.php b/application/controllers/Google.php
index 21bf796c..1380edfd 100644
--- a/application/controllers/Google.php
+++ b/application/controllers/Google.php
@@ -93,7 +93,7 @@ class Google extends EA_Controller
$where = [
'start_datetime >=' => date('Y-m-d H:i:s', $start),
'end_datetime <=' => date('Y-m-d H:i:s', $end),
- 'id_users_provider' => $provider['id']
+ 'id_users_provider' => $provider['id'],
];
$appointments = $CI->appointments_model->get($where);
@@ -105,7 +105,7 @@ class Google extends EA_Controller
$settings = [
'company_name' => setting('company_name'),
'company_link' => setting('company_link'),
- 'company_email' => setting('company_email')
+ 'company_email' => setting('company_email'),
];
$provider_timezone = new DateTimeZone($provider['timezone']);
@@ -129,7 +129,7 @@ class Google extends EA_Controller
$provider,
$service,
$customer,
- $settings
+ $settings,
);
$local_event['id_google_calendar'] = $google_event->getId();
@@ -152,11 +152,11 @@ class Google extends EA_Controller
$local_event_start = strtotime($local_event['start_datetime']);
$local_event_end = strtotime($local_event['end_datetime']);
$google_event_start = new DateTime(
- $google_event->getStart()->getDateTime() ?? $google_event->getEnd()->getDate()
+ $google_event->getStart()->getDateTime() ?? $google_event->getEnd()->getDate(),
);
$google_event_start->setTimezone($provider_timezone);
$google_event_end = new DateTime(
- $google_event->getEnd()->getDateTime() ?? $google_event->getEnd()->getDate()
+ $google_event->getEnd()->getDateTime() ?? $google_event->getEnd()->getDate(),
);
$google_event_end->setTimezone($provider_timezone);
@@ -223,7 +223,7 @@ class Google extends EA_Controller
}
$unavailability_results = $CI->unavailabilities_model->get([
- 'id_google_calendar' => $google_event->getId()
+ 'id_google_calendar' => $google_event->getId(),
]);
if (!empty($unavailability_results)) {
@@ -240,19 +240,19 @@ class Google extends EA_Controller
'id_users_provider' => $provider_id,
'id_google_calendar' => $google_event->getId(),
'id_users_customer' => null,
- 'id_services' => null
+ 'id_services' => null,
];
$CI->unavailabilities_model->save($local_event);
}
json_response([
- 'success' => true
+ 'success' => true,
]);
} catch (Throwable $e) {
log_message(
'error',
- 'Google - Sync completed with an error (provider ID "' . $provider_id . '"): ' . $e->getMessage()
+ 'Google - Sync completed with an error (provider ID "' . $provider_id . '"): ' . $e->getMessage(),
);
json_exception($e);
@@ -348,7 +348,7 @@ class Google extends EA_Controller
if (!$google_sync) {
json_response([
- 'success' => false
+ 'success' => false,
]);
return;
@@ -387,7 +387,7 @@ class Google extends EA_Controller
$this->providers_model->set_setting($provider_id, 'google_calendar', $calendar_id);
json_response([
- 'success' => true
+ 'success' => true,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -423,7 +423,7 @@ class Google extends EA_Controller
$this->appointments_model->clear_google_sync_ids($provider_id);
json_response([
- 'success' => true
+ 'success' => true,
]);
} catch (Throwable $e) {
json_exception($e);
diff --git a/application/controllers/Google_analytics_settings.php b/application/controllers/Google_analytics_settings.php
index 16230b31..18c49e6a 100644
--- a/application/controllers/Google_analytics_settings.php
+++ b/application/controllers/Google_analytics_settings.php
@@ -56,13 +56,13 @@ class Google_analytics_settings extends EA_Controller
script_vars([
'user_id' => $user_id,
'role_slug' => $role_slug,
- 'google_analytics_settings' => $this->settings_model->get('name like "google_analytics_%"')
+ 'google_analytics_settings' => $this->settings_model->get('name like "google_analytics_%"'),
]);
html_vars([
'page_title' => lang('google_analytics'),
'active_menu' => PRIV_SYSTEM_SETTINGS,
- 'user_display_name' => $this->accounts->get_user_display_name($user_id)
+ 'user_display_name' => $this->accounts->get_user_display_name($user_id),
]);
$this->load->view('pages/google_analytics_settings');
diff --git a/application/controllers/Installation.php b/application/controllers/Installation.php
index e1719b6c..64a1b513 100644
--- a/application/controllers/Installation.php
+++ b/application/controllers/Installation.php
@@ -47,7 +47,7 @@ class Installation extends EA_Controller
}
$this->load->view('pages/installation', [
- 'base_url' => config('base_url')
+ 'base_url' => config('base_url'),
]);
}
@@ -80,14 +80,14 @@ class Installation extends EA_Controller
'user_email' => $admin['email'],
'role_slug' => DB_SLUG_ADMIN,
'timezone' => $admin['timezone'],
- 'username' => $admin['settings']['username']
+ 'username' => $admin['settings']['username'],
]);
// Save company settings
setting([
'company_name' => $company['company_name'],
'company_email' => $company['company_email'],
- 'company_link' => $company['company_link']
+ 'company_link' => $company['company_link'],
]);
// Service
@@ -97,7 +97,7 @@ class Installation extends EA_Controller
'price' => '0',
'currency' => '',
'availabilities_type' => 'flexible',
- 'attendants_number' => '1'
+ 'attendants_number' => '1',
]);
// Provider
@@ -115,8 +115,8 @@ class Installation extends EA_Controller
'google_sync' => false,
'sync_past_days' => 30,
'sync_future_days' => 90,
- 'calendar_view' => CALENDAR_VIEW_DEFAULT
- ]
+ 'calendar_view' => CALENDAR_VIEW_DEFAULT,
+ ],
]);
// Customer
@@ -124,11 +124,11 @@ class Installation extends EA_Controller
'first_name' => 'James',
'last_name' => 'Doe',
'email' => 'james@example.org',
- 'phone_number' => '+1 (000) 000-0000'
+ 'phone_number' => '+1 (000) 000-0000',
]);
json_response([
- 'success' => true
+ 'success' => true,
]);
} catch (Throwable $e) {
json_exception($e);
diff --git a/application/controllers/Integrations.php b/application/controllers/Integrations.php
index 1b5d036c..ccc76a15 100644
--- a/application/controllers/Integrations.php
+++ b/application/controllers/Integrations.php
@@ -66,7 +66,7 @@ class Integrations extends EA_Controller
'page_title' => lang('integrations'),
'active_menu' => PRIV_SYSTEM_SETTINGS,
'user_display_name' => $this->accounts->get_user_display_name($user_id),
- 'privileges' => $this->roles_model->get_permissions_by_slug($role_slug)
+ 'privileges' => $this->roles_model->get_permissions_by_slug($role_slug),
]);
$this->load->view('pages/integrations');
diff --git a/application/controllers/Legal_settings.php b/application/controllers/Legal_settings.php
index 052ebca1..f327b09c 100644
--- a/application/controllers/Legal_settings.php
+++ b/application/controllers/Legal_settings.php
@@ -56,13 +56,13 @@ class Legal_settings extends EA_Controller
script_vars([
'user_id' => $user_id,
'role_slug' => $role_slug,
- 'legal_settings' => $this->settings_model->get()
+ 'legal_settings' => $this->settings_model->get(),
]);
html_vars([
'page_title' => lang('settings'),
'active_menu' => PRIV_SYSTEM_SETTINGS,
- 'user_display_name' => $this->accounts->get_user_display_name($user_id)
+ 'user_display_name' => $this->accounts->get_user_display_name($user_id),
]);
$this->load->view('pages/legal_settings');
diff --git a/application/controllers/Localization.php b/application/controllers/Localization.php
index 6cba363b..1cb6aa99 100644
--- a/application/controllers/Localization.php
+++ b/application/controllers/Localization.php
@@ -35,7 +35,7 @@ class Localization extends EA_Controller
if (!in_array($language, config('available_languages'))) {
throw new RuntimeException(
- 'Translations for the given language does not exist (' . request('language') . ').'
+ 'Translations for the given language does not exist (' . request('language') . ').',
);
}
@@ -46,7 +46,7 @@ class Localization extends EA_Controller
config(['language' => $language]);
json_response([
- 'success' => true
+ 'success' => true,
]);
} catch (Throwable $e) {
json_exception($e);
diff --git a/application/controllers/Login.php b/application/controllers/Login.php
index 6b5473ce..f7945144 100644
--- a/application/controllers/Login.php
+++ b/application/controllers/Login.php
@@ -31,7 +31,7 @@ class Login extends EA_Controller
$this->load->library('email_messages');
script_vars([
- 'dest_url' => session('dest_url', site_url('calendar'))
+ 'dest_url' => session('dest_url', site_url('calendar')),
]);
}
@@ -44,7 +44,7 @@ class Login extends EA_Controller
'page_title' => lang('login'),
'base_url' => config('base_url'),
'dest_url' => session('dest_url', site_url('calendar')),
- 'company_name' => setting('company_name')
+ 'company_name' => setting('company_name'),
]);
$this->load->view('pages/login');
@@ -79,7 +79,7 @@ class Login extends EA_Controller
session($user_data); // Save data in the session.
json_response([
- 'success' => true
+ 'success' => true,
]);
} catch (Throwable $e) {
json_exception($e);
diff --git a/application/controllers/Logout.php b/application/controllers/Logout.php
index 19b7378b..bab759b1 100644
--- a/application/controllers/Logout.php
+++ b/application/controllers/Logout.php
@@ -31,7 +31,7 @@ class Logout extends EA_Controller
html_vars([
'page_title' => lang('log_out'),
- 'company_name' => $company_name
+ 'company_name' => $company_name,
]);
$this->load->view('pages/logout');
diff --git a/application/controllers/Matomo_analytics_settings.php b/application/controllers/Matomo_analytics_settings.php
index 2b0fa20b..f77cf558 100644
--- a/application/controllers/Matomo_analytics_settings.php
+++ b/application/controllers/Matomo_analytics_settings.php
@@ -56,13 +56,13 @@ class Matomo_analytics_settings extends EA_Controller
script_vars([
'user_id' => $user_id,
'role_slug' => $role_slug,
- 'matomo_analytics_settings' => $this->settings_model->get('name like "matomo_analytics_%"')
+ 'matomo_analytics_settings' => $this->settings_model->get('name like "matomo_analytics_%"'),
]);
html_vars([
'page_title' => lang('matomo_analytics'),
'active_menu' => PRIV_SYSTEM_SETTINGS,
- 'user_display_name' => $this->accounts->get_user_display_name($user_id)
+ 'user_display_name' => $this->accounts->get_user_display_name($user_id),
]);
$this->load->view('pages/matomo_analytics_settings');
diff --git a/application/controllers/Privacy.php b/application/controllers/Privacy.php
index 6c8775ca..2e1b1be1 100644
--- a/application/controllers/Privacy.php
+++ b/application/controllers/Privacy.php
@@ -54,14 +54,14 @@ class Privacy extends EA_Controller
if (empty($customer_id)) {
throw new InvalidArgumentException(
- 'Customer ID does not exist, please reload the page ' . 'and try again.'
+ 'Customer ID does not exist, please reload the page ' . 'and try again.',
);
}
$this->customers_model->delete($customer_id);
json_response([
- 'success' => true
+ 'success' => true,
]);
} catch (Throwable $e) {
json_exception($e);
diff --git a/application/controllers/Providers.php b/application/controllers/Providers.php
index b800d137..75fdc350 100644
--- a/application/controllers/Providers.php
+++ b/application/controllers/Providers.php
@@ -75,7 +75,7 @@ class Providers extends EA_Controller
'first_weekday' => setting('first_weekday'),
'min_password_length' => MIN_PASSWORD_LENGTH,
'timezones' => $this->timezones->to_array(),
- 'services' => $services
+ 'services' => $services,
]);
html_vars([
@@ -84,7 +84,7 @@ class Providers extends EA_Controller
'user_display_name' => $this->accounts->get_user_display_name($user_id),
'grouped_timezones' => $this->timezones->to_grouped_array(),
'privileges' => $this->roles_model->get_permissions_by_slug($role_slug),
- 'services' => $this->services_model->get()
+ 'services' => $this->services_model->get(),
]);
$this->load->view('pages/providers');
@@ -144,7 +144,7 @@ class Providers extends EA_Controller
'is_private',
'id_roles',
'settings',
- 'services'
+ 'services',
]);
$this->providers_model->only($provider['settings'], [
@@ -153,11 +153,11 @@ class Providers extends EA_Controller
'working_plan',
'working_plan_exceptions',
'notifications',
- 'calendar_view'
+ 'calendar_view',
]);
$this->providers_model->optional($provider, [
- 'services' => []
+ 'services' => [],
]);
$provider_id = $this->providers_model->save($provider);
@@ -168,7 +168,7 @@ class Providers extends EA_Controller
json_response([
'success' => true,
- 'id' => $provider_id
+ 'id' => $provider_id,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -224,7 +224,7 @@ class Providers extends EA_Controller
'is_private',
'id_roles',
'settings',
- 'services'
+ 'services',
]);
$this->providers_model->only($provider['settings'], [
@@ -233,11 +233,11 @@ class Providers extends EA_Controller
'working_plan',
'working_plan_exceptions',
'notifications',
- 'calendar_view'
+ 'calendar_view',
]);
$this->providers_model->optional($provider, [
- 'services' => []
+ 'services' => [],
]);
$provider_id = $this->providers_model->save($provider);
@@ -248,7 +248,7 @@ class Providers extends EA_Controller
json_response([
'success' => true,
- 'id' => $provider_id
+ 'id' => $provider_id,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -274,7 +274,7 @@ class Providers extends EA_Controller
$this->webhooks_client->trigger(WEBHOOK_PROVIDER_DELETE, $provider);
json_response([
- 'success' => true
+ 'success' => true,
]);
} catch (Throwable $e) {
json_exception($e);
diff --git a/application/controllers/Recovery.php b/application/controllers/Recovery.php
index 2e38a84d..ce6f156c 100644
--- a/application/controllers/Recovery.php
+++ b/application/controllers/Recovery.php
@@ -41,7 +41,7 @@ class Recovery extends EA_Controller
html_vars([
'page_title' => lang('forgot_your_password'),
'dest_url' => session('dest_url', site_url('backend')),
- 'company_name' => $company_name
+ 'company_name' => $company_name,
]);
$this->load->view('pages/recovery');
@@ -71,14 +71,14 @@ class Recovery extends EA_Controller
$settings = [
'company_name' => setting('company_name'),
'company_link' => setting('company_link'),
- 'company_email' => setting('company_email')
+ 'company_email' => setting('company_email'),
];
$this->email_messages->send_password($new_password, $email, $settings);
}
json_response([
- 'success' => true
+ 'success' => true,
]);
} catch (Throwable $e) {
json_exception($e);
diff --git a/application/controllers/Secretaries.php b/application/controllers/Secretaries.php
index 8902de8c..ef8cd3ed 100644
--- a/application/controllers/Secretaries.php
+++ b/application/controllers/Secretaries.php
@@ -71,7 +71,7 @@ class Secretaries extends EA_Controller
'role_slug' => $role_slug,
'timezones' => $this->timezones->to_array(),
'min_password_length' => MIN_PASSWORD_LENGTH,
- 'providers' => $providers
+ 'providers' => $providers,
]);
html_vars([
@@ -80,7 +80,7 @@ class Secretaries extends EA_Controller
'user_display_name' => $this->accounts->get_user_display_name($user_id),
'grouped_timezones' => $this->timezones->to_grouped_array(),
'privileges' => $this->roles_model->get_permissions_by_slug($role_slug),
- 'providers' => $this->providers_model->get()
+ 'providers' => $this->providers_model->get(),
]);
$this->load->view('pages/secretaries');
@@ -140,18 +140,18 @@ class Secretaries extends EA_Controller
'is_private',
'id_roles',
'settings',
- 'providers'
+ 'providers',
]);
$this->secretaries_model->only($secretary['settings'], [
'username',
'password',
'notifications',
- 'calendar_view'
+ 'calendar_view',
]);
$this->secretaries_model->optional($secretary, [
- 'providers' => []
+ 'providers' => [],
]);
$secretary_id = $this->secretaries_model->save($secretary);
@@ -162,7 +162,7 @@ class Secretaries extends EA_Controller
json_response([
'success' => true,
- 'id' => $secretary_id
+ 'id' => $secretary_id,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -218,18 +218,18 @@ class Secretaries extends EA_Controller
'is_private',
'id_roles',
'settings',
- 'providers'
+ 'providers',
]);
$this->secretaries_model->only($secretary['settings'], [
'username',
'password',
'notifications',
- 'calendar_view'
+ 'calendar_view',
]);
$this->secretaries_model->optional($secretary, [
- 'providers' => []
+ 'providers' => [],
]);
$secretary_id = $this->secretaries_model->save($secretary);
@@ -240,7 +240,7 @@ class Secretaries extends EA_Controller
json_response([
'success' => true,
- 'id' => $secretary_id
+ 'id' => $secretary_id,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -266,7 +266,7 @@ class Secretaries extends EA_Controller
$this->webhooks_client->trigger(WEBHOOK_SECRETARY_DELETE, $secretary);
json_response([
- 'success' => true
+ 'success' => true,
]);
} catch (Throwable $e) {
json_exception($e);
diff --git a/application/controllers/Service_categories.php b/application/controllers/Service_categories.php
index bfc2eeeb..32e96c6a 100644
--- a/application/controllers/Service_categories.php
+++ b/application/controllers/Service_categories.php
@@ -61,7 +61,7 @@ class Service_categories extends EA_Controller
script_vars([
'user_id' => $user_id,
- 'role_slug' => $role_slug
+ 'role_slug' => $role_slug,
]);
html_vars([
@@ -69,7 +69,7 @@ class Service_categories extends EA_Controller
'active_menu' => PRIV_SERVICES,
'user_display_name' => $this->accounts->get_user_display_name($user_id),
'timezones' => $this->timezones->to_array(),
- 'privileges' => $this->roles_model->get_permissions_by_slug($role_slug)
+ 'privileges' => $this->roles_model->get_permissions_by_slug($role_slug),
]);
$this->load->view('pages/service_categories');
@@ -123,7 +123,7 @@ class Service_categories extends EA_Controller
json_response([
'success' => true,
- 'id' => $service_category_id
+ 'id' => $service_category_id,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -172,7 +172,7 @@ class Service_categories extends EA_Controller
json_response([
'success' => true,
- 'id' => $service_category_id
+ 'id' => $service_category_id,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -198,7 +198,7 @@ class Service_categories extends EA_Controller
$this->webhooks_client->trigger(WEBHOOK_SERVICE_CATEGORY_DELETE, $service_category);
json_response([
- 'success' => true
+ 'success' => true,
]);
} catch (Throwable $e) {
json_exception($e);
diff --git a/application/controllers/Services.php b/application/controllers/Services.php
index b35bbce0..12c65c05 100644
--- a/application/controllers/Services.php
+++ b/application/controllers/Services.php
@@ -62,7 +62,7 @@ class Services extends EA_Controller
script_vars([
'user_id' => $user_id,
'role_slug' => $role_slug,
- 'event_minimum_duration' => EVENT_MINIMUM_DURATION
+ 'event_minimum_duration' => EVENT_MINIMUM_DURATION,
]);
html_vars([
@@ -70,7 +70,7 @@ class Services extends EA_Controller
'active_menu' => PRIV_SERVICES,
'user_display_name' => $this->accounts->get_user_display_name($user_id),
'timezones' => $this->timezones->to_array(),
- 'privileges' => $this->roles_model->get_permissions_by_slug($role_slug)
+ 'privileges' => $this->roles_model->get_permissions_by_slug($role_slug),
]);
$this->load->view('pages/services');
@@ -125,11 +125,11 @@ class Services extends EA_Controller
'availabilities_type',
'attendants_number',
'is_private',
- 'id_service_categories'
+ 'id_service_categories',
]);
$this->services_model->optional($service, [
- 'id_service_categories' => null
+ 'id_service_categories' => null,
]);
$service_id = $this->services_model->save($service);
@@ -140,7 +140,7 @@ class Services extends EA_Controller
json_response([
'success' => true,
- 'id' => $service_id
+ 'id' => $service_id,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -191,11 +191,11 @@ class Services extends EA_Controller
'availabilities_type',
'attendants_number',
'is_private',
- 'id_service_categories'
+ 'id_service_categories',
]);
$this->services_model->optional($service, [
- 'id_service_categories' => null
+ 'id_service_categories' => null,
]);
$service_id = $this->services_model->save($service);
@@ -206,7 +206,7 @@ class Services extends EA_Controller
json_response([
'success' => true,
- 'id' => $service_id
+ 'id' => $service_id,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -232,7 +232,7 @@ class Services extends EA_Controller
$this->webhooks_client->trigger(WEBHOOK_SERVICE_DELETE, $service);
json_response([
- 'success' => true
+ 'success' => true,
]);
} catch (Throwable $e) {
json_exception($e);
diff --git a/application/controllers/Unavailabilities.php b/application/controllers/Unavailabilities.php
index 7871c2a3..368ae794 100644
--- a/application/controllers/Unavailabilities.php
+++ b/application/controllers/Unavailabilities.php
@@ -84,7 +84,7 @@ class Unavailabilities extends EA_Controller
'zip_code',
'notes',
'timezone',
- 'language'
+ 'language',
]);
$unavailability_id = $this->unavailabilities_model->save($unavailability);
@@ -99,7 +99,7 @@ class Unavailabilities extends EA_Controller
json_response([
'success' => true,
- 'id' => $unavailability_id
+ 'id' => $unavailability_id,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -150,7 +150,7 @@ class Unavailabilities extends EA_Controller
json_response([
'success' => true,
- 'id' => $unavailability_id
+ 'id' => $unavailability_id,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -176,7 +176,7 @@ class Unavailabilities extends EA_Controller
$this->webhooks_client->trigger(WEBHOOK_UNAVAILABILITY_DELETE, $unavailability);
json_response([
- 'success' => true
+ 'success' => true,
]);
} catch (Throwable $e) {
json_exception($e);
diff --git a/application/controllers/Webhooks.php b/application/controllers/Webhooks.php
index eb76791a..57b3045c 100644
--- a/application/controllers/Webhooks.php
+++ b/application/controllers/Webhooks.php
@@ -60,7 +60,7 @@ class Webhooks extends EA_Controller
script_vars([
'user_id' => $user_id,
- 'role_slug' => $role_slug
+ 'role_slug' => $role_slug,
]);
html_vars([
@@ -87,8 +87,8 @@ class Webhooks extends EA_Controller
WEBHOOK_SECRETARY_SAVE,
WEBHOOK_SECRETARY_DELETE,
WEBHOOK_ADMIN_SAVE,
- WEBHOOK_ADMIN_DELETE
- ]
+ WEBHOOK_ADMIN_DELETE,
+ ],
]);
$this->load->view('pages/webhooks');
@@ -138,14 +138,14 @@ class Webhooks extends EA_Controller
'actions',
'secret_token',
'is_ssl_verified',
- 'notes'
+ 'notes',
]);
$webhook_id = $this->webhooks_model->save($webhook);
json_response([
'success' => true,
- 'id' => $webhook_id
+ 'id' => $webhook_id,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -171,14 +171,14 @@ class Webhooks extends EA_Controller
'actions',
'secret_token',
'is_ssl_verified',
- 'notes'
+ 'notes',
]);
$webhook_id = $this->webhooks_model->save($webhook);
json_response([
'success' => true,
- 'id' => $webhook_id
+ 'id' => $webhook_id,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -200,7 +200,7 @@ class Webhooks extends EA_Controller
$this->webhooks_model->delete($webhook_id);
json_response([
- 'success' => true
+ 'success' => true,
]);
} catch (Throwable $e) {
json_exception($e);
diff --git a/application/controllers/api/v1/Appointments_api_v1.php b/application/controllers/api/v1/Appointments_api_v1.php
index 0e26e793..44cf4883 100644
--- a/application/controllers/api/v1/Appointments_api_v1.php
+++ b/application/controllers/api/v1/Appointments_api_v1.php
@@ -150,15 +150,15 @@ class Appointments_api_v1 extends EA_Controller
if ($aggregates) {
$appointment['service'] = $this->services_model->find(
$appointment['id_services'] ?? ($appointment['serviceId'] ?? null),
- true
+ true,
);
$appointment['provider'] = $this->providers_model->find(
$appointment['id_users_provider'] ?? ($appointment['providerId'] ?? null),
- true
+ true,
);
$appointment['customer'] = $this->customers_model->find(
$appointment['id_users_customer'] ?? ($appointment['customerId'] ?? null),
- true
+ true,
);
$this->services_model->api_encode($appointment['service']);
$this->providers_model->api_encode($appointment['provider']);
@@ -275,7 +275,7 @@ class Appointments_api_v1 extends EA_Controller
'company_email' => setting('company_email'),
'company_link' => setting('company_link'),
'date_format' => setting('date_format'),
- 'time_format' => setting('time_format')
+ 'time_format' => setting('time_format'),
];
$this->synchronization->sync_appointment_saved($appointment, $service, $provider, $customer, $settings);
@@ -286,7 +286,7 @@ class Appointments_api_v1 extends EA_Controller
$provider,
$customer,
$settings,
- $manage_mode
+ $manage_mode,
);
}
@@ -355,7 +355,7 @@ class Appointments_api_v1 extends EA_Controller
'company_email' => setting('company_email'),
'company_link' => setting('company_link'),
'date_format' => setting('date_format'),
- 'time_format' => setting('time_format')
+ 'time_format' => setting('time_format'),
];
$this->appointments_model->delete($id);
@@ -367,7 +367,7 @@ class Appointments_api_v1 extends EA_Controller
$service,
$provider,
$customer,
- $settings
+ $settings,
);
response('', 204);
diff --git a/application/controllers/api/v1/Settings_api_v1.php b/application/controllers/api/v1/Settings_api_v1.php
index 8dd55cc3..177757f6 100644
--- a/application/controllers/api/v1/Settings_api_v1.php
+++ b/application/controllers/api/v1/Settings_api_v1.php
@@ -78,7 +78,7 @@ class Settings_api_v1 extends EA_Controller
json_response([
'name' => $name,
- 'value' => $value
+ 'value' => $value,
]);
} catch (Throwable $e) {
json_exception($e);
@@ -99,7 +99,7 @@ class Settings_api_v1 extends EA_Controller
json_response([
'name' => $name,
- 'value' => $value
+ 'value' => $value,
]);
} catch (Throwable $e) {
json_exception($e);
diff --git a/application/core/EA_Controller.php b/application/core/EA_Controller.php
index 831050a5..23b600d1 100644
--- a/application/core/EA_Controller.php
+++ b/application/core/EA_Controller.php
@@ -117,7 +117,7 @@ class EA_Controller extends CI_Controller
config([
'language' => $session_language,
- 'language_code' => array_search($session_language, $language_codes) ?: 'en'
+ 'language_code' => array_search($session_language, $language_codes) ?: 'en',
]);
}
@@ -134,7 +134,7 @@ class EA_Controller extends CI_Controller
'index_page' => config('index_page'),
'available_languages' => config('available_languages'),
'language' => $this->lang->language,
- 'csrf_token' => $this->security->get_csrf_hash()
+ 'csrf_token' => $this->security->get_csrf_hash(),
]);
}
@@ -149,7 +149,7 @@ class EA_Controller extends CI_Controller
'available_languages' => config('available_languages'),
'csrf_token' => $this->security->get_csrf_hash(),
'language' => config('language'),
- 'language_code' => config('language_code')
+ 'language_code' => config('language_code'),
]);
}
}
diff --git a/application/core/EA_Loader.php b/application/core/EA_Loader.php
index f4f397ff..ebbfc315 100644
--- a/application/core/EA_Loader.php
+++ b/application/core/EA_Loader.php
@@ -59,7 +59,7 @@ class EA_Loader extends CI_Loader
$result = $this->_ci_load([
'_ci_view' => $view,
'_ci_vars' => $this->_ci_prepare_view_vars($vars),
- '_ci_return' => $return
+ '_ci_return' => $return,
]);
$layout = config('layout');
@@ -68,7 +68,7 @@ class EA_Loader extends CI_Loader
$result = $this->_ci_load([
'_ci_view' => $layout['filename'],
'_ci_vars' => $this->_ci_prepare_view_vars($vars),
- '_ci_return' => $return
+ '_ci_return' => $return,
]);
}
diff --git a/application/helpers/array_helper.php b/application/helpers/array_helper.php
index 433026f6..1f47c14e 100644
--- a/application/helpers/array_helper.php
+++ b/application/helpers/array_helper.php
@@ -68,7 +68,7 @@ if (!function_exists('array_fields')) {
function ($field) use ($fields) {
return in_array($field, $fields);
},
- ARRAY_FILTER_USE_KEY
+ ARRAY_FILTER_USE_KEY,
);
}
}
diff --git a/application/helpers/date_helper.php b/application/helpers/date_helper.php
index 45a56ecf..bef0edea 100644
--- a/application/helpers/date_helper.php
+++ b/application/helpers/date_helper.php
@@ -25,7 +25,7 @@ if (!function_exists('get_date_format')) {
'DMY' => 'd/m/Y',
'MDY' => 'm/d/Y',
'YMD' => 'Y/m/d',
- default => throw new RuntimeException('Invalid date format value: ' . $date_format)
+ default => throw new RuntimeException('Invalid date format value: ' . $date_format),
};
}
}
@@ -43,7 +43,7 @@ if (!function_exists('get_time_format')) {
return match ($time_format) {
'military' => 'H:i',
'regular' => 'g:i a',
- default => throw new RuntimeException('Invalid time format value: ' . $time_format)
+ default => throw new RuntimeException('Invalid time format value: ' . $time_format),
};
}
}
diff --git a/application/helpers/html_helper.php b/application/helpers/html_helper.php
index fe62ddf9..81bb347e 100644
--- a/application/helpers/html_helper.php
+++ b/application/helpers/html_helper.php
@@ -69,8 +69,8 @@ if (!function_exists('extend')) {
'layout' => [
'filename' => $layout,
'sections' => [],
- 'tmp' => []
- ]
+ 'tmp' => [],
+ ],
]);
}
}
diff --git a/application/helpers/http_helper.php b/application/helpers/http_helper.php
index b04a37db..7d40edd2 100644
--- a/application/helpers/http_helper.php
+++ b/application/helpers/http_helper.php
@@ -137,9 +137,9 @@ if (!function_exists('json_exception')) {
[
'success' => false,
'message' => $e->getMessage(),
- 'trace' => config('debug') ? $e->getTrace() : []
+ 'trace' => config('debug') ? $e->getTrace() : [],
],
- 500
+ 500,
);
}
}
diff --git a/application/helpers/setting_helper.php b/application/helpers/setting_helper.php
index 0f4efb28..607c74d5 100644
--- a/application/helpers/setting_helper.php
+++ b/application/helpers/setting_helper.php
@@ -53,7 +53,7 @@ if (!function_exists('setting')) {
if (empty($setting)) {
$setting = [
- 'name' => $name
+ 'name' => $name,
];
}
diff --git a/application/libraries/Accounts.php b/application/libraries/Accounts.php
index c280e02a..f49c732d 100644
--- a/application/libraries/Accounts.php
+++ b/application/libraries/Accounts.php
@@ -56,7 +56,7 @@ class Accounts
$user_settings = $this->CI->db
->get_where('user_settings', [
'username' => $username,
- 'password' => $password
+ 'password' => $password,
])
->row_array();
@@ -76,7 +76,7 @@ class Accounts
'username' => $username,
'timezone' => !empty($user['timezone']) ? $user['timezone'] : $default_timezone,
'language' => !empty($user['language']) ? $user['language'] : Config::LANGUAGE,
- 'role_slug' => $role['slug']
+ 'role_slug' => $role['slug'],
];
}
diff --git a/application/libraries/Api.php b/application/libraries/Api.php
index 4067c727..e4ab6856 100644
--- a/application/libraries/Api.php
+++ b/application/libraries/Api.php
@@ -83,7 +83,7 @@ class Api
throw new RuntimeException(
'The provided credentials do not match any admin user!',
401,
- 'Unauthorized'
+ 'Unauthorized',
);
}
} catch (Throwable) {
@@ -133,7 +133,7 @@ class Api
// about capitalization for Authorization).
$requestHeaders = array_combine(
array_map('ucwords', array_keys($requestHeaders)),
- array_values($requestHeaders)
+ array_values($requestHeaders),
);
if (isset($requestHeaders['Authorization'])) {
diff --git a/application/libraries/Availability.php b/application/libraries/Availability.php
index d9b72da7..f890e7c5 100644
--- a/application/libraries/Availability.php
+++ b/application/libraries/Availability.php
@@ -60,7 +60,7 @@ class Availability
string $date,
array $service,
array $provider,
- int $exclude_appointment_id = null
+ int $exclude_appointment_id = null,
): array {
if ($this->CI->blocked_periods_model->is_entire_date_blocked($date)) {
return [];
@@ -97,13 +97,13 @@ class Availability
string $date,
array $service,
array $provider,
- int $exclude_appointment_id = null
+ int $exclude_appointment_id = null,
): array {
$unavailability_events = $this->CI->unavailabilities_model->get([
'is_unavailability' => true,
'DATE(start_datetime) <=' => $date,
'DATE(end_datetime) >=' => $date,
- 'id_users_provider' => $provider['id']
+ 'id_users_provider' => $provider['id'],
]);
$working_plan = json_decode($provider['settings']['working_plan'], true);
@@ -126,8 +126,8 @@ class Availability
$periods = [
[
'start' => new DateTime($date . ' ' . $date_working_plan['start']),
- 'end' => new DateTime($date . ' ' . $date_working_plan['end'])
- ]
+ 'end' => new DateTime($date . ' ' . $date_working_plan['end']),
+ ],
];
$blocked_periods = $this->CI->blocked_periods_model->get_for_period($date, $date);
@@ -154,7 +154,7 @@ class Availability
$slot_end,
$service['id'],
$provider['id'],
- $exclude_appointment_id
+ $exclude_appointment_id,
);
if ($other_service_attendants_number > 0) {
@@ -169,7 +169,7 @@ class Availability
$slot_end,
$service['id'],
$provider['id'],
- $exclude_appointment_id
+ $exclude_appointment_id,
);
if ($appointment_attendants_number < $service['attendants_number']) {
@@ -227,7 +227,7 @@ class Availability
$period['end'] = $break_start;
$periods[] = [
'start' => $break_end,
- 'end' => $period_end
+ 'end' => $period_end,
];
continue;
}
@@ -290,7 +290,7 @@ class Availability
$period['end'] = $unavailability_start;
$periods[] = [
'start' => $unavailability_end,
- 'end' => $period_end
+ 'end' => $period_end,
];
continue;
}
@@ -365,8 +365,8 @@ class Availability
array_merge(
$this->CI->appointments_model->get($where),
$this->CI->unavailabilities_model->get($where),
- $this->CI->blocked_periods_model->get_for_period($date, $date)
- )
+ $this->CI->blocked_periods_model->get_for_period($date, $date),
+ ),
);
// Find the empty spaces on the plan. The first split between the plan is due to a break (if any). After that
@@ -389,7 +389,7 @@ class Availability
if (isset($date_working_plan['breaks'])) {
$periods[] = [
'start' => $date_working_plan['start'],
- 'end' => $date_working_plan['end']
+ 'end' => $date_working_plan['end'],
];
$day_start = new DateTime($date_working_plan['start']);
@@ -421,7 +421,7 @@ class Availability
if ($break_start > $period_start && $break_start < $period_end && $break_end > $period_start) {
$periods[] = [
'start' => $period_start->format('H:i'),
- 'end' => $break_start->format('H:i')
+ 'end' => $break_start->format('H:i'),
];
$remove_current_period = true;
@@ -430,7 +430,7 @@ class Availability
if ($break_start < $period_end && $break_end > $period_start && $break_end < $period_end) {
$periods[] = [
'start' => $break_end->format('H:i'),
- 'end' => $period_end->format('H:i')
+ 'end' => $period_end->format('H:i'),
];
$remove_current_period = true;
@@ -484,12 +484,12 @@ class Availability
$periods[] = [
'start' => $period_start->format('H:i'),
- 'end' => $appointment_start->format('H:i')
+ 'end' => $appointment_start->format('H:i'),
];
$periods[] = [
'start' => $appointment_end->format('H:i'),
- 'end' => $period_end->format('H:i')
+ 'end' => $period_end->format('H:i'),
];
} elseif ($appointment_start == $period_start && $appointment_end == $period_end) {
unset($periods[$index]); // The whole period is blocked so remove it from the available periods array.
@@ -623,7 +623,7 @@ class Availability
protected function consider_future_booking_limit(
string $selected_date,
array $available_hours,
- array $provider
+ array $provider,
): array {
$provider_timezone = new DateTimeZone($provider['timezone']);
diff --git a/application/libraries/Captcha_builder.php b/application/libraries/Captcha_builder.php
index 4b3cfb16..d06f2aeb 100644
--- a/application/libraries/Captcha_builder.php
+++ b/application/libraries/Captcha_builder.php
@@ -251,7 +251,7 @@ class Captcha_builder
if (!in_array($imageType, $this->allowedBackgroundImageTypes)) {
throw new Exception(
- 'Invalid background image type! Allowed types are: ' . join(', ', $this->allowedBackgroundImageTypes)
+ 'Invalid background image type! Allowed types are: ' . join(', ', $this->allowedBackgroundImageTypes),
);
}
@@ -395,7 +395,7 @@ class Captcha_builder
$this->getCol($image, floor($nX), floor($nY), $bg),
$this->getCol($image, ceil($nX), floor($nY), $bg),
$this->getCol($image, floor($nX), ceil($nY), $bg),
- $this->getCol($image, ceil($nX), ceil($nY), $bg)
+ $this->getCol($image, ceil($nX), ceil($nY), $bg),
);
} else {
$p = $this->getCol($image, round($nX), round($nY), $bg);
diff --git a/application/libraries/Email_messages.php b/application/libraries/Email_messages.php
index 9643529d..00f9309f 100644
--- a/application/libraries/Email_messages.php
+++ b/application/libraries/Email_messages.php
@@ -72,7 +72,7 @@ class Email_messages
string $appointment_link,
string $recipient_email,
string $ics_stream,
- string $timezone = null
+ string $timezone = null,
): void {
$appointment_timezone = new DateTimeZone($provider['timezone']);
@@ -101,9 +101,9 @@ class Email_messages
'customer' => $customer,
'settings' => $settings,
'timezone' => $timezone,
- 'appointment_link' => $appointment_link
+ 'appointment_link' => $appointment_link,
],
- true
+ true,
);
$this->CI->email->from($settings['company_email'], $settings['company_email']);
@@ -143,7 +143,7 @@ class Email_messages
array $settings,
string $recipient_email,
string $reason = null,
- string $timezone = null
+ string $timezone = null,
): void {
$appointment_timezone = new DateTimeZone($provider['timezone']);
@@ -170,9 +170,9 @@ class Email_messages
'customer' => $customer,
'settings' => $settings,
'timezone' => $timezone,
- 'reason' => $reason
+ 'reason' => $reason,
],
- true
+ true,
);
$this->CI->email->from($settings['company_email'], $settings['company_email']);
@@ -202,9 +202,9 @@ class Email_messages
[
'subject' => lang('new_account_password'),
'message' => str_replace('$password', '' . $password . '', lang('new_password_is')),
- 'settings' => $settings
+ 'settings' => $settings,
],
- true
+ true,
);
$this->CI->email->from($settings['company_email'], $settings['company_email']);
diff --git a/application/libraries/Google_sync.php b/application/libraries/Google_sync.php
index 312c8a94..fb2e4e08 100644
--- a/application/libraries/Google_sync.php
+++ b/application/libraries/Google_sync.php
@@ -62,7 +62,7 @@ class Google_sync
public function initialize_clients(): void
{
$http = new GuzzleHttp\Client([
- 'verify' => false
+ 'verify' => false,
]);
$this->client = new Google_Client();
@@ -109,7 +109,7 @@ class Google_sync
if (isset($response['error'])) {
throw new RuntimeException(
- 'Google Authentication Error (' . $response['error'] . '): ' . $response['error_description']
+ 'Google Authentication Error (' . $response['error'] . '): ' . $response['error_description'],
);
}
@@ -155,7 +155,7 @@ class Google_sync
array $provider,
array $service,
array $customer,
- array $settings
+ array $settings,
): Event {
$event = new Google_Service_Calendar_Event();
$event->setSummary(!empty($service) ? $service['name'] : 'Unavailable');
@@ -166,7 +166,7 @@ class Google_sync
$start = new Google_Service_Calendar_EventDateTime();
$start->setDateTime(
- (new DateTime($appointment['start_datetime'], $timezone))->format(DateTimeInterface::RFC3339)
+ (new DateTime($appointment['start_datetime'], $timezone))->format(DateTimeInterface::RFC3339),
);
$event->setStart($start);
@@ -213,11 +213,11 @@ class Google_sync
array $provider,
array $service,
array $customer,
- array $settings
+ array $settings,
): Event {
$event = $this->service->events->get(
$provider['settings']['google_calendar'],
- $appointment['id_google_calendar']
+ $appointment['id_google_calendar'],
);
$event->setSummary($service['name']);
@@ -228,7 +228,7 @@ class Google_sync
$start = new Google_Service_Calendar_EventDateTime();
$start->setDateTime(
- (new DateTime($appointment['start_datetime'], $timezone))->format(DateTimeInterface::RFC3339)
+ (new DateTime($appointment['start_datetime'], $timezone))->format(DateTimeInterface::RFC3339),
);
$event->setStart($start);
@@ -284,13 +284,13 @@ class Google_sync
$start = new Google_Service_Calendar_EventDateTime();
$start->setDateTime(
- (new DateTime($unavailability['start_datetime'], $timezone))->format(DateTimeInterface::RFC3339)
+ (new DateTime($unavailability['start_datetime'], $timezone))->format(DateTimeInterface::RFC3339),
);
$event->setStart($start);
$end = new Google_Service_Calendar_EventDateTime();
$end->setDateTime(
- (new DateTime($unavailability['end_datetime'], $timezone))->format(DateTimeInterface::RFC3339)
+ (new DateTime($unavailability['end_datetime'], $timezone))->format(DateTimeInterface::RFC3339),
);
$event->setEnd($end);
@@ -312,7 +312,7 @@ class Google_sync
{
$event = $this->service->events->get(
$provider['settings']['google_calendar'],
- $unavailability['id_google_calendar']
+ $unavailability['id_google_calendar'],
);
$event->setSummary('Unavailable');
@@ -322,13 +322,13 @@ class Google_sync
$start = new Google_Service_Calendar_EventDateTime();
$start->setDateTime(
- (new DateTime($unavailability['start_datetime'], $timezone))->format(DateTimeInterface::RFC3339)
+ (new DateTime($unavailability['start_datetime'], $timezone))->format(DateTimeInterface::RFC3339),
);
$event->setStart($start);
$end = new Google_Service_Calendar_EventDateTime();
$end->setDateTime(
- (new DateTime($unavailability['end_datetime'], $timezone))->format(DateTimeInterface::RFC3339)
+ (new DateTime($unavailability['end_datetime'], $timezone))->format(DateTimeInterface::RFC3339),
);
$event->setEnd($end);
@@ -373,7 +373,7 @@ class Google_sync
$params = [
'timeMin' => date(DateTimeInterface::RFC3339, $start),
'timeMax' => date(DateTimeInterface::RFC3339, $end),
- 'singleEvents' => true
+ 'singleEvents' => true,
];
return $this->service->events->listEvents($google_calendar, $params);
@@ -400,7 +400,7 @@ class Google_sync
$calendars[] = [
'id' => $google_calendar->getId(),
- 'summary' => $google_calendar->getSummary()
+ 'summary' => $google_calendar->getSummary(),
];
}
@@ -453,7 +453,7 @@ class Google_sync
$appointment_end_instance->format('Ymd\THis\Z'),
'location' => setting('company_name'),
'details' => 'View/Change Appointment: ' . site_url('appointments/index/' . $appointment['hash']),
- 'add' => implode(', ', $add)
+ 'add' => implode(', ', $add),
];
return 'https://calendar.google.com/calendar/render?' . http_build_query($add_to_google_url_params);
diff --git a/application/libraries/Ics_calendar.php b/application/libraries/Ics_calendar.php
index 6b3a2c2f..bc53cdd9 100644
--- a/application/libraries/Ics_calendar.php
+++ b/application/libraries/Ics_calendar.php
@@ -252,13 +252,13 @@ class Ics_calendar extends Calendar
if ($image['VALUE'] == 'URI' && $image['URI']) {
$new_image = [
'VALUE' => 'URI',
- 'URI' => $image['URI']
+ 'URI' => $image['URI'],
];
} elseif ($image['VALUE'] == 'BINARY' && $image['ENCODING'] && $image['BINARY']) {
$new_image = [
'VALUE' => 'BINARY',
'ENCODING' => $image['ENCODING'],
- 'BINARY' => $image['BINARY']
+ 'BINARY' => $image['BINARY'],
];
} else {
return;
diff --git a/application/libraries/Ics_file.php b/application/libraries/Ics_file.php
index ff7067a0..a17261f9 100644
--- a/application/libraries/Ics_file.php
+++ b/application/libraries/Ics_file.php
@@ -108,7 +108,7 @@ class Ics_file
'',
lang('notes'),
'',
- $appointment['notes']
+ $appointment['notes'],
];
$event->setDescription(implode("\\n", $description));
diff --git a/application/libraries/Instance.php b/application/libraries/Instance.php
index d6dd4221..937939b3 100644
--- a/application/libraries/Instance.php
+++ b/application/libraries/Instance.php
@@ -91,7 +91,7 @@ class Instance
setting([
'company_name' => 'Company Name',
'company_email' => 'info@example.org',
- 'company_link' => 'https://example.org'
+ 'company_link' => 'https://example.org',
]);
// Admin
@@ -107,8 +107,8 @@ class Instance
'username' => 'administrator',
'password' => $password,
'notifications' => true,
- 'calendar_view' => CALENDAR_VIEW_DEFAULT
- ]
+ 'calendar_view' => CALENDAR_VIEW_DEFAULT,
+ ],
]);
// Service
@@ -119,7 +119,7 @@ class Instance
'price' => '0',
'currency' => '',
'availabilities_type' => 'flexible',
- 'attendants_number' => '1'
+ 'attendants_number' => '1',
]);
// Provider
@@ -139,8 +139,8 @@ class Instance
'google_sync' => false,
'sync_past_days' => 30,
'sync_future_days' => 90,
- 'calendar_view' => CALENDAR_VIEW_DEFAULT
- ]
+ 'calendar_view' => CALENDAR_VIEW_DEFAULT,
+ ],
]);
// Customer
@@ -149,7 +149,7 @@ class Instance
'first_name' => 'James',
'last_name' => 'Doe',
'email' => 'james@example.org',
- 'phone_number' => '+10000000000'
+ 'phone_number' => '+10000000000',
]);
return $password;
diff --git a/application/libraries/Notifications.php b/application/libraries/Notifications.php
index 05473c8b..59df379a 100644
--- a/application/libraries/Notifications.php
+++ b/application/libraries/Notifications.php
@@ -60,7 +60,7 @@ class Notifications
array $provider,
array $customer,
array $settings,
- bool $manage_mode = false
+ bool $manage_mode = false,
): void {
try {
$current_language = config('english');
@@ -92,14 +92,14 @@ class Notifications
$customer_link,
$customer['email'],
$ics_stream,
- $customer['timezone']
+ $customer['timezone'],
);
}
// Notify provider.
$send_provider = filter_var(
$this->CI->providers_model->get_setting($provider['id'], 'notifications'),
- FILTER_VALIDATE_BOOLEAN
+ FILTER_VALIDATE_BOOLEAN,
);
if ($send_provider === true) {
@@ -119,7 +119,7 @@ class Notifications
$provider_link,
$provider['email'],
$ics_stream,
- $provider['timezone']
+ $provider['timezone'],
);
}
@@ -147,7 +147,7 @@ class Notifications
$provider_link,
$admin['email'],
$ics_stream,
- $admin['timezone']
+ $admin['timezone'],
);
}
@@ -179,7 +179,7 @@ class Notifications
$provider_link,
$secretary['email'],
$ics_stream,
- $secretary['timezone']
+ $secretary['timezone'],
);
}
} catch (Throwable $e) {
@@ -188,7 +188,7 @@ class Notifications
'Notifications - Could not email confirmation details of appointment (' .
($appointment['id'] ?? '-') .
') : ' .
- $e->getMessage()
+ $e->getMessage(),
);
log_message('error', $e->getTraceAsString());
} finally {
@@ -212,7 +212,7 @@ class Notifications
array $provider,
array $customer,
array $settings,
- string $cancellation_reason = ''
+ string $cancellation_reason = '',
): void {
try {
$current_language = config('language');
@@ -220,7 +220,7 @@ class Notifications
// Notify provider.
$send_provider = filter_var(
$this->CI->providers_model->get_setting($provider['id'], 'notifications'),
- FILTER_VALIDATE_BOOLEAN
+ FILTER_VALIDATE_BOOLEAN,
);
if ($send_provider === true) {
@@ -235,7 +235,7 @@ class Notifications
$settings,
$provider['email'],
$cancellation_reason,
- $provider['timezone']
+ $provider['timezone'],
);
}
@@ -255,7 +255,7 @@ class Notifications
$settings,
$customer['email'],
$cancellation_reason,
- $customer['timezone']
+ $customer['timezone'],
);
}
@@ -278,7 +278,7 @@ class Notifications
$settings,
$admin['email'],
$cancellation_reason,
- $admin['timezone']
+ $admin['timezone'],
);
}
@@ -305,7 +305,7 @@ class Notifications
$settings,
$secretary['email'],
$cancellation_reason,
- $secretary['timezone']
+ $secretary['timezone'],
);
}
} catch (Throwable $e) {
@@ -314,7 +314,7 @@ class Notifications
'Notifications - Could not email cancellation details of appointment (' .
($appointment['id'] ?? '-') .
') : ' .
- $e->getMessage()
+ $e->getMessage(),
);
log_message('error', $e->getTraceAsString());
} finally {
diff --git a/application/libraries/Synchronization.php b/application/libraries/Synchronization.php
index fa874cf0..d029730c 100644
--- a/application/libraries/Synchronization.php
+++ b/application/libraries/Synchronization.php
@@ -52,7 +52,7 @@ class Synchronization
array $service,
array $provider,
array $customer,
- array $settings
+ array $settings,
): void {
try {
if (!$provider['settings']['google_sync']) {
@@ -73,7 +73,7 @@ class Synchronization
$provider,
$service,
$customer,
- $settings
+ $settings,
);
$appointment['id_google_calendar'] = $google_event->getId();
@@ -88,7 +88,7 @@ class Synchronization
'Synchronization - Could not sync confirmation details of appointment (' .
($appointment['id'] ?? '-') .
') : ' .
- $e->getMessage()
+ $e->getMessage(),
);
log_message('error', $e->getTraceAsString());
}
@@ -130,7 +130,7 @@ class Synchronization
'Synchronization - Could not sync cancellation details of unavailability (' .
($appointment['id'] ?? '-') .
') : ' .
- $e->getMessage()
+ $e->getMessage(),
);
log_message('error', $e->getTraceAsString());
}
@@ -164,7 +164,7 @@ class Synchronization
'Synchronization - Could not sync cancellation details of unavailability (' .
($appointment['id'] ?? '-') .
') : ' .
- $e->getMessage()
+ $e->getMessage(),
);
log_message('error', $e->getTraceAsString());
}
@@ -223,7 +223,7 @@ class Synchronization
'Synchronization - Could not sync cancellation details of appointment (' .
($appointment['id'] ?? '-') .
') : ' .
- $e->getMessage()
+ $e->getMessage(),
);
log_message('error', $e->getTraceAsString());
}
diff --git a/application/libraries/Timezones.php b/application/libraries/Timezones.php
index d993362c..c5e93e31 100644
--- a/application/libraries/Timezones.php
+++ b/application/libraries/Timezones.php
@@ -35,7 +35,7 @@ class Timezones
*/
protected array $timezones = [
'UTC' => [
- 'UTC' => 'UTC'
+ 'UTC' => 'UTC',
],
'America' => [
'America/Adak' => 'Adak (-10:00)',
@@ -166,7 +166,7 @@ class Timezones
'America/Sao_Paulo' => 'Sao_Paulo (-3:00)',
'America/Noronha' => 'Noronha (-2:00)',
'America/Scoresbysund' => 'Scoresbysund (-1:00)',
- 'America/Danmarkshavn' => 'Danmarkshavn (+0:00)'
+ 'America/Danmarkshavn' => 'Danmarkshavn (+0:00)',
],
'Canada' => [
'Canada/Pacific' => 'Pacific (-8:00)',
@@ -177,16 +177,16 @@ class Timezones
'Canada/Saskatchewan' => 'Saskatchewan (-6:00)',
'Canada/Eastern' => 'Eastern (-5:00)',
'Canada/Atlantic' => 'Atlantic (-4:00)',
- 'Canada/Newfoundland' => 'Newfoundland (-3:-30)'
+ 'Canada/Newfoundland' => 'Newfoundland (-3:-30)',
],
'Mexico' => [
'Mexico/BajaNorte' => 'BajaNorte (-8:00)',
'Mexico/BajaSur' => 'BajaSur (-7:00)',
- 'Mexico/General' => 'General (-6:00)'
+ 'Mexico/General' => 'General (-6:00)',
],
'Chile' => [
'Chile/EasterIsland' => 'EasterIsland (-6:00)',
- 'Chile/Continental' => 'Continental (-4:00)'
+ 'Chile/Continental' => 'Continental (-4:00)',
],
'Antarctica' => [
'Antarctica/Palmer' => 'Palmer (-4:00)',
@@ -198,7 +198,7 @@ class Timezones
'Antarctica/Casey' => 'Casey (+8:00)',
'Antarctica/DumontDUrville' => 'DumontDUrville (+10:00)',
'Antarctica/McMurdo' => 'McMurdo (+12:00)',
- 'Antarctica/South_Pole' => 'South_Pole (+12:00)'
+ 'Antarctica/South_Pole' => 'South_Pole (+12:00)',
],
'Atlantic' => [
'Atlantic/Bermuda' => 'Bermuda (-4:00)',
@@ -212,13 +212,13 @@ class Timezones
'Atlantic/Madeira' => 'Madeira (+0:00)',
'Atlantic/Reykjavik' => 'Reykjavik (+0:00)',
'Atlantic/St_Helena' => 'St_Helena (+0:00)',
- 'Atlantic/Jan_Mayen' => 'Jan_Mayen (+1:00)'
+ 'Atlantic/Jan_Mayen' => 'Jan_Mayen (+1:00)',
],
'Brazil' => [
'Brazil/Acre' => 'Acre (-4:00)',
'Brazil/West' => 'West (-4:00)',
'Brazil/East' => 'East (-3:00)',
- 'Brazil/DeNoronha' => 'DeNoronha (-2:00)'
+ 'Brazil/DeNoronha' => 'DeNoronha (-2:00)',
],
'Africa' => [
'Africa/Abidjan' => 'Abidjan (+0:00)',
@@ -273,7 +273,7 @@ class Timezones
'Africa/Kampala' => 'Kampala (+3:00)',
'Africa/Khartoum' => 'Khartoum (+3:00)',
'Africa/Mogadishu' => 'Mogadishu (+3:00)',
- 'Africa/Nairobi' => 'Nairobi (+3:00)'
+ 'Africa/Nairobi' => 'Nairobi (+3:00)',
],
'Europe' => [
'Europe/Belfast' => 'Belfast (+0:00)',
@@ -333,10 +333,10 @@ class Timezones
'Europe/Zaporozhye' => 'Zaporozhye (+2:00)',
'Europe/Moscow' => 'Moscow (+3:00)',
'Europe/Volgograd' => 'Volgograd (+3:00)',
- 'Europe/Samara' => 'Samara (+4:00)'
+ 'Europe/Samara' => 'Samara (+4:00)',
],
'Arctic' => [
- 'Arctic/Longyearbyen' => 'Longyearbyen (+1:00)'
+ 'Arctic/Longyearbyen' => 'Longyearbyen (+1:00)',
],
'Asia' => [
'Asia/Amman' => 'Amman (+2:00)',
@@ -423,7 +423,7 @@ class Timezones
'Asia/Vladivostok' => 'Vladivostok (+10:00)',
'Asia/Magadan' => 'Magadan (+11:00)',
'Asia/Anadyr' => 'Anadyr (+12:00)',
- 'Asia/Kamchatka' => 'Kamchatka (+12:00)'
+ 'Asia/Kamchatka' => 'Kamchatka (+12:00)',
],
'Indian' => [
'Indian/Antananarivo' => 'Antananarivo (+3:00)',
@@ -436,7 +436,7 @@ class Timezones
'Indian/Maldives' => 'Maldives (+5:00)',
'Indian/Chagos' => 'Chagos (+6:00)',
'Indian/Cocos' => 'Cocos (+6:30)',
- 'Indian/Christmas' => 'Christmas (+7:00)'
+ 'Indian/Christmas' => 'Christmas (+7:00)',
],
'Australia' => [
'Australia/Perth' => 'Perth (+8:00)',
@@ -461,7 +461,7 @@ class Timezones
'Australia/Tasmania' => 'Tasmania (+10:00)',
'Australia/Victoria' => 'Victoria (+10:00)',
'Australia/LHI' => 'LHI (+10:30)',
- 'Australia/Lord_Howe' => 'Lord_Howe (+10:30)'
+ 'Australia/Lord_Howe' => 'Lord_Howe (+10:30)',
],
'Pacific' => [
'Pacific/Apia' => 'Apia (+13:00)',
@@ -499,8 +499,8 @@ class Timezones
'Pacific/Tarawa' => 'Tarawa (+12:00)',
'Pacific/Tongatapu' => 'Tongatapu (+13:00)',
'Pacific/Wake' => 'Wake (+12:00)',
- 'Pacific/Wallis' => 'Wallis (+12:00)'
- ]
+ 'Pacific/Wallis' => 'Wallis (+12:00)',
+ ],
];
/**
diff --git a/application/libraries/Webhooks_client.php b/application/libraries/Webhooks_client.php
index 4bdec38e..921c71a3 100644
--- a/application/libraries/Webhooks_client.php
+++ b/application/libraries/Webhooks_client.php
@@ -78,8 +78,8 @@ class Webhooks_client
'verify' => $webhook['is_ssl_verified'],
'json' => [
'action' => $action,
- 'payload' => $payload
- ]
+ 'payload' => $payload,
+ ],
]);
} catch (Throwable $e) {
log_message(
@@ -87,7 +87,7 @@ class Webhooks_client
'Webhooks Client - The webhook (' .
($webhook['id'] ?? null) .
') request received an unexpected exception: ' .
- $e->getMessage()
+ $e->getMessage(),
);
log_message('error', $e->getTraceAsString());
}
diff --git a/application/migrations/001_specific_calendar_sync.php b/application/migrations/001_specific_calendar_sync.php
index f71ffe18..9b29f20e 100644
--- a/application/migrations/001_specific_calendar_sync.php
+++ b/application/migrations/001_specific_calendar_sync.php
@@ -28,55 +28,55 @@ class Migration_Specific_calendar_sync extends EA_Migration
'type' => 'BIGINT',
'constraint' => '20',
'unsigned' => true,
- 'auto_increment' => true
+ 'auto_increment' => true,
],
'book_datetime' => [
'type' => 'DATETIME',
- 'null' => true
+ 'null' => true,
],
'start_datetime' => [
'type' => 'DATETIME',
- 'null' => true
+ 'null' => true,
],
'end_datetime' => [
'type' => 'DATETIME',
- 'null' => true
+ 'null' => true,
],
'notes' => [
'type' => 'TEXT',
- 'null' => true
+ 'null' => true,
],
'hash' => [
'type' => 'TEXT',
- 'null' => true
+ 'null' => true,
],
'is_unavailability' => [
'type' => 'TINYINT',
'constraint' => '4',
- 'default' => '0'
+ 'default' => '0',
],
'id_users_provider' => [
'type' => 'BIGINT',
'constraint' => '20',
'unsigned' => true,
- 'null' => true
+ 'null' => true,
],
'id_users_customer' => [
'type' => 'BIGINT',
'constraint' => '20',
'unsigned' => true,
- 'null' => true
+ 'null' => true,
],
'id_services' => [
'type' => 'BIGINT',
'constraint' => '20',
'unsigned' => true,
- 'null' => true
+ 'null' => true,
],
'id_google_calendar' => [
'type' => 'TEXT',
- 'null' => true
- ]
+ 'null' => true,
+ ],
]);
$this->dbforge->add_key('id', true);
$this->dbforge->add_key('id_users_provider');
@@ -89,53 +89,53 @@ class Migration_Specific_calendar_sync extends EA_Migration
'type' => 'BIGINT',
'constraint' => '20',
'unsigned' => true,
- 'auto_increment' => true
+ 'auto_increment' => true,
],
'name' => [
'type' => 'VARCHAR',
'constraint' => '256',
- 'null' => true
+ 'null' => true,
],
'slug' => [
'type' => 'VARCHAR',
'constraint' => '256',
- 'null' => true
+ 'null' => true,
],
'is_admin' => [
'type' => 'TINYINT',
'constraint' => '4',
- 'null' => true
+ 'null' => true,
],
'appointments' => [
'type' => 'INT',
'constraint' => '4',
- 'null' => true
+ 'null' => true,
],
'customers' => [
'type' => 'INT',
'constraint' => '4',
- 'null' => true
+ 'null' => true,
],
'services' => [
'type' => 'INT',
'constraint' => '4',
- 'null' => true
+ 'null' => true,
],
'users' => [
'type' => 'INT',
'constraint' => '4',
- 'null' => true
+ 'null' => true,
],
'system_settings' => [
'type' => 'INT',
'constraint' => '4',
- 'null' => true
+ 'null' => true,
],
'user_settings' => [
'type' => 'INT',
'constraint' => '4',
- 'null' => true
- ]
+ 'null' => true,
+ ],
]);
$this->dbforge->add_key('id', true);
$this->dbforge->create_table('roles', true, ['engine' => 'InnoDB']);
@@ -144,13 +144,13 @@ class Migration_Specific_calendar_sync extends EA_Migration
'id_users_secretary' => [
'type' => 'BIGINT',
'constraint' => '20',
- 'unsigned' => true
+ 'unsigned' => true,
],
'id_users_provider' => [
'type' => 'BIGINT',
'constraint' => '20',
- 'unsigned' => true
- ]
+ 'unsigned' => true,
+ ],
]);
$this->dbforge->add_key('id_users_secretary', true);
$this->dbforge->add_key('id_users_provider', true);
@@ -161,38 +161,38 @@ class Migration_Specific_calendar_sync extends EA_Migration
'type' => 'BIGINT',
'constraint' => '20',
'unsigned' => true,
- 'auto_increment' => true
+ 'auto_increment' => true,
],
'name' => [
'type' => 'VARCHAR',
'constraint' => '256',
- 'null' => true
+ 'null' => true,
],
'duration' => [
'type' => 'INT',
'constraint' => '11',
- 'null' => true
+ 'null' => true,
],
'price' => [
'type' => 'DECIMAL',
'constraint' => '10,2',
- 'null' => true
+ 'null' => true,
],
'currency' => [
'type' => 'VARCHAR',
'constraint' => '32',
- 'null' => true
+ 'null' => true,
],
'description' => [
'type' => 'TEXT',
- 'null' => true
+ 'null' => true,
],
'id_service_categories' => [
'type' => 'BIGINT',
'constraint' => '20',
'unsigned' => true,
- 'null' => true
- ]
+ 'null' => true,
+ ],
]);
$this->dbforge->add_key('id', true);
$this->dbforge->add_key('id_service_categories');
@@ -202,13 +202,13 @@ class Migration_Specific_calendar_sync extends EA_Migration
'id_users' => [
'type' => 'BIGINT',
'constraint' => '20',
- 'unsigned' => true
+ 'unsigned' => true,
],
'id_services' => [
'type' => 'BIGINT',
'constraint' => '20',
- 'unsigned' => true
- ]
+ 'unsigned' => true,
+ ],
]);
$this->dbforge->add_key('id_users', true);
$this->dbforge->add_key('id_services', true);
@@ -219,17 +219,17 @@ class Migration_Specific_calendar_sync extends EA_Migration
'type' => 'BIGINT',
'constraint' => '20',
'unsigned' => true,
- 'auto_increment' => true
+ 'auto_increment' => true,
],
'name' => [
'type' => 'VARCHAR',
'constraint' => '256',
- 'null' => true
+ 'null' => true,
],
'description' => [
'type' => 'TEXT',
- 'null' => true
- ]
+ 'null' => true,
+ ],
]);
$this->dbforge->add_key('id', true);
$this->dbforge->add_key('id_service_categories');
@@ -240,17 +240,17 @@ class Migration_Specific_calendar_sync extends EA_Migration
'type' => 'BIGINT',
'constraint' => '20',
'unsigned' => true,
- 'auto_increment' => true
+ 'auto_increment' => true,
],
'name' => [
'type' => 'VARCHAR',
'constraint' => '512',
- 'null' => true
+ 'null' => true,
],
'value' => [
'type' => 'LONGTEXT',
- 'null' => true
- ]
+ 'null' => true,
+ ],
]);
$this->dbforge->add_key('id', true);
$this->dbforge->create_table('settings', true, ['engine' => 'InnoDB']);
@@ -260,62 +260,62 @@ class Migration_Specific_calendar_sync extends EA_Migration
'type' => 'BIGINT',
'constraint' => '20',
'unsigned' => true,
- 'auto_increment' => true
+ 'auto_increment' => true,
],
'first_name' => [
'type' => 'VARCHAR',
'constraint' => '256',
- 'null' => true
+ 'null' => true,
],
'last_name' => [
'type' => 'VARCHAR',
'constraint' => '512',
- 'null' => true
+ 'null' => true,
],
'email' => [
'type' => 'VARCHAR',
'constraint' => '512',
- 'null' => true
+ 'null' => true,
],
'mobile_number' => [
'type' => 'VARCHAR',
'constraint' => '128',
- 'null' => true
+ 'null' => true,
],
'phone_number' => [
'type' => 'VARCHAR',
'constraint' => '128',
- 'null' => true
+ 'null' => true,
],
'address' => [
'type' => 'VARCHAR',
'constraint' => '256',
- 'null' => true
+ 'null' => true,
],
'city' => [
'type' => 'VARCHAR',
'constraint' => '256',
- 'null' => true
+ 'null' => true,
],
'state' => [
'type' => 'VARCHAR',
'constraint' => '128',
- 'null' => true
+ 'null' => true,
],
'zip_code' => [
'type' => 'VARCHAR',
'constraint' => '64',
- 'null' => true
+ 'null' => true,
],
'notes' => [
'type' => 'TEXT',
- 'null' => true
+ 'null' => true,
],
'id_roles' => [
'type' => 'BIGINT',
'constraint' => '20',
- 'unsigned' => true
- ]
+ 'unsigned' => true,
+ ],
]);
$this->dbforge->add_key('id', true);
$this->dbforge->add_key('id_roles');
@@ -325,58 +325,58 @@ class Migration_Specific_calendar_sync extends EA_Migration
'id_users' => [
'type' => 'BIGINT',
'constraint' => '20',
- 'unsigned' => true
+ 'unsigned' => true,
],
'username' => [
'type' => 'VARCHAR',
'constraint' => '256',
- 'null' => true
+ 'null' => true,
],
'password' => [
'type' => 'VARCHAR',
'constraint' => '512',
- 'null' => true
+ 'null' => true,
],
'salt' => [
'type' => 'VARCHAR',
'constraint' => '512',
- 'null' => true
+ 'null' => true,
],
'working_plan' => [
'type' => 'TEXT',
- 'null' => true
+ 'null' => true,
],
'notifications' => [
'type' => 'TINYINT',
'constraint' => '4',
- 'null' => true
+ 'null' => true,
],
'google_sync' => [
'type' => 'TINYINT',
'constraint' => '4',
- 'null' => true
+ 'null' => true,
],
'google_token' => [
'type' => 'TEXT',
- 'null' => true
+ 'null' => true,
],
'google_calendar' => [
'type' => 'VARCHAR',
'constraint' => '128',
- 'null' => true
+ 'null' => true,
],
'sync_past_days' => [
'type' => 'INT',
'constraint' => '11',
'null' => true,
- 'default' => '5'
+ 'default' => '5',
],
'sync_future_days' => [
'type' => 'INT',
'constraint' => '11',
'null' => true,
- 'default' => '5'
- ]
+ 'default' => '5',
+ ],
]);
$this->dbforge->add_key('id_users', true);
$this->dbforge->create_table('user_settings', true, ['engine' => 'InnoDB']);
@@ -401,7 +401,7 @@ class Migration_Specific_calendar_sync extends EA_Migration
'_ibfk_4` FOREIGN KEY (`id_users_provider`) REFERENCES `' .
$this->db->dbprefix('users') .
'` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
- '
+ ',
);
$this->db->query(
@@ -419,7 +419,7 @@ class Migration_Specific_calendar_sync extends EA_Migration
'_2` FOREIGN KEY (`id_users_provider`) REFERENCES `' .
$this->db->dbprefix('users') .
'` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
- '
+ ',
);
$this->db->query(
@@ -432,7 +432,7 @@ class Migration_Specific_calendar_sync extends EA_Migration
'_ibfk_1` FOREIGN KEY (`id_service_categories`) REFERENCES `' .
$this->db->dbprefix('service_categories') .
'` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;
- '
+ ',
);
$this->db->query(
@@ -450,7 +450,7 @@ class Migration_Specific_calendar_sync extends EA_Migration
'_ibfk_2` FOREIGN KEY (`id_services`) REFERENCES `' .
$this->db->dbprefix('services') .
'` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
- '
+ ',
);
$this->db->query(
@@ -463,7 +463,7 @@ class Migration_Specific_calendar_sync extends EA_Migration
'_ibfk_1` FOREIGN KEY (`id_roles`) REFERENCES `' .
$this->db->dbprefix('roles') .
'` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
- '
+ ',
);
$this->db->query(
@@ -477,7 +477,7 @@ class Migration_Specific_calendar_sync extends EA_Migration
$this->db->dbprefix('users') .
'` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
- '
+ ',
);
$this->db->insert('roles', [
@@ -489,7 +489,7 @@ class Migration_Specific_calendar_sync extends EA_Migration
'services' => 15,
'users' => 15,
'system_settings' => 15,
- 'user_settings' => 15
+ 'user_settings' => 15,
]);
$this->db->insert('roles', [
@@ -501,7 +501,7 @@ class Migration_Specific_calendar_sync extends EA_Migration
'services' => 0,
'users' => 0,
'system_settings' => 0,
- 'user_settings' => 15
+ 'user_settings' => 15,
]);
$this->db->insert('roles', [
@@ -513,7 +513,7 @@ class Migration_Specific_calendar_sync extends EA_Migration
'services' => 0,
'users' => 0,
'system_settings' => 0,
- 'user_settings' => 0
+ 'user_settings' => 0,
]);
$this->db->insert('roles', [
@@ -525,18 +525,18 @@ class Migration_Specific_calendar_sync extends EA_Migration
'services' => 0,
'users' => 0,
'system_settings' => 0,
- 'user_settings' => 15
+ 'user_settings' => 15,
]);
$this->db->insert('settings', [
'name' => 'company_working_plan',
'value' =>
- '{"monday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"tuesday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"wednesday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"thursday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"friday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"saturday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"sunday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]}}'
+ '{"monday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"tuesday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"wednesday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"thursday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"friday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"saturday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]},"sunday":{"start":"09:00","end":"18:00","breaks":[{"start":"14:30","end":"15:00"}]}}',
]);
$this->db->insert('settings', [
'name' => 'book_advance_timeout',
- 'value' => '30'
+ 'value' => '30',
]);
}
@@ -550,70 +550,70 @@ class Migration_Specific_calendar_sync extends EA_Migration
$this->db->dbprefix('appointments') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('appointments') .
- '_ibfk_2`'
+ '_ibfk_2`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('appointments') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('appointments') .
- '_ibfk_3`'
+ '_ibfk_3`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('appointments') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('appointments') .
- '_ibfk_4`'
+ '_ibfk_4`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('secretaries_providers') .
'` DROP FOREIGN KEY `fk_' .
$this->db->dbprefix('secretaries_providers') .
- '_1`'
+ '_1`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('secretaries_providers') .
'` DROP FOREIGN KEY `fk_' .
$this->db->dbprefix('secretaries_providers') .
- '_2`'
+ '_2`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('services_providers') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('services_providers') .
- '_ibfk_1`'
+ '_ibfk_1`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('services_providers') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('services_providers') .
- '_ibfk_2`'
+ '_ibfk_2`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('services') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('services') .
- '_ibfk_1`'
+ '_ibfk_1`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('users') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('users') .
- '_ibfk_1`'
+ '_ibfk_1`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('user_settings') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('user_settings') .
- '_ibfk_1`'
+ '_ibfk_1`',
);
$this->dbforge->drop_table('appointments');
diff --git a/application/migrations/002_add_google_analytics_setting.php b/application/migrations/002_add_google_analytics_setting.php
index fb93bdca..f7e30263 100644
--- a/application/migrations/002_add_google_analytics_setting.php
+++ b/application/migrations/002_add_google_analytics_setting.php
@@ -23,7 +23,7 @@ class Migration_Add_google_analytics_setting extends EA_Migration
if (!$this->db->get_where('settings', ['name' => 'google_analytics_code'])->num_rows()) {
$this->db->insert('settings', [
'name' => 'google_analytics_code',
- 'value' => ''
+ 'value' => '',
]);
}
}
diff --git a/application/migrations/003_add_customer_notifications_setting.php b/application/migrations/003_add_customer_notifications_setting.php
index ea86bbdb..149fd99f 100644
--- a/application/migrations/003_add_customer_notifications_setting.php
+++ b/application/migrations/003_add_customer_notifications_setting.php
@@ -23,7 +23,7 @@ class Migration_Add_customer_notifications_setting extends EA_Migration
if (!$this->db->get_where('settings', ['name' => 'customer_notifications'])->num_rows()) {
$this->db->insert('settings', [
'name' => 'customer_notifications',
- 'value' => '1'
+ 'value' => '1',
]);
}
}
diff --git a/application/migrations/004_add_date_format_setting.php b/application/migrations/004_add_date_format_setting.php
index b5594678..44a8b17f 100644
--- a/application/migrations/004_add_date_format_setting.php
+++ b/application/migrations/004_add_date_format_setting.php
@@ -23,7 +23,7 @@ class Migration_Add_date_format_setting extends EA_Migration
if (!$this->db->get_where('settings', ['name' => 'date_format'])->num_rows()) {
$this->db->insert('settings', [
'name' => 'date_format',
- 'value' => 'DMY'
+ 'value' => 'DMY',
]);
}
}
diff --git a/application/migrations/005_add_require_captcha_setting.php b/application/migrations/005_add_require_captcha_setting.php
index c27ccb1f..a8f4355f 100644
--- a/application/migrations/005_add_require_captcha_setting.php
+++ b/application/migrations/005_add_require_captcha_setting.php
@@ -23,7 +23,7 @@ class Migration_Add_require_captcha_setting extends EA_Migration
if (!$this->db->get_where('settings', ['name' => 'require_captcha'])->num_rows()) {
$this->db->insert('settings', [
'name' => 'require_captcha',
- 'value' => '0'
+ 'value' => '0',
]);
}
}
diff --git a/application/migrations/006_add_calendar_view_setting.php b/application/migrations/006_add_calendar_view_setting.php
index 6d87a9e0..848ac74c 100644
--- a/application/migrations/006_add_calendar_view_setting.php
+++ b/application/migrations/006_add_calendar_view_setting.php
@@ -23,8 +23,8 @@ class Migration_Add_calendar_view_setting extends EA_Migration
'calendar_view' => [
'type' => 'VARCHAR',
'constraint' => '32',
- 'default' => 'default'
- ]
+ 'default' => 'default',
+ ],
];
$this->dbforge->add_column('user_settings', $fields);
diff --git a/application/migrations/007_add_service_availabilities_type.php b/application/migrations/007_add_service_availabilities_type.php
index 1399d78d..33e21e8e 100644
--- a/application/migrations/007_add_service_availabilities_type.php
+++ b/application/migrations/007_add_service_availabilities_type.php
@@ -24,8 +24,8 @@ class Migration_Add_service_availabilities_type extends EA_Migration
'type' => 'VARCHAR',
'constraint' => '32',
'default' => 'flexible',
- 'after' => 'description'
- ]
+ 'after' => 'description',
+ ],
];
$this->dbforge->add_column('services', $fields);
diff --git a/application/migrations/008_add_service_attendants_number.php b/application/migrations/008_add_service_attendants_number.php
index 6b5d38b4..21aca2c4 100644
--- a/application/migrations/008_add_service_attendants_number.php
+++ b/application/migrations/008_add_service_attendants_number.php
@@ -24,8 +24,8 @@ class Migration_Add_service_attendants_number extends EA_Migration
'type' => 'INT',
'constraint' => '11',
'default' => '1',
- 'after' => 'availabilities_type'
- ]
+ 'after' => 'availabilities_type',
+ ],
];
$this->dbforge->add_column('services', $fields);
diff --git a/application/migrations/009_change_column_types.php b/application/migrations/009_change_column_types.php
index 24fc2c50..3c803c12 100644
--- a/application/migrations/009_change_column_types.php
+++ b/application/migrations/009_change_column_types.php
@@ -24,70 +24,70 @@ class Migration_Change_column_types extends EA_Migration
$this->db->dbprefix('appointments') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('appointments') .
- '_ibfk_2`'
+ '_ibfk_2`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('appointments') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('appointments') .
- '_ibfk_3`'
+ '_ibfk_3`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('appointments') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('appointments') .
- '_ibfk_4`'
+ '_ibfk_4`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('secretaries_providers') .
'` DROP FOREIGN KEY `fk_' .
$this->db->dbprefix('secretaries_providers') .
- '_1`'
+ '_1`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('secretaries_providers') .
'` DROP FOREIGN KEY `fk_' .
$this->db->dbprefix('secretaries_providers') .
- '_2`'
+ '_2`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('services_providers') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('services_providers') .
- '_ibfk_1`'
+ '_ibfk_1`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('services_providers') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('services_providers') .
- '_ibfk_2`'
+ '_ibfk_2`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('services') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('services') .
- '_ibfk_1`'
+ '_ibfk_1`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('users') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('users') .
- '_ibfk_1`'
+ '_ibfk_1`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('user_settings') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('user_settings') .
- '_ibfk_1`'
+ '_ibfk_1`',
);
// Appointments
@@ -96,23 +96,23 @@ class Migration_Change_column_types extends EA_Migration
'name' => 'id',
'type' => 'int',
'constraint' => '11',
- 'auto_increment' => true
+ 'auto_increment' => true,
],
'id_users_provider' => [
'name' => 'id_users_provider',
'type' => 'int',
- 'constraint' => '11'
+ 'constraint' => '11',
],
'id_users_customer' => [
'name' => 'id_users_customer',
'type' => 'int',
- 'constraint' => '11'
+ 'constraint' => '11',
],
'id_services' => [
'name' => 'id_services',
'type' => 'int',
- 'constraint' => '11'
- ]
+ 'constraint' => '11',
+ ],
];
$this->dbforge->modify_column('appointments', $fields);
@@ -123,38 +123,38 @@ class Migration_Change_column_types extends EA_Migration
'name' => 'id',
'type' => 'int',
'constraint' => '11',
- 'auto_increment' => true
+ 'auto_increment' => true,
],
'appointments' => [
'name' => 'appointments',
'type' => 'int',
- 'constraint' => '11'
+ 'constraint' => '11',
],
'customers' => [
'name' => 'customers',
'type' => 'int',
- 'constraint' => '11'
+ 'constraint' => '11',
],
'services' => [
'name' => 'services',
'type' => 'int',
- 'constraint' => '11'
+ 'constraint' => '11',
],
'users' => [
'name' => 'users',
'type' => 'int',
- 'constraint' => '11'
+ 'constraint' => '11',
],
'system_settings' => [
'name' => 'system_settings',
'type' => 'int',
- 'constraint' => '11'
+ 'constraint' => '11',
],
'user_settings' => [
'name' => 'user_settings',
'type' => 'int',
- 'constraint' => '11'
- ]
+ 'constraint' => '11',
+ ],
];
$this->dbforge->modify_column('roles', $fields);
@@ -164,13 +164,13 @@ class Migration_Change_column_types extends EA_Migration
'id_users_secretary' => [
'name' => 'id_users_secretary',
'type' => 'int',
- 'constraint' => '11'
+ 'constraint' => '11',
],
'id_users_provider' => [
'name' => 'id_users_provider',
'type' => 'int',
- 'constraint' => '11'
- ]
+ 'constraint' => '11',
+ ],
];
$this->dbforge->modify_column('secretaries_providers', $fields);
@@ -181,13 +181,13 @@ class Migration_Change_column_types extends EA_Migration
'name' => 'id',
'type' => 'int',
'constraint' => '11',
- 'auto_increment' => true
+ 'auto_increment' => true,
],
'id_service_categories' => [
'name' => 'id_service_categories',
'type' => 'int',
- 'constraint' => '11'
- ]
+ 'constraint' => '11',
+ ],
];
$this->dbforge->modify_column('services', $fields);
@@ -197,13 +197,13 @@ class Migration_Change_column_types extends EA_Migration
'id_users' => [
'name' => 'id_users',
'type' => 'int',
- 'constraint' => '11'
+ 'constraint' => '11',
],
'id_services' => [
'name' => 'id_services',
'type' => 'int',
- 'constraint' => '11'
- ]
+ 'constraint' => '11',
+ ],
];
$this->dbforge->modify_column('services_providers', $fields);
@@ -214,8 +214,8 @@ class Migration_Change_column_types extends EA_Migration
'name' => 'id',
'type' => 'int',
'constraint' => '11',
- 'auto_increment' => true
- ]
+ 'auto_increment' => true,
+ ],
];
$this->dbforge->modify_column('service_categories', $fields);
@@ -226,8 +226,8 @@ class Migration_Change_column_types extends EA_Migration
'name' => 'id',
'type' => 'int',
'constraint' => '11',
- 'auto_increment' => true
- ]
+ 'auto_increment' => true,
+ ],
];
$this->dbforge->modify_column('settings', $fields);
@@ -238,13 +238,13 @@ class Migration_Change_column_types extends EA_Migration
'name' => 'id',
'type' => 'int',
'constraint' => '11',
- 'auto_increment' => true
+ 'auto_increment' => true,
],
'id_roles' => [
'name' => 'id_roles',
'type' => 'int',
- 'constraint' => '11'
- ]
+ 'constraint' => '11',
+ ],
];
$this->dbforge->modify_column('users', $fields);
@@ -254,8 +254,8 @@ class Migration_Change_column_types extends EA_Migration
'id_users' => [
'name' => 'id_users',
'type' => 'int',
- 'constraint' => '11'
- ]
+ 'constraint' => '11',
+ ],
];
$this->dbforge->modify_column('user_settings', $fields);
@@ -279,7 +279,7 @@ class Migration_Change_column_types extends EA_Migration
$this->db->dbprefix('appointments') .
'_ibfk_4` FOREIGN KEY (`id_users_provider`) REFERENCES `' .
$this->db->dbprefix('users') .
- '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE'
+ '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE',
);
$this->db->query(
@@ -295,7 +295,7 @@ class Migration_Change_column_types extends EA_Migration
$this->db->dbprefix('secretaries_providers') .
'_2` FOREIGN KEY (`id_users_provider`) REFERENCES `' .
$this->db->dbprefix('users') .
- '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE'
+ '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE',
);
$this->db->query(
@@ -306,7 +306,7 @@ class Migration_Change_column_types extends EA_Migration
$this->db->dbprefix('services') .
'_ibfk_1` FOREIGN KEY (`id_service_categories`) REFERENCES `' .
$this->db->dbprefix('service_categories') .
- '` (`id`) ON DELETE SET NULL ON UPDATE CASCADE'
+ '` (`id`) ON DELETE SET NULL ON UPDATE CASCADE',
);
$this->db->query(
@@ -322,7 +322,7 @@ class Migration_Change_column_types extends EA_Migration
$this->db->dbprefix('services_providers') .
'_ibfk_2` FOREIGN KEY (`id_services`) REFERENCES `' .
$this->db->dbprefix('services') .
- '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE'
+ '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE',
);
$this->db->query(
@@ -333,7 +333,7 @@ class Migration_Change_column_types extends EA_Migration
$this->db->dbprefix('users') .
'_ibfk_1` FOREIGN KEY (`id_roles`) REFERENCES `' .
$this->db->dbprefix('roles') .
- '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE'
+ '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE',
);
$this->db->query(
@@ -344,12 +344,12 @@ class Migration_Change_column_types extends EA_Migration
$this->db->dbprefix('user_settings') .
'_ibfk_1` FOREIGN KEY (`id_users`) REFERENCES `' .
$this->db->dbprefix('users') .
- '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE'
+ '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE',
);
// Change charset of ' . $this->db->dbprefix('secretaries_providers') . ' table for databases created with EA! 1.2.1 version
$this->db->query(
- 'ALTER TABLE ' . $this->db->dbprefix('secretaries_providers') . ' CONVERT TO CHARACTER SET utf8'
+ 'ALTER TABLE ' . $this->db->dbprefix('secretaries_providers') . ' CONVERT TO CHARACTER SET utf8',
);
}
@@ -364,70 +364,70 @@ class Migration_Change_column_types extends EA_Migration
$this->db->dbprefix('appointments') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('appointments') .
- '_ibfk_2`'
+ '_ibfk_2`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('appointments') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('appointments') .
- '_ibfk_3`'
+ '_ibfk_3`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('appointments') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('appointments') .
- '_ibfk_4`'
+ '_ibfk_4`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('secretaries_providers') .
'` DROP FOREIGN KEY `fk_' .
$this->db->dbprefix('secretaries_providers') .
- '_1`'
+ '_1`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('secretaries_providers') .
'` DROP FOREIGN KEY `fk_' .
$this->db->dbprefix('secretaries_providers') .
- '_2`'
+ '_2`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('services_providers') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('services_providers') .
- '_ibfk_1`'
+ '_ibfk_1`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('services_providers') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('services_providers') .
- '_ibfk_2`'
+ '_ibfk_2`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('services') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('services') .
- '_ibfk_1`'
+ '_ibfk_1`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('users') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('users') .
- '_ibfk_1`'
+ '_ibfk_1`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('user_settings') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('user_settings') .
- '_ibfk_1`'
+ '_ibfk_1`',
);
// Appointments
@@ -436,23 +436,23 @@ class Migration_Change_column_types extends EA_Migration
'name' => 'id',
'type' => 'bigint',
'constraint' => '20',
- 'auto_increment' => true
+ 'auto_increment' => true,
],
'id_users_provider' => [
'name' => 'id_users_provider',
'type' => 'bigint',
- 'constraint' => '20'
+ 'constraint' => '20',
],
'id_users_customer' => [
'name' => 'id_users_customer',
'type' => 'bigint',
- 'constraint' => '20'
+ 'constraint' => '20',
],
'id_services' => [
'name' => 'id_services',
'type' => 'bigint',
- 'constraint' => '20'
- ]
+ 'constraint' => '20',
+ ],
];
$this->dbforge->modify_column('appointments', $fields);
@@ -463,38 +463,38 @@ class Migration_Change_column_types extends EA_Migration
'name' => 'id',
'type' => 'bigint',
'constraint' => '20',
- 'auto_increment' => true
+ 'auto_increment' => true,
],
'appointments' => [
'name' => 'appointments',
'type' => 'bigint',
- 'constraint' => '20'
+ 'constraint' => '20',
],
'customers' => [
'name' => 'customers',
'type' => 'bigint',
- 'constraint' => '20'
+ 'constraint' => '20',
],
'services' => [
'name' => 'services',
'type' => 'bigint',
- 'constraint' => '20'
+ 'constraint' => '20',
],
'users' => [
'name' => 'users',
'type' => 'bigint',
- 'constraint' => '20'
+ 'constraint' => '20',
],
'system_settings' => [
'name' => 'system_settings',
'type' => 'bigint',
- 'constraint' => '20'
+ 'constraint' => '20',
],
'user_settings' => [
'name' => 'user_settings',
'type' => 'bigint',
- 'constraint' => '20'
- ]
+ 'constraint' => '20',
+ ],
];
$this->dbforge->modify_column('roles', $fields);
@@ -504,13 +504,13 @@ class Migration_Change_column_types extends EA_Migration
'id_users_secretary' => [
'name' => 'id_users_secretary',
'type' => 'bigint',
- 'constraint' => '20'
+ 'constraint' => '20',
],
'id_users_provider' => [
'name' => 'id_users_provider',
'type' => 'bigint',
- 'constraint' => '20'
- ]
+ 'constraint' => '20',
+ ],
];
$this->dbforge->modify_column('secretaries_providers', $fields);
@@ -521,13 +521,13 @@ class Migration_Change_column_types extends EA_Migration
'name' => 'id',
'type' => 'bigint',
'constraint' => '20',
- 'auto_increment' => true
+ 'auto_increment' => true,
],
'id_service_categories' => [
'name' => 'id_service_categories',
'type' => 'bigint',
- 'constraint' => '20'
- ]
+ 'constraint' => '20',
+ ],
];
$this->dbforge->modify_column('services', $fields);
@@ -537,13 +537,13 @@ class Migration_Change_column_types extends EA_Migration
'id_users' => [
'name' => 'id_users',
'type' => 'bigint',
- 'constraint' => '20'
+ 'constraint' => '20',
],
'id_services' => [
'name' => 'id_services',
'type' => 'bigint',
- 'constraint' => '20'
- ]
+ 'constraint' => '20',
+ ],
];
$this->dbforge->modify_column('services_providers', $fields);
@@ -554,8 +554,8 @@ class Migration_Change_column_types extends EA_Migration
'name' => 'id',
'type' => 'bigint',
'constraint' => '20',
- 'auto_increment' => true
- ]
+ 'auto_increment' => true,
+ ],
];
$this->dbforge->modify_column('service_categories', $fields);
@@ -566,8 +566,8 @@ class Migration_Change_column_types extends EA_Migration
'name' => 'id',
'type' => 'bigint',
'constraint' => '20',
- 'auto_increment' => true
- ]
+ 'auto_increment' => true,
+ ],
];
$this->dbforge->modify_column('settings', $fields);
@@ -578,13 +578,13 @@ class Migration_Change_column_types extends EA_Migration
'name' => 'id',
'type' => 'bigint',
'constraint' => '20',
- 'auto_increment' => true
+ 'auto_increment' => true,
],
'id_roles' => [
'name' => 'id_roles',
'type' => 'bigint',
- 'constraint' => '20'
- ]
+ 'constraint' => '20',
+ ],
];
$this->dbforge->modify_column('users', $fields);
@@ -594,8 +594,8 @@ class Migration_Change_column_types extends EA_Migration
'id_users' => [
'name' => 'id_users',
'type' => 'bigint',
- 'constraint' => '20'
- ]
+ 'constraint' => '20',
+ ],
];
$this->dbforge->modify_column('user_settings', $fields);
@@ -619,7 +619,7 @@ class Migration_Change_column_types extends EA_Migration
$this->db->dbprefix('appointments') .
'_ibfk_4` FOREIGN KEY (`id_users_provider`) REFERENCES `' .
$this->db->dbprefix('users') .
- '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE'
+ '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE',
);
$this->db->query(
@@ -635,7 +635,7 @@ class Migration_Change_column_types extends EA_Migration
$this->db->dbprefix('secretaries_providers') .
'_2` FOREIGN KEY (`id_users_provider`) REFERENCES `' .
$this->db->dbprefix('users') .
- '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE'
+ '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE',
);
$this->db->query(
@@ -646,7 +646,7 @@ class Migration_Change_column_types extends EA_Migration
$this->db->dbprefix('services') .
'_ibfk_1` FOREIGN KEY (`id_service_categories`) REFERENCES `' .
$this->db->dbprefix('service_categories') .
- '` (`id`) ON DELETE SET NULL ON UPDATE CASCADE'
+ '` (`id`) ON DELETE SET NULL ON UPDATE CASCADE',
);
$this->db->query(
@@ -662,7 +662,7 @@ class Migration_Change_column_types extends EA_Migration
$this->db->dbprefix('services_providers') .
'_ibfk_2` FOREIGN KEY (`id_services`) REFERENCES `' .
$this->db->dbprefix('services') .
- '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE'
+ '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE',
);
$this->db->query(
@@ -673,7 +673,7 @@ class Migration_Change_column_types extends EA_Migration
$this->db->dbprefix('users') .
'_ibfk_1` FOREIGN KEY (`id_roles`) REFERENCES `' .
$this->db->dbprefix('roles') .
- '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE'
+ '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE',
);
$this->db->query(
@@ -684,7 +684,7 @@ class Migration_Change_column_types extends EA_Migration
$this->db->dbprefix('user_settings') .
'_ibfk_1` FOREIGN KEY (`id_users`) REFERENCES `' .
$this->db->dbprefix('users') .
- '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE'
+ '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE',
);
}
}
diff --git a/application/migrations/010_add_time_format_setting.php b/application/migrations/010_add_time_format_setting.php
index 595ba67f..59413ed1 100644
--- a/application/migrations/010_add_time_format_setting.php
+++ b/application/migrations/010_add_time_format_setting.php
@@ -21,7 +21,7 @@ class Migration_Add_time_format_setting extends EA_Migration
if (!$this->db->get_where('settings', ['name' => 'time_format'])->num_rows()) {
$this->db->insert('settings', [
'name' => 'time_format',
- 'value' => 'regular'
+ 'value' => 'regular',
]);
}
}
diff --git a/application/migrations/011_remove_prefix_from_fkey_constraints.php b/application/migrations/011_remove_prefix_from_fkey_constraints.php
index 5f9257a5..4c8d3a36 100644
--- a/application/migrations/011_remove_prefix_from_fkey_constraints.php
+++ b/application/migrations/011_remove_prefix_from_fkey_constraints.php
@@ -24,70 +24,70 @@ class Migration_Remove_prefix_from_fkey_constraints extends EA_Migration
$this->db->dbprefix('appointments') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('appointments') .
- '_ibfk_2`'
+ '_ibfk_2`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('appointments') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('appointments') .
- '_ibfk_3`'
+ '_ibfk_3`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('appointments') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('appointments') .
- '_ibfk_4`'
+ '_ibfk_4`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('secretaries_providers') .
'` DROP FOREIGN KEY `fk_' .
$this->db->dbprefix('secretaries_providers') .
- '_1`'
+ '_1`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('secretaries_providers') .
'` DROP FOREIGN KEY `fk_' .
$this->db->dbprefix('secretaries_providers') .
- '_2`'
+ '_2`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('services_providers') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('services_providers') .
- '_ibfk_1`'
+ '_ibfk_1`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('services_providers') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('services_providers') .
- '_ibfk_2`'
+ '_ibfk_2`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('services') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('services') .
- '_ibfk_1`'
+ '_ibfk_1`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('users') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('users') .
- '_ibfk_1`'
+ '_ibfk_1`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('user_settings') .
'` DROP FOREIGN KEY `' .
$this->db->dbprefix('user_settings') .
- '_ibfk_1`'
+ '_ibfk_1`',
);
// Add table constraints again without the "ea" prefix.
@@ -109,7 +109,7 @@ class Migration_Remove_prefix_from_fkey_constraints extends EA_Migration
$this->db->dbprefix('users') .
'` (`id`)
ON DELETE CASCADE
- ON UPDATE CASCADE'
+ ON UPDATE CASCADE',
);
$this->db->query(
@@ -125,7 +125,7 @@ class Migration_Remove_prefix_from_fkey_constraints extends EA_Migration
$this->db->dbprefix('users') .
'` (`id`)
ON DELETE CASCADE
- ON UPDATE CASCADE'
+ ON UPDATE CASCADE',
);
$this->db->query(
@@ -136,7 +136,7 @@ class Migration_Remove_prefix_from_fkey_constraints extends EA_Migration
$this->db->dbprefix('service_categories') .
'` (`id`)
ON DELETE SET NULL
- ON UPDATE CASCADE'
+ ON UPDATE CASCADE',
);
$this->db->query(
@@ -152,7 +152,7 @@ class Migration_Remove_prefix_from_fkey_constraints extends EA_Migration
$this->db->dbprefix('services') .
'` (`id`)
ON DELETE CASCADE
- ON UPDATE CASCADE'
+ ON UPDATE CASCADE',
);
$this->db->query(
@@ -163,7 +163,7 @@ class Migration_Remove_prefix_from_fkey_constraints extends EA_Migration
$this->db->dbprefix('roles') .
'` (`id`)
ON DELETE CASCADE
- ON UPDATE CASCADE'
+ ON UPDATE CASCADE',
);
$this->db->query(
@@ -174,7 +174,7 @@ class Migration_Remove_prefix_from_fkey_constraints extends EA_Migration
$this->db->dbprefix('users') .
'` (`id`)
ON DELETE CASCADE
- ON UPDATE CASCADE'
+ ON UPDATE CASCADE',
);
}
@@ -185,40 +185,40 @@ class Migration_Remove_prefix_from_fkey_constraints extends EA_Migration
{
// Drop table constraints.
$this->db->query(
- 'ALTER TABLE `' . $this->db->dbprefix('appointments') . '` DROP FOREIGN KEY `appointments_services`'
+ 'ALTER TABLE `' . $this->db->dbprefix('appointments') . '` DROP FOREIGN KEY `appointments_services`',
);
$this->db->query(
- 'ALTER TABLE `' . $this->db->dbprefix('appointments') . '` DROP FOREIGN KEY `appointments_users_customer`'
+ 'ALTER TABLE `' . $this->db->dbprefix('appointments') . '` DROP FOREIGN KEY `appointments_users_customer`',
);
$this->db->query(
- 'ALTER TABLE `' . $this->db->dbprefix('appointments') . '` DROP FOREIGN KEY `appointments_users_provider`'
+ 'ALTER TABLE `' . $this->db->dbprefix('appointments') . '` DROP FOREIGN KEY `appointments_users_provider`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('secretaries_providers') .
- '` DROP FOREIGN KEY `secretaries_users_secretary`'
+ '` DROP FOREIGN KEY `secretaries_users_secretary`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('secretaries_providers') .
- '` DROP FOREIGN KEY `secretaries_users_provider`'
+ '` DROP FOREIGN KEY `secretaries_users_provider`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('services_providers') .
- '` DROP FOREIGN KEY `services_providers_users_provider`'
+ '` DROP FOREIGN KEY `services_providers_users_provider`',
);
$this->db->query(
'ALTER TABLE `' .
$this->db->dbprefix('services_providers') .
- '` DROP FOREIGN KEY `services_providers_services`'
+ '` DROP FOREIGN KEY `services_providers_services`',
);
$this->db->query(
- 'ALTER TABLE `' . $this->db->dbprefix('services') . '` DROP FOREIGN KEY `services_service_categories`'
+ 'ALTER TABLE `' . $this->db->dbprefix('services') . '` DROP FOREIGN KEY `services_service_categories`',
);
$this->db->query('ALTER TABLE `' . $this->db->dbprefix('users') . '` DROP FOREIGN KEY `users_roles`');
$this->db->query(
- 'ALTER TABLE `' . $this->db->dbprefix('user_settings') . '` DROP FOREIGN KEY `user_settings_users`'
+ 'ALTER TABLE `' . $this->db->dbprefix('user_settings') . '` DROP FOREIGN KEY `user_settings_users`',
);
// Add table constraints again.
@@ -240,7 +240,7 @@ class Migration_Remove_prefix_from_fkey_constraints extends EA_Migration
$this->db->dbprefix('appointments') .
'_ibfk_4` FOREIGN KEY (`id_users_provider`) REFERENCES `' .
$this->db->dbprefix('users') .
- '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE'
+ '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE',
);
$this->db->query(
@@ -256,7 +256,7 @@ class Migration_Remove_prefix_from_fkey_constraints extends EA_Migration
$this->db->dbprefix('secretaries_providers') .
'_2` FOREIGN KEY (`id_users_provider`) REFERENCES `' .
$this->db->dbprefix('users') .
- '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE'
+ '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE',
);
$this->db->query(
@@ -267,7 +267,7 @@ class Migration_Remove_prefix_from_fkey_constraints extends EA_Migration
$this->db->dbprefix('services') .
'_ibfk_1` FOREIGN KEY (`id_service_categories`) REFERENCES `' .
$this->db->dbprefix('service_categories') .
- '` (`id`) ON DELETE SET NULL ON UPDATE CASCADE'
+ '` (`id`) ON DELETE SET NULL ON UPDATE CASCADE',
);
$this->db->query(
@@ -283,7 +283,7 @@ class Migration_Remove_prefix_from_fkey_constraints extends EA_Migration
$this->db->dbprefix('services_providers') .
'_ibfk_2` FOREIGN KEY (`id_services`) REFERENCES `' .
$this->db->dbprefix('services') .
- '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE'
+ '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE',
);
$this->db->query(
@@ -294,7 +294,7 @@ class Migration_Remove_prefix_from_fkey_constraints extends EA_Migration
$this->db->dbprefix('users') .
'_ibfk_1` FOREIGN KEY (`id_roles`) REFERENCES `' .
$this->db->dbprefix('roles') .
- '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE'
+ '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE',
);
$this->db->query(
@@ -305,7 +305,7 @@ class Migration_Remove_prefix_from_fkey_constraints extends EA_Migration
$this->db->dbprefix('user_settings') .
'_ibfk_1` FOREIGN KEY (`id_users`) REFERENCES `' .
$this->db->dbprefix('users') .
- '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE'
+ '` (`id`) ON DELETE CASCADE ON UPDATE CASCADE',
);
}
}
diff --git a/application/migrations/012_legal_contents.php b/application/migrations/012_legal_contents.php
index 9dbdd579..7f8da9cf 100644
--- a/application/migrations/012_legal_contents.php
+++ b/application/migrations/012_legal_contents.php
@@ -21,42 +21,42 @@ class Migration_Legal_contents extends EA_Migration
if (!$this->db->get_where('settings', ['name' => 'display_cookie_notice'])->num_rows()) {
$this->db->insert('settings', [
'name' => 'display_cookie_notice',
- 'value' => '0'
+ 'value' => '0',
]);
}
if (!$this->db->get_where('settings', ['name' => 'cookie_notice_content'])->num_rows()) {
$this->db->insert('settings', [
'name' => 'cookie_notice_content',
- 'value' => 'Cookie notice content.'
+ 'value' => 'Cookie notice content.',
]);
}
if (!$this->db->get_where('settings', ['name' => 'display_terms_and_conditions'])->num_rows()) {
$this->db->insert('settings', [
'name' => 'display_terms_and_conditions',
- 'value' => '0'
+ 'value' => '0',
]);
}
if (!$this->db->get_where('settings', ['name' => 'terms_and_conditions_content'])->num_rows()) {
$this->db->insert('settings', [
'name' => 'terms_and_conditions_content',
- 'value' => 'Terms and conditions content.'
+ 'value' => 'Terms and conditions content.',
]);
}
if (!$this->db->get_where('settings', ['name' => 'display_privacy_policy'])->num_rows()) {
$this->db->insert('settings', [
'name' => 'display_privacy_policy',
- 'value' => '0'
+ 'value' => '0',
]);
}
if (!$this->db->get_where('settings', ['name' => 'privacy_policy_content'])->num_rows()) {
$this->db->insert('settings', [
'name' => 'privacy_policy_content',
- 'value' => 'Privacy policy content.'
+ 'value' => 'Privacy policy content.',
]);
}
@@ -65,41 +65,41 @@ class Migration_Legal_contents extends EA_Migration
'id' => [
'type' => 'INT',
'constraint' => 11,
- 'auto_increment' => true
+ 'auto_increment' => true,
],
'created' => [
'type' => 'TIMESTAMP',
- 'null' => true
+ 'null' => true,
],
'modified' => [
'type' => 'TIMESTAMP',
- 'null' => true
+ 'null' => true,
],
'first_name' => [
'type' => 'VARCHAR',
'constraint' => '256',
- 'null' => true
+ 'null' => true,
],
'last_name' => [
'type' => 'VARCHAR',
'constraint' => '256',
- 'null' => true
+ 'null' => true,
],
'email' => [
'type' => 'VARCHAR',
'constraint' => '512',
- 'null' => true
+ 'null' => true,
],
'ip' => [
'type' => 'VARCHAR',
'constraint' => '256',
- 'null' => true
+ 'null' => true,
],
'type' => [
'type' => 'VARCHAR',
'constraint' => '256',
- 'null' => true
- ]
+ 'null' => true,
+ ],
]);
$this->dbforge->add_key('id', true);
@@ -115,37 +115,37 @@ class Migration_Legal_contents extends EA_Migration
{
if ($this->db->get_where('settings', ['name' => 'display_cookie_notice'])->num_rows()) {
$this->db->delete('settings', [
- 'name' => 'display_cookie_notice'
+ 'name' => 'display_cookie_notice',
]);
}
if ($this->db->get_where('settings', ['name' => 'cookie_notice_content'])->num_rows()) {
$this->db->delete('settings', [
- 'name' => 'cookie_notice_content'
+ 'name' => 'cookie_notice_content',
]);
}
if ($this->db->get_where('settings', ['name' => 'display_terms_and_conditions'])->num_rows()) {
$this->db->delete('settings', [
- 'name' => 'display_terms_and_conditions'
+ 'name' => 'display_terms_and_conditions',
]);
}
if ($this->db->get_where('settings', ['name' => 'terms_and_conditions_content'])->num_rows()) {
$this->db->delete('settings', [
- 'name' => 'terms_and_conditions_content'
+ 'name' => 'terms_and_conditions_content',
]);
}
if ($this->db->get_where('settings', ['name' => 'display_privacy_policy'])->num_rows()) {
$this->db->delete('settings', [
- 'name' => 'display_privacy_policy'
+ 'name' => 'display_privacy_policy',
]);
}
if ($this->db->get_where('settings', ['name' => 'privacy_policy_content'])->num_rows()) {
$this->db->delete('settings', [
- 'name' => 'privacy_policy_content'
+ 'name' => 'privacy_policy_content',
]);
}
diff --git a/application/migrations/013_add_weekday_start_setting.php b/application/migrations/013_add_weekday_start_setting.php
index 0ac8d06b..1f6f083f 100644
--- a/application/migrations/013_add_weekday_start_setting.php
+++ b/application/migrations/013_add_weekday_start_setting.php
@@ -21,7 +21,7 @@ class Migration_Add_weekday_start_setting extends EA_Migration
if (!$this->db->get_where('settings', ['name' => 'first_weekday'])->num_rows()) {
$this->db->insert('settings', [
'name' => 'first_weekday',
- 'value' => 'sunday'
+ 'value' => 'sunday',
]);
}
}
diff --git a/application/migrations/014_create_appointment_location_column.php b/application/migrations/014_create_appointment_location_column.php
index 6c2fd6ee..4ac6a485 100644
--- a/application/migrations/014_create_appointment_location_column.php
+++ b/application/migrations/014_create_appointment_location_column.php
@@ -23,8 +23,8 @@ class Migration_Create_appointment_location_column extends EA_Migration
'location' => [
'type' => 'TEXT',
'null' => true,
- 'after' => 'end_datetime'
- ]
+ 'after' => 'end_datetime',
+ ],
];
$this->dbforge->add_column('appointments', $fields);
@@ -35,8 +35,8 @@ class Migration_Create_appointment_location_column extends EA_Migration
'location' => [
'type' => 'TEXT',
'null' => true,
- 'after' => 'description'
- ]
+ 'after' => 'description',
+ ],
];
$this->dbforge->add_column('services', $fields);
diff --git a/application/migrations/015_add_working_plan_exceptions_to_user_settings.php b/application/migrations/015_add_working_plan_exceptions_to_user_settings.php
index 62c43c56..d98abee7 100644
--- a/application/migrations/015_add_working_plan_exceptions_to_user_settings.php
+++ b/application/migrations/015_add_working_plan_exceptions_to_user_settings.php
@@ -23,8 +23,8 @@ class Migration_Add_working_plan_exceptions_to_user_settings extends EA_Migratio
'working_plan_exceptions' => [
'type' => 'TEXT',
'null' => true,
- 'after' => 'working_plan'
- ]
+ 'after' => 'working_plan',
+ ],
];
$this->dbforge->add_column('user_settings', $fields);
diff --git a/application/migrations/016_add_require_phone_number_setting.php b/application/migrations/016_add_require_phone_number_setting.php
index d5abe6bf..e65c2058 100644
--- a/application/migrations/016_add_require_phone_number_setting.php
+++ b/application/migrations/016_add_require_phone_number_setting.php
@@ -21,7 +21,7 @@ class Migration_Add_require_phone_number_setting extends EA_Migration
if (!$this->db->get_where('settings', ['name' => 'require_phone_number'])->num_rows()) {
$this->db->insert('settings', [
'name' => 'require_phone_number',
- 'value' => '1'
+ 'value' => '1',
]);
}
}
diff --git a/application/migrations/017_add_api_token_setting.php b/application/migrations/017_add_api_token_setting.php
index 34428ff6..5127b857 100644
--- a/application/migrations/017_add_api_token_setting.php
+++ b/application/migrations/017_add_api_token_setting.php
@@ -23,7 +23,7 @@ class Migration_Add_api_token_setting extends EA_Migration
if (!$this->db->get_where('settings', ['name' => 'api_token'])->num_rows()) {
$this->db->insert('settings', [
'name' => 'api_token',
- 'value' => ''
+ 'value' => '',
]);
}
}
diff --git a/application/migrations/018_add_timezone_to_users.php b/application/migrations/018_add_timezone_to_users.php
index 66cb11e5..ba978370 100644
--- a/application/migrations/018_add_timezone_to_users.php
+++ b/application/migrations/018_add_timezone_to_users.php
@@ -24,8 +24,8 @@ class Migration_Add_timezone_to_users extends EA_Migration
'type' => 'VARCHAR',
'constraint' => '256',
'default' => 'UTC',
- 'after' => 'notes'
- ]
+ 'after' => 'notes',
+ ],
];
$this->dbforge->add_column('users', $fields);
diff --git a/application/migrations/019_add_display_any_provider_setting.php b/application/migrations/019_add_display_any_provider_setting.php
index 651c57e1..a9622343 100644
--- a/application/migrations/019_add_display_any_provider_setting.php
+++ b/application/migrations/019_add_display_any_provider_setting.php
@@ -21,7 +21,7 @@ class Migration_Add_display_any_provider_setting extends EA_Migration
if (!$this->db->get_where('settings', ['name' => 'display_any_provider'])->num_rows()) {
$this->db->insert('settings', [
'name' => 'display_any_provider',
- 'value' => '1'
+ 'value' => '1',
]);
}
}
diff --git a/application/migrations/020_add_language_to_users.php b/application/migrations/020_add_language_to_users.php
index f6a326ab..6a961dad 100644
--- a/application/migrations/020_add_language_to_users.php
+++ b/application/migrations/020_add_language_to_users.php
@@ -24,8 +24,8 @@ class Migration_Add_language_to_users extends EA_Migration
'type' => 'VARCHAR',
'constraint' => '256',
'default' => 'english',
- 'after' => 'timezone'
- ]
+ 'after' => 'timezone',
+ ],
];
$this->dbforge->add_column('users', $fields);
diff --git a/application/migrations/021_modify_sync_period_columns.php b/application/migrations/021_modify_sync_period_columns.php
index eef5a670..a4c608bf 100644
--- a/application/migrations/021_modify_sync_period_columns.php
+++ b/application/migrations/021_modify_sync_period_columns.php
@@ -23,14 +23,14 @@ class Migration_Modify_sync_period_columns extends EA_Migration
'type' => 'INT',
'constraint' => '11',
'null' => true,
- 'default' => '30'
+ 'default' => '30',
],
'sync_future_days' => [
'type' => 'INT',
'constraint' => '11',
'null' => true,
- 'default' => '90'
- ]
+ 'default' => '90',
+ ],
];
$this->dbforge->modify_column('user_settings', $fields);
@@ -38,21 +38,21 @@ class Migration_Modify_sync_period_columns extends EA_Migration
$this->db->update(
'user_settings',
[
- 'sync_past_days' => '30'
+ 'sync_past_days' => '30',
],
[
- 'sync_past_days' => '5'
- ]
+ 'sync_past_days' => '5',
+ ],
);
$this->db->update(
'user_settings',
[
- 'sync_future_days' => '90'
+ 'sync_future_days' => '90',
],
[
- 'sync_future_days' => '5'
- ]
+ 'sync_future_days' => '5',
+ ],
);
}
@@ -66,14 +66,14 @@ class Migration_Modify_sync_period_columns extends EA_Migration
'type' => 'INT',
'constraint' => '11',
'null' => true,
- 'default' => '5'
+ 'default' => '5',
],
'sync_future_days' => [
'type' => 'INT',
'constraint' => '11',
'null' => true,
- 'default' => '5'
- ]
+ 'default' => '5',
+ ],
];
$this->dbforge->modify_column('user_settings', $fields);
@@ -81,21 +81,21 @@ class Migration_Modify_sync_period_columns extends EA_Migration
$this->db->update(
'user_settings',
[
- 'sync_past_days' => '5'
+ 'sync_past_days' => '5',
],
[
- 'sync_past_days' => '30'
- ]
+ 'sync_past_days' => '30',
+ ],
);
$this->db->update(
'user_settings',
[
- 'sync_future_days' => '5'
+ 'sync_future_days' => '5',
],
[
- 'sync_future_days' => '90'
- ]
+ 'sync_future_days' => '90',
+ ],
);
}
}
diff --git a/application/migrations/022_add_booking_field_settings.php b/application/migrations/022_add_booking_field_settings.php
index 29579d9e..68b4f854 100644
--- a/application/migrations/022_add_booking_field_settings.php
+++ b/application/migrations/022_add_booking_field_settings.php
@@ -19,36 +19,36 @@ class Migration_Add_booking_field_settings extends EA_Migration
private $fields = [
'first_name' => [
'display' => '1',
- 'require' => '1'
+ 'require' => '1',
],
'last_name' => [
'display' => '1',
- 'require' => '1'
+ 'require' => '1',
],
'email' => [
'display' => '1',
- 'require' => '1'
+ 'require' => '1',
],
'phone_number' => [
'display' => '1',
- 'require' => '1'
+ 'require' => '1',
],
'address' => [
'display' => '1',
- 'require' => '0'
+ 'require' => '0',
],
'city' => [
'display' => '1',
- 'require' => '0'
+ 'require' => '0',
],
'zip_code' => [
'display' => '1',
- 'require' => '0'
+ 'require' => '0',
],
'notes' => [
'display' => '1',
- 'require' => '0'
- ]
+ 'require' => '0',
+ ],
];
/**
@@ -71,7 +71,7 @@ class Migration_Add_booking_field_settings extends EA_Migration
if (!$this->db->get_where('settings', ['name' => $setting_name])->num_rows()) {
$this->db->insert('settings', [
'name' => $setting_name,
- 'value' => $value
+ 'value' => $value,
]);
}
}
diff --git a/application/migrations/024_rename_id_service_categories_column_of_services_table.php b/application/migrations/024_rename_id_service_categories_column_of_services_table.php
index 431b69ea..b101fad6 100644
--- a/application/migrations/024_rename_id_service_categories_column_of_services_table.php
+++ b/application/migrations/024_rename_id_service_categories_column_of_services_table.php
@@ -20,15 +20,15 @@ class Migration_Rename_id_service_categories_column_of_services_table extends EA
{
if ($this->db->field_exists('id_service_categories', 'services')) {
$this->db->query(
- 'ALTER TABLE `' . $this->db->dbprefix('services') . '` DROP FOREIGN KEY `services_service_categories`'
+ 'ALTER TABLE `' . $this->db->dbprefix('services') . '` DROP FOREIGN KEY `services_service_categories`',
);
$fields = [
'id_service_categories' => [
'name' => 'id_categories',
'type' => 'INT',
- 'constraint' => '11'
- ]
+ 'constraint' => '11',
+ ],
];
$this->dbforge->modify_column('services', $fields);
@@ -43,7 +43,7 @@ class Migration_Rename_id_service_categories_column_of_services_table extends EA
'` (`id`)
ON DELETE SET NULL
ON UPDATE CASCADE
- '
+ ',
);
}
}
@@ -55,15 +55,15 @@ class Migration_Rename_id_service_categories_column_of_services_table extends EA
{
if ($this->db->field_exists('id_categories', 'services')) {
$this->db->query(
- 'ALTER TABLE `' . $this->db->dbprefix('services') . '` DROP FOREIGN KEY `services_categories`'
+ 'ALTER TABLE `' . $this->db->dbprefix('services') . '` DROP FOREIGN KEY `services_categories`',
);
$fields = [
'id_categories' => [
'name' => 'id_service_categories',
'type' => 'INT',
- 'constraint' => '11'
- ]
+ 'constraint' => '11',
+ ],
];
$this->dbforge->modify_column('services', $fields);
@@ -78,7 +78,7 @@ class Migration_Rename_id_service_categories_column_of_services_table extends EA
'` (`id`)
ON DELETE SET NULL
ON UPDATE CASCADE
- '
+ ',
);
}
}
diff --git a/application/migrations/025_rename_is_unavailable_column_of_appointments_table.php b/application/migrations/025_rename_is_unavailable_column_of_appointments_table.php
index dd4b9f80..959df197 100644
--- a/application/migrations/025_rename_is_unavailable_column_of_appointments_table.php
+++ b/application/migrations/025_rename_is_unavailable_column_of_appointments_table.php
@@ -24,8 +24,8 @@ class Migration_Rename_is_unavailable_column_of_appointments_table extends EA_Mi
'name' => 'is_unavailability',
'type' => 'TINYINT',
'constraint' => '4',
- 'default' => '0'
- ]
+ 'default' => '0',
+ ],
];
$this->dbforge->modify_column('appointments', $fields);
@@ -43,8 +43,8 @@ class Migration_Rename_is_unavailable_column_of_appointments_table extends EA_Mi
'name' => 'is_unavailable',
'type' => 'TINYINT',
'constraint' => '4',
- 'default' => '0'
- ]
+ 'default' => '0',
+ ],
];
$this->dbforge->modify_column('appointments', $fields);
diff --git a/application/migrations/026_add_color_column_to_services_table.php b/application/migrations/026_add_color_column_to_services_table.php
index 1c15b326..4f9f3271 100644
--- a/application/migrations/026_add_color_column_to_services_table.php
+++ b/application/migrations/026_add_color_column_to_services_table.php
@@ -24,8 +24,8 @@ class Migration_Add_color_column_to_services_table extends EA_Migration
'type' => 'VARCHAR',
'constraint' => '256',
'default' => '#7cbae8',
- 'after' => 'description'
- ]
+ 'after' => 'description',
+ ],
];
$this->dbforge->add_column('services', $fields);
diff --git a/application/migrations/027_add_color_column_to_appointments_table.php b/application/migrations/027_add_color_column_to_appointments_table.php
index e7e632d7..b0ca7be6 100644
--- a/application/migrations/027_add_color_column_to_appointments_table.php
+++ b/application/migrations/027_add_color_column_to_appointments_table.php
@@ -24,8 +24,8 @@ class Migration_Add_color_column_to_appointments_table extends EA_Migration
'type' => 'VARCHAR',
'constraint' => '256',
'default' => '#7cbae8',
- 'after' => 'hash'
- ]
+ 'after' => 'hash',
+ ],
];
$this->dbforge->add_column('appointments', $fields);
diff --git a/application/migrations/028_add_matomo_analytics_url_setting.php b/application/migrations/028_add_matomo_analytics_url_setting.php
index a590142f..0d9aac2b 100644
--- a/application/migrations/028_add_matomo_analytics_url_setting.php
+++ b/application/migrations/028_add_matomo_analytics_url_setting.php
@@ -21,7 +21,7 @@ class Migration_Add_matomo_analytics_url_setting extends EA_Migration
if (!$this->db->get_where('settings', ['name' => 'matomo_analytics_url'])->num_rows()) {
$this->db->insert('settings', [
'name' => 'matomo_analytics_url',
- 'value' => ''
+ 'value' => '',
]);
}
}
diff --git a/application/migrations/029_add_display_delete_personal_information_setting.php b/application/migrations/029_add_display_delete_personal_information_setting.php
index 44d673a3..65804d93 100644
--- a/application/migrations/029_add_display_delete_personal_information_setting.php
+++ b/application/migrations/029_add_display_delete_personal_information_setting.php
@@ -21,7 +21,7 @@ class Migration_Add_display_delete_personal_information_setting extends EA_Migra
if (!$this->db->get_where('settings', ['name' => 'display_delete_personal_information'])->num_rows()) {
$this->db->insert('settings', [
'name' => 'display_delete_personal_information',
- 'value' => '0'
+ 'value' => '0',
]);
}
}
diff --git a/application/migrations/030_add_disable_booking_setting.php b/application/migrations/030_add_disable_booking_setting.php
index a6fee6f0..86d65ee5 100644
--- a/application/migrations/030_add_disable_booking_setting.php
+++ b/application/migrations/030_add_disable_booking_setting.php
@@ -21,7 +21,7 @@ class Migration_Add_disable_booking_setting extends EA_Migration
if (!$this->db->get_where('settings', ['name' => 'disable_booking'])->num_rows()) {
$this->db->insert('settings', [
'name' => 'disable_booking',
- 'value' => '0'
+ 'value' => '0',
]);
}
}
diff --git a/application/migrations/031_add_disable_booking_message_setting.php b/application/migrations/031_add_disable_booking_message_setting.php
index b6e83fdd..b530b11c 100644
--- a/application/migrations/031_add_disable_booking_message_setting.php
+++ b/application/migrations/031_add_disable_booking_message_setting.php
@@ -22,7 +22,7 @@ class Migration_Add_disable_booking_message_setting extends EA_Migration
$this->db->insert('settings', [
'name' => 'disable_booking_message',
'value' =>
- '
Thanks for stopping by!
We are not accepting new appointments at the moment, please check back again later.
'
+ 'Thanks for stopping by!
We are not accepting new appointments at the moment, please check back again later.
',
]);
}
}
diff --git a/application/migrations/032_add_company_logo_setting.php b/application/migrations/032_add_company_logo_setting.php
index fca7d8e3..c09dc9a7 100644
--- a/application/migrations/032_add_company_logo_setting.php
+++ b/application/migrations/032_add_company_logo_setting.php
@@ -21,7 +21,7 @@ class Migration_Add_company_logo_setting extends EA_Migration
if (!$this->db->get_where('settings', ['name' => 'company_logo'])->num_rows()) {
$this->db->insert('settings', [
'name' => 'company_logo',
- 'value' => ''
+ 'value' => '',
]);
}
}
diff --git a/application/migrations/033_add_company_color_setting.php b/application/migrations/033_add_company_color_setting.php
index dadb6b11..21be5fe2 100644
--- a/application/migrations/033_add_company_color_setting.php
+++ b/application/migrations/033_add_company_color_setting.php
@@ -21,7 +21,7 @@ class Migration_Add_company_color_setting extends EA_Migration
if (!$this->db->get_where('settings', ['name' => 'company_color'])->num_rows()) {
$this->db->insert('settings', [
'name' => 'company_color',
- 'value' => '#ffffff'
+ 'value' => '#ffffff',
]);
}
}
diff --git a/application/migrations/034_add_display_login_button_setting.php b/application/migrations/034_add_display_login_button_setting.php
index 5a4cdc86..b1df340e 100644
--- a/application/migrations/034_add_display_login_button_setting.php
+++ b/application/migrations/034_add_display_login_button_setting.php
@@ -21,7 +21,7 @@ class Migration_Add_display_login_button_setting extends EA_Migration
if (!$this->db->get_where('settings', ['name' => 'display_login_button'])->num_rows()) {
$this->db->insert('settings', [
'name' => 'display_login_button',
- 'value' => '1'
+ 'value' => '1',
]);
}
}
diff --git a/application/migrations/035_add_is_private_column_to_services_table.php b/application/migrations/035_add_is_private_column_to_services_table.php
index 52230a1f..b5d35f47 100644
--- a/application/migrations/035_add_is_private_column_to_services_table.php
+++ b/application/migrations/035_add_is_private_column_to_services_table.php
@@ -24,8 +24,8 @@ class Migration_Add_is_private_column_to_services_table extends EA_Migration
'type' => 'TINYINT',
'constraint' => '4',
'default' => '0',
- 'after' => 'attendants_number'
- ]
+ 'after' => 'attendants_number',
+ ],
];
$this->dbforge->add_column('services', $fields);
diff --git a/application/migrations/036_add_is_private_column_to_users_table.php b/application/migrations/036_add_is_private_column_to_users_table.php
index 7bfae212..cbf7e315 100644
--- a/application/migrations/036_add_is_private_column_to_users_table.php
+++ b/application/migrations/036_add_is_private_column_to_users_table.php
@@ -24,8 +24,8 @@ class Migration_Add_is_private_column_to_users_table extends EA_Migration
'type' => 'TINYINT',
'constraint' => '4',
'default' => '0',
- 'after' => 'language'
- ]
+ 'after' => 'language',
+ ],
];
$this->dbforge->add_column('users', $fields);
diff --git a/application/migrations/037_add_timestamp_columns.php b/application/migrations/037_add_timestamp_columns.php
index 01c91ad3..d15f040b 100644
--- a/application/migrations/037_add_timestamp_columns.php
+++ b/application/migrations/037_add_timestamp_columns.php
@@ -35,8 +35,8 @@ class Migration_Add_timestamp_columns extends EA_Migration
$column => [
'type' => 'DATETIME',
'null' => true,
- 'after' => 'id'
- ]
+ 'after' => 'id',
+ ],
];
$this->dbforge->add_column($table, $fields);
diff --git a/application/migrations/038_add_theme_setting.php b/application/migrations/038_add_theme_setting.php
index 3280c985..a0470bb7 100644
--- a/application/migrations/038_add_theme_setting.php
+++ b/application/migrations/038_add_theme_setting.php
@@ -21,7 +21,7 @@ class Migration_Add_theme_setting extends EA_Migration
if (!$this->db->get_where('settings', ['name' => 'theme'])->num_rows()) {
$this->db->insert('settings', [
'name' => 'theme',
- 'value' => 'default'
+ 'value' => 'default',
]);
}
}
diff --git a/application/migrations/039_add_limit_customer_access_setting.php b/application/migrations/039_add_limit_customer_access_setting.php
index 97bfd496..3272a789 100644
--- a/application/migrations/039_add_limit_customer_access_setting.php
+++ b/application/migrations/039_add_limit_customer_access_setting.php
@@ -23,7 +23,7 @@ class Migration_Add_limit_customer_access_setting extends EA_Migration
'create_datetime' => date('Y-m-d H:i:s'),
'update_datetime' => date('Y-m-d H:i:s'),
'name' => 'limit_customer_access',
- 'value' => '0'
+ 'value' => '0',
]);
}
}
diff --git a/application/migrations/040_create_webhooks_table.php b/application/migrations/040_create_webhooks_table.php
index 8a55e060..22364203 100644
--- a/application/migrations/040_create_webhooks_table.php
+++ b/application/migrations/040_create_webhooks_table.php
@@ -23,47 +23,47 @@ class Migration_Create_webhooks_table extends EA_Migration
'id' => [
'type' => 'INT',
'constraint' => 11,
- 'auto_increment' => true
+ 'auto_increment' => true,
],
'create_datetime' => [
'type' => 'DATETIME',
- 'null' => true
+ 'null' => true,
],
'update_datetime' => [
'type' => 'DATETIME',
- 'null' => true
+ 'null' => true,
],
'delete_datetime' => [
'type' => 'DATETIME',
- 'null' => true
+ 'null' => true,
],
'name' => [
'type' => 'VARCHAR',
'constraint' => '256',
- 'null' => true
+ 'null' => true,
],
'url' => [
'type' => 'TEXT',
- 'null' => true
+ 'null' => true,
],
'actions' => [
'type' => 'TEXT',
- 'null' => true
+ 'null' => true,
],
'secret_token' => [
'type' => 'VARCHAR',
'constraint' => '512',
- 'null' => true
+ 'null' => true,
],
'is_ssl_verified' => [
'type' => 'TINYINT',
'constraint' => '4',
- 'default' => true
+ 'default' => true,
],
'notes' => [
'type' => 'TEXT',
- 'null' => true
- ]
+ 'null' => true,
+ ],
]);
$this->dbforge->add_key('id', true);
diff --git a/application/migrations/041_add_webhooks_column_to_roles_table.php b/application/migrations/041_add_webhooks_column_to_roles_table.php
index 70c866b4..a9e8bd12 100644
--- a/application/migrations/041_add_webhooks_column_to_roles_table.php
+++ b/application/migrations/041_add_webhooks_column_to_roles_table.php
@@ -23,8 +23,8 @@ class Migration_Add_webhooks_column_to_roles_table extends EA_Migration
'webhooks' => [
'type' => 'INT',
'constraint' => '11',
- 'null' => true
- ]
+ 'null' => true,
+ ],
];
$this->dbforge->add_column('roles', $fields);
diff --git a/application/migrations/042_add_future_booking_limit_setting.php b/application/migrations/042_add_future_booking_limit_setting.php
index 5fe81374..3f3f679d 100644
--- a/application/migrations/042_add_future_booking_limit_setting.php
+++ b/application/migrations/042_add_future_booking_limit_setting.php
@@ -27,7 +27,7 @@ class Migration_Add_future_booking_limit_setting extends CI_Migration
if (!$this->db->get_where('settings', ['name' => 'future_booking_limit'])->num_rows()) {
$this->db->insert('settings', [
'name' => 'future_booking_limit',
- 'value' => '90' // days
+ 'value' => '90', // days
]);
}
}
diff --git a/application/migrations/043_add_appointment_status_options_setting.php b/application/migrations/043_add_appointment_status_options_setting.php
index c31b3daf..f88e36f0 100644
--- a/application/migrations/043_add_appointment_status_options_setting.php
+++ b/application/migrations/043_add_appointment_status_options_setting.php
@@ -27,7 +27,7 @@ class Migration_Add_appointment_status_options_setting extends CI_Migration
if (!$this->db->get_where('settings', ['name' => 'appointment_status_options'])->num_rows()) {
$this->db->insert('settings', [
'name' => 'appointment_status_options',
- 'value' => '["Booked", "Confirmed", "Rescheduled", "Cancelled", "Draft"]'
+ 'value' => '["Booked", "Confirmed", "Rescheduled", "Cancelled", "Draft"]',
]);
}
}
diff --git a/application/migrations/044_add_status_column_to_appointments_table.php b/application/migrations/044_add_status_column_to_appointments_table.php
index 33411be2..e481ced7 100644
--- a/application/migrations/044_add_status_column_to_appointments_table.php
+++ b/application/migrations/044_add_status_column_to_appointments_table.php
@@ -24,8 +24,8 @@ class Migration_Add_status_column_to_appointments_table extends EA_Migration
'type' => 'VARCHAR',
'constraint' => '512',
'default' => '',
- 'after' => 'color'
- ]
+ 'after' => 'color',
+ ],
];
$this->dbforge->add_column('appointments', $fields);
diff --git a/application/migrations/045_drop_delete_datetime_column_from_all_tables.php b/application/migrations/045_drop_delete_datetime_column_from_all_tables.php
index 777b5c02..ae1d613d 100644
--- a/application/migrations/045_drop_delete_datetime_column_from_all_tables.php
+++ b/application/migrations/045_drop_delete_datetime_column_from_all_tables.php
@@ -24,7 +24,7 @@ class Migration_Drop_delete_datetime_column_from_all_tables extends EA_Migration
'services',
'settings',
'users',
- 'webhooks'
+ 'webhooks',
];
/**
@@ -50,8 +50,8 @@ class Migration_Drop_delete_datetime_column_from_all_tables extends EA_Migration
'delete_datetime' => [
'type' => 'DATETIME',
'null' => true,
- 'after' => 'update_datetime'
- ]
+ 'after' => 'update_datetime',
+ ],
];
$this->dbforge->add_column($table, $fields);
diff --git a/application/migrations/047_revert_rename_id_service_categories_column_of_services_table.php b/application/migrations/047_revert_rename_id_service_categories_column_of_services_table.php
index 953edcdf..57b12b08 100644
--- a/application/migrations/047_revert_rename_id_service_categories_column_of_services_table.php
+++ b/application/migrations/047_revert_rename_id_service_categories_column_of_services_table.php
@@ -20,15 +20,15 @@ class Migration_Revert_rename_id_service_categories_column_of_services_table ext
{
if ($this->db->field_exists('id_categories', 'services')) {
$this->db->query(
- 'ALTER TABLE `' . $this->db->dbprefix('services') . '` DROP FOREIGN KEY `services_categories`'
+ 'ALTER TABLE `' . $this->db->dbprefix('services') . '` DROP FOREIGN KEY `services_categories`',
);
$fields = [
'id_categories' => [
'name' => 'id_service_categories',
'type' => 'INT',
- 'constraint' => '11'
- ]
+ 'constraint' => '11',
+ ],
];
$this->dbforge->modify_column('services', $fields);
@@ -43,7 +43,7 @@ class Migration_Revert_rename_id_service_categories_column_of_services_table ext
'` (`id`)
ON DELETE SET NULL
ON UPDATE CASCADE
- '
+ ',
);
}
}
@@ -55,15 +55,15 @@ class Migration_Revert_rename_id_service_categories_column_of_services_table ext
{
if ($this->db->field_exists('id_service_categories', 'services')) {
$this->db->query(
- 'ALTER TABLE `' . $this->db->dbprefix('services') . '` DROP FOREIGN KEY `services_service_categories`'
+ 'ALTER TABLE `' . $this->db->dbprefix('services') . '` DROP FOREIGN KEY `services_service_categories`',
);
$fields = [
'id_service_categories' => [
'name' => 'id_categories',
'type' => 'INT',
- 'constraint' => '11'
- ]
+ 'constraint' => '11',
+ ],
];
$this->dbforge->modify_column('services', $fields);
@@ -78,7 +78,7 @@ class Migration_Revert_rename_id_service_categories_column_of_services_table ext
'` (`id`)
ON DELETE SET NULL
ON UPDATE CASCADE
- '
+ ',
);
}
}
diff --git a/application/migrations/048_create_blocked_periods_table.php b/application/migrations/048_create_blocked_periods_table.php
index 33cac59b..f2148df2 100644
--- a/application/migrations/048_create_blocked_periods_table.php
+++ b/application/migrations/048_create_blocked_periods_table.php
@@ -23,33 +23,33 @@ class Migration_Create_blocked_periods_table extends EA_Migration
'id' => [
'type' => 'INT',
'constraint' => 11,
- 'auto_increment' => true
+ 'auto_increment' => true,
],
'create_datetime' => [
'type' => 'DATETIME',
- 'null' => true
+ 'null' => true,
],
'update_datetime' => [
'type' => 'DATETIME',
- 'null' => true
+ 'null' => true,
],
'name' => [
'type' => 'VARCHAR',
'constraint' => '256',
- 'null' => true
+ 'null' => true,
],
'start_datetime' => [
'type' => 'DATETIME',
- 'null' => true
+ 'null' => true,
],
'end_datetime' => [
'type' => 'DATETIME',
- 'null' => true
+ 'null' => true,
],
'notes' => [
'type' => 'TEXT',
- 'null' => true
- ]
+ 'null' => true,
+ ],
]);
$this->dbforge->add_key('id', true);
diff --git a/application/migrations/049_add_blocked_periods_column_to_roles_table.php b/application/migrations/049_add_blocked_periods_column_to_roles_table.php
index 46c002ad..29dab812 100644
--- a/application/migrations/049_add_blocked_periods_column_to_roles_table.php
+++ b/application/migrations/049_add_blocked_periods_column_to_roles_table.php
@@ -23,8 +23,8 @@ class Migration_Add_blocked_periods_column_to_roles_table extends EA_Migration
'blocked_periods' => [
'type' => 'INT',
'constraint' => '11',
- 'null' => true
- ]
+ 'null' => true,
+ ],
];
$this->dbforge->add_column('roles', $fields);
diff --git a/application/migrations/050_add_custom_fields_columns_to_users_table.php b/application/migrations/050_add_custom_fields_columns_to_users_table.php
index ee162015..f14894a2 100644
--- a/application/migrations/050_add_custom_fields_columns_to_users_table.php
+++ b/application/migrations/050_add_custom_fields_columns_to_users_table.php
@@ -31,8 +31,8 @@ class Migration_Add_custom_fields_columns_to_users_table extends EA_Migration
$field_name => [
'type' => 'TEXT',
'null' => true,
- 'after' => 'language'
- ]
+ 'after' => 'language',
+ ],
];
$this->dbforge->add_column('users', $fields);
diff --git a/application/migrations/051_insert_custom_field_rows_to_settings_table.php b/application/migrations/051_insert_custom_field_rows_to_settings_table.php
index 0e4fe4d7..87704a25 100644
--- a/application/migrations/051_insert_custom_field_rows_to_settings_table.php
+++ b/application/migrations/051_insert_custom_field_rows_to_settings_table.php
@@ -21,7 +21,7 @@ class Migration_Insert_custom_field_rows_to_settings_table extends EA_Migration
private const SETTINGS = [
'display' => '0',
'require' => '0',
- 'label' => ''
+ 'label' => '',
];
/**
@@ -38,7 +38,7 @@ class Migration_Insert_custom_field_rows_to_settings_table extends EA_Migration
if (!$this->db->get_where('settings', ['name' => $setting_name])->num_rows()) {
$this->db->insert('settings', [
'name' => $setting_name,
- 'value' => $default_value
+ 'value' => $default_value,
]);
}
}
diff --git a/application/models/Admins_model.php b/application/models/Admins_model.php
index 2203aad8..90dbdccf 100644
--- a/application/models/Admins_model.php
+++ b/application/models/Admins_model.php
@@ -25,7 +25,7 @@ class Admins_model extends EA_Model
*/
protected array $casts = [
'id' => 'integer',
- 'id_roles' => 'integer'
+ 'id_roles' => 'integer',
];
/**
@@ -45,7 +45,7 @@ class Admins_model extends EA_Model
'timezone' => 'timezone',
'language' => 'language',
'notes' => 'notes',
- 'roleId' => 'id_roles'
+ 'roleId' => 'id_roles',
];
/**
@@ -84,7 +84,7 @@ class Admins_model extends EA_Model
if (!$count) {
throw new InvalidArgumentException(
- 'The provided admin ID does not exist in the database: ' . $admin['id']
+ 'The provided admin ID does not exist in the database: ' . $admin['id'],
);
}
}
@@ -110,7 +110,7 @@ class Admins_model extends EA_Model
if (!$this->validate_username($admin['settings']['username'], $admin_id)) {
throw new InvalidArgumentException(
- 'The provided username is already in use, please use a different one.'
+ 'The provided username is already in use, please use a different one.',
);
}
}
@@ -119,7 +119,7 @@ class Admins_model extends EA_Model
if (!empty($admin['settings']['password'])) {
if (strlen($admin['settings']['password']) < MIN_PASSWORD_LENGTH) {
throw new InvalidArgumentException(
- 'The admin password must be at least ' . MIN_PASSWORD_LENGTH . ' characters long.'
+ 'The admin password must be at least ' . MIN_PASSWORD_LENGTH . ' characters long.',
);
}
}
@@ -135,7 +135,7 @@ class Admins_model extends EA_Model
!in_array($admin['settings']['calendar_view'], [CALENDAR_VIEW_DEFAULT, CALENDAR_VIEW_TABLE])
) {
throw new InvalidArgumentException(
- 'The provided calendar view is invalid: ' . $admin['settings']['calendar_view']
+ 'The provided calendar view is invalid: ' . $admin['settings']['calendar_view'],
);
}
@@ -154,7 +154,7 @@ class Admins_model extends EA_Model
if ($count > 0) {
throw new InvalidArgumentException(
- 'The provided email address is already in use, please use a different one.'
+ 'The provided email address is already in use, please use a different one.',
);
}
}
@@ -195,7 +195,7 @@ class Admins_model extends EA_Model
array|string $where = null,
int $limit = null,
int $offset = null,
- string $order_by = null
+ string $order_by = null,
): array {
$role_id = $this->get_admin_role_id();
@@ -548,8 +548,8 @@ class Admins_model extends EA_Model
'settings' => [
'username' => $admin['settings']['username'],
'notifications' => filter_var($admin['settings']['notifications'], FILTER_VALIDATE_BOOLEAN),
- 'calendarView' => $admin['settings']['calendar_view']
- ]
+ 'calendarView' => $admin['settings']['calendar_view'],
+ ],
];
$admin = $encoded_resource;
@@ -629,7 +629,7 @@ class Admins_model extends EA_Model
if (array_key_exists('notifications', $admin['settings'])) {
$decoded_resource['settings']['notifications'] = filter_var(
$admin['settings']['notifications'],
- FILTER_VALIDATE_BOOLEAN
+ FILTER_VALIDATE_BOOLEAN,
);
}
diff --git a/application/models/Appointments_model.php b/application/models/Appointments_model.php
index dc0f283f..1aacf7a6 100644
--- a/application/models/Appointments_model.php
+++ b/application/models/Appointments_model.php
@@ -26,7 +26,7 @@ class Appointments_model extends EA_Model
'is_unavailability' => 'boolean',
'id_users_provider' => 'integer',
'id_users_customer' => 'integer',
- 'id_services' => 'integer'
+ 'id_services' => 'integer',
];
/**
@@ -45,7 +45,7 @@ class Appointments_model extends EA_Model
'serviceId' => 'id_services',
'providerId' => 'id_users_provider',
'customerId' => 'id_users_customer',
- 'googleCalendarId' => 'id_google_calendar'
+ 'googleCalendarId' => 'id_google_calendar',
];
/**
@@ -83,7 +83,7 @@ class Appointments_model extends EA_Model
if (!$count) {
throw new InvalidArgumentException(
- 'The provided appointment ID does not exist in the database: ' . $appointment['id']
+ 'The provided appointment ID does not exist in the database: ' . $appointment['id'],
);
}
}
@@ -117,7 +117,7 @@ class Appointments_model extends EA_Model
if ($diff < EVENT_MINIMUM_DURATION) {
throw new InvalidArgumentException(
- 'The appointment duration cannot be less than ' . EVENT_MINIMUM_DURATION . ' minutes.'
+ 'The appointment duration cannot be less than ' . EVENT_MINIMUM_DURATION . ' minutes.',
);
}
@@ -133,7 +133,7 @@ class Appointments_model extends EA_Model
if (!$count) {
throw new InvalidArgumentException(
- 'The appointment provider ID was not found in the database: ' . $appointment['id_users_provider']
+ 'The appointment provider ID was not found in the database: ' . $appointment['id_users_provider'],
);
}
@@ -150,7 +150,7 @@ class Appointments_model extends EA_Model
if (!$count) {
throw new InvalidArgumentException(
- 'The appointment customer ID was not found in the database: ' . $appointment['id_users_customer']
+ 'The appointment customer ID was not found in the database: ' . $appointment['id_users_customer'],
);
}
@@ -177,7 +177,7 @@ class Appointments_model extends EA_Model
array|string $where = null,
int $limit = null,
int $offset = null,
- string $order_by = null
+ string $order_by = null,
): array {
if ($where !== null) {
$this->db->where($where);
@@ -268,7 +268,7 @@ class Appointments_model extends EA_Model
if (!$appointment) {
throw new InvalidArgumentException(
- 'The provided appointment ID was not found in the database: ' . $appointment_id
+ 'The provided appointment ID was not found in the database: ' . $appointment_id,
);
}
@@ -302,7 +302,7 @@ class Appointments_model extends EA_Model
if (!$query->num_rows()) {
throw new InvalidArgumentException(
- 'The provided appointment ID was not found in the database: ' . $appointment_id
+ 'The provided appointment ID was not found in the database: ' . $appointment_id,
);
}
@@ -344,7 +344,7 @@ class Appointments_model extends EA_Model
DateTime $end,
int $service_id,
int $provider_id,
- int $exclude_appointment_id = null
+ int $exclude_appointment_id = null,
): int {
if ($exclude_appointment_id) {
$this->db->where('id !=', $exclude_appointment_id);
@@ -388,7 +388,7 @@ class Appointments_model extends EA_Model
DateTime $end,
int $service_id,
int $provider_id,
- int $exclude_appointment_id = null
+ int $exclude_appointment_id = null,
): int {
if ($exclude_appointment_id) {
$this->db->where('id !=', $exclude_appointment_id);
@@ -493,7 +493,7 @@ class Appointments_model extends EA_Model
case 'service':
$appointment['service'] = $this->db
->get_where('services', [
- 'id' => $appointment['id_services'] ?? ($appointment['serviceId'] ?? null)
+ 'id' => $appointment['id_services'] ?? ($appointment['serviceId'] ?? null),
])
->row_array();
break;
@@ -501,7 +501,7 @@ class Appointments_model extends EA_Model
case 'provider':
$appointment['provider'] = $this->db
->get_where('users', [
- 'id' => $appointment['id_users_provider'] ?? ($appointment['providerId'] ?? null)
+ 'id' => $appointment['id_users_provider'] ?? ($appointment['providerId'] ?? null),
])
->row_array();
break;
@@ -509,14 +509,14 @@ class Appointments_model extends EA_Model
case 'customer':
$appointment['customer'] = $this->db
->get_where('users', [
- 'id' => $appointment['id_users_customer'] ?? ($appointment['customerId'] ?? null)
+ 'id' => $appointment['id_users_customer'] ?? ($appointment['customerId'] ?? null),
])
->row_array();
break;
default:
throw new InvalidArgumentException(
- 'The requested appointment relation is not supported: ' . $resource
+ 'The requested appointment relation is not supported: ' . $resource,
);
}
}
@@ -543,7 +543,7 @@ class Appointments_model extends EA_Model
'providerId' => $appointment['id_users_provider'] !== null ? (int) $appointment['id_users_provider'] : null,
'serviceId' => $appointment['id_services'] !== null ? (int) $appointment['id_services'] : null,
'googleCalendarId' =>
- $appointment['id_google_calendar'] !== null ? (int) $appointment['id_google_calendar'] : null
+ $appointment['id_google_calendar'] !== null ? (int) $appointment['id_google_calendar'] : null,
];
$appointment = $encoded_resource;
diff --git a/application/models/Blocked_periods_model.php b/application/models/Blocked_periods_model.php
index 9c2982d9..e42c5846 100644
--- a/application/models/Blocked_periods_model.php
+++ b/application/models/Blocked_periods_model.php
@@ -24,7 +24,7 @@ class Blocked_periods_model extends EA_Model
* @var array
*/
protected array $casts = [
- 'id' => 'integer'
+ 'id' => 'integer',
];
/**
@@ -35,7 +35,7 @@ class Blocked_periods_model extends EA_Model
'name' => 'name',
'start' => 'start_datetime',
'end' => 'end_datetime',
- 'notes' => 'notes'
+ 'notes' => 'notes',
];
/**
@@ -73,7 +73,7 @@ class Blocked_periods_model extends EA_Model
if (!$count) {
throw new InvalidArgumentException(
- 'The provided blocked-period ID does not exist in the database: ' . $blocked_period['id']
+ 'The provided blocked-period ID does not exist in the database: ' . $blocked_period['id'],
);
}
}
@@ -85,7 +85,7 @@ class Blocked_periods_model extends EA_Model
empty($blocked_period['end_datetime'])
) {
throw new InvalidArgumentException(
- 'Not all required fields are provided: ' . print_r($blocked_period, true)
+ 'Not all required fields are provided: ' . print_r($blocked_period, true),
);
}
@@ -166,7 +166,7 @@ class Blocked_periods_model extends EA_Model
if (!$blocked_period) {
throw new InvalidArgumentException(
- 'The provided blocked-period ID was not found in the database: ' . $blocked_period_id
+ 'The provided blocked-period ID was not found in the database: ' . $blocked_period_id,
);
}
@@ -200,7 +200,7 @@ class Blocked_periods_model extends EA_Model
if (!$query->num_rows()) {
throw new InvalidArgumentException(
- 'The provided blocked-period ID was not found in the database: ' . $blocked_period_id
+ 'The provided blocked-period ID was not found in the database: ' . $blocked_period_id,
);
}
@@ -211,7 +211,7 @@ class Blocked_periods_model extends EA_Model
if (!array_key_exists($field, $blocked_period)) {
throw new InvalidArgumentException(
- 'The requested field was not found in the blocked-period data: ' . $field
+ 'The requested field was not found in the blocked-period data: ' . $field,
);
}
@@ -264,7 +264,7 @@ class Blocked_periods_model extends EA_Model
array|string $where = null,
int $limit = null,
int $offset = null,
- string $order_by = null
+ string $order_by = null,
): array {
if ($where !== null) {
$this->db->where($where);
@@ -308,7 +308,7 @@ class Blocked_periods_model extends EA_Model
'name' => $blocked_period['name'],
'start' => array_key_exists('start_datetime', $blocked_period) ? $blocked_period['start_datetime'] : null,
'end' => array_key_exists('end_datetime', $blocked_period) ? $blocked_period['end_datetime'] : null,
- 'notes' => array_key_exists('notes', $blocked_period) ? $blocked_period['notes'] : null
+ 'notes' => array_key_exists('notes', $blocked_period) ? $blocked_period['notes'] : null,
];
$blocked_period = $encoded_resource;
diff --git a/application/models/Consents_model.php b/application/models/Consents_model.php
index 619032b5..a58b247b 100644
--- a/application/models/Consents_model.php
+++ b/application/models/Consents_model.php
@@ -24,7 +24,7 @@ class Consents_model extends EA_Model
* @var array
*/
protected array $casts = [
- 'id' => 'integer'
+ 'id' => 'integer',
];
/**
@@ -231,7 +231,7 @@ class Consents_model extends EA_Model
array|string $where = null,
int $limit = null,
int $offset = null,
- string $order_by = null
+ string $order_by = null,
): array {
if ($where !== null) {
$this->db->where($where);
diff --git a/application/models/Customers_model.php b/application/models/Customers_model.php
index 869a234c..d97ac0f7 100644
--- a/application/models/Customers_model.php
+++ b/application/models/Customers_model.php
@@ -25,7 +25,7 @@ class Customers_model extends EA_Model
*/
protected array $casts = [
'id' => 'integer',
- 'id_roles' => 'integer'
+ 'id_roles' => 'integer',
];
/**
@@ -48,7 +48,7 @@ class Customers_model extends EA_Model
'customField3' => 'custom_field_3',
'customField4' => 'custom_field_4',
'customField5' => 'custom_field_5',
- 'notes' => 'notes'
+ 'notes' => 'notes',
];
/**
@@ -90,7 +90,7 @@ class Customers_model extends EA_Model
if (!$count) {
throw new InvalidArgumentException(
- 'The provided customer ID does not exist in the database: ' . $customer['id']
+ 'The provided customer ID does not exist in the database: ' . $customer['id'],
);
}
}
@@ -137,7 +137,7 @@ class Customers_model extends EA_Model
if ($count > 0) {
throw new InvalidArgumentException(
- 'The provided email address is already in use, please use a different one.'
+ 'The provided email address is already in use, please use a different one.',
);
}
}
@@ -157,7 +157,7 @@ class Customers_model extends EA_Model
array|string $where = null,
int $limit = null,
int $offset = null,
- string $order_by = null
+ string $order_by = null,
): array {
$role_id = $this->get_customer_role_id();
@@ -319,7 +319,7 @@ class Customers_model extends EA_Model
if (!$customer) {
throw new InvalidArgumentException(
- 'The provided customer ID was not found in the database: ' . $customer_id
+ 'The provided customer ID was not found in the database: ' . $customer_id,
);
}
@@ -353,7 +353,7 @@ class Customers_model extends EA_Model
if (!$query->num_rows()) {
throw new InvalidArgumentException(
- 'The provided customer ID was not found in the database: ' . $customer_id
+ 'The provided customer ID was not found in the database: ' . $customer_id,
);
}
@@ -460,7 +460,7 @@ class Customers_model extends EA_Model
'customField2' => $customer['custom_field_2'],
'customField3' => $customer['custom_field_3'],
'customField4' => $customer['custom_field_4'],
- 'customField5' => $customer['custom_field_5']
+ 'customField5' => $customer['custom_field_5'],
];
$customer = $encoded_resource;
diff --git a/application/models/Providers_model.php b/application/models/Providers_model.php
index 2506bf69..3a3de408 100755
--- a/application/models/Providers_model.php
+++ b/application/models/Providers_model.php
@@ -26,7 +26,7 @@ class Providers_model extends EA_Model
protected array $casts = [
'id' => 'integer',
'is_private' => 'boolean',
- 'id_roles' => 'integer'
+ 'id_roles' => 'integer',
];
/**
@@ -47,7 +47,7 @@ class Providers_model extends EA_Model
'language' => 'language',
'notes' => 'notes',
'isPrivate' => 'is_private',
- 'roleId' => 'id_roles'
+ 'roleId' => 'id_roles',
];
/**
@@ -86,7 +86,7 @@ class Providers_model extends EA_Model
if (!$count) {
throw new InvalidArgumentException(
- 'The provided provider ID does not exist in the database: ' . $provider['id']
+ 'The provided provider ID does not exist in the database: ' . $provider['id'],
);
}
}
@@ -112,7 +112,7 @@ class Providers_model extends EA_Model
foreach ($provider['services'] as $service_id) {
if (!is_numeric($service_id)) {
throw new InvalidArgumentException(
- 'The provided provider services are invalid: ' . print_r($provider, true)
+ 'The provided provider services are invalid: ' . print_r($provider, true),
);
}
}
@@ -124,7 +124,7 @@ class Providers_model extends EA_Model
if (!$this->validate_username($provider['settings']['username'], $provider_id)) {
throw new InvalidArgumentException(
- 'The provided username is already in use, please use a different one.'
+ 'The provided username is already in use, please use a different one.',
);
}
}
@@ -133,7 +133,7 @@ class Providers_model extends EA_Model
if (!empty($provider['settings']['password'])) {
if (strlen($provider['settings']['password']) < MIN_PASSWORD_LENGTH) {
throw new InvalidArgumentException(
- 'The provider password must be at least ' . MIN_PASSWORD_LENGTH . ' characters long.'
+ 'The provider password must be at least ' . MIN_PASSWORD_LENGTH . ' characters long.',
);
}
}
@@ -149,7 +149,7 @@ class Providers_model extends EA_Model
!in_array($provider['settings']['calendar_view'], [CALENDAR_VIEW_DEFAULT, CALENDAR_VIEW_TABLE])
) {
throw new InvalidArgumentException(
- 'The provided calendar view is invalid: ' . $provider['settings']['calendar_view']
+ 'The provided calendar view is invalid: ' . $provider['settings']['calendar_view'],
);
}
@@ -168,7 +168,7 @@ class Providers_model extends EA_Model
if ($count > 0) {
throw new InvalidArgumentException(
- 'The provided email address is already in use, please use a different one.'
+ 'The provided email address is already in use, please use a different one.',
);
}
}
@@ -209,7 +209,7 @@ class Providers_model extends EA_Model
array|string $where = null,
int $limit = null,
int $offset = null,
- string $order_by = null
+ string $order_by = null,
): array {
$role_id = $this->get_provider_role_id();
@@ -401,7 +401,7 @@ class Providers_model extends EA_Model
foreach ($service_ids as $service_id) {
$service_provider_connection = [
'id_users' => $provider_id,
- 'id_services' => $service_id
+ 'id_services' => $service_id,
];
$this->db->insert('services_providers', $service_provider_connection);
@@ -445,7 +445,7 @@ class Providers_model extends EA_Model
if (!$query->num_rows()) {
throw new InvalidArgumentException(
- 'The provided provider ID was not found in the database: ' . $provider_id
+ 'The provided provider ID was not found in the database: ' . $provider_id,
);
}
@@ -504,7 +504,7 @@ class Providers_model extends EA_Model
// Make sure the provider record exists.
$where = [
'id' => $provider_id,
- 'id_roles' => $this->db->get_where('roles', ['slug' => DB_SLUG_PROVIDER])->row()->id
+ 'id_roles' => $this->db->get_where('roles', ['slug' => DB_SLUG_PROVIDER])->row()->id,
];
if ($this->db->get_where('users', $where)->num_rows() === 0) {
@@ -542,7 +542,7 @@ class Providers_model extends EA_Model
if (!$provider) {
throw new InvalidArgumentException(
- 'The provided provider ID was not found in the database: ' . $provider_id
+ 'The provided provider ID was not found in the database: ' . $provider_id,
);
}
@@ -623,7 +623,7 @@ class Providers_model extends EA_Model
$provider['settings']['id_users'],
$provider['settings']['username'],
$provider['settings']['password'],
- $provider['settings']['salt']
+ $provider['settings']['salt'],
);
$provider['services'] = [];
@@ -734,8 +734,8 @@ class Providers_model extends EA_Model
->get()
->result_array(),
default => throw new InvalidArgumentException(
- 'The requested provider relation is not supported: ' . $resource
- )
+ 'The requested provider relation is not supported: ' . $resource,
+ ),
};
}
}
@@ -759,7 +759,7 @@ class Providers_model extends EA_Model
'state' => $provider['state'],
'zip' => $provider['zip_code'],
'notes' => $provider['notes'],
- 'timezone' => $provider['timezone']
+ 'timezone' => $provider['timezone'],
];
if (array_key_exists('services', $provider)) {
@@ -791,7 +791,7 @@ class Providers_model extends EA_Model
: null,
'workingPlanExceptions' => array_key_exists('working_plan_exceptions', $provider['settings'])
? json_decode($provider['settings']['working_plan_exceptions'], true)
- : null
+ : null,
];
}
@@ -880,14 +880,14 @@ class Providers_model extends EA_Model
if (array_key_exists('notifications', $provider['settings'])) {
$decoded_resource['settings']['notifications'] = filter_var(
$provider['settings']['notifications'],
- FILTER_VALIDATE_BOOLEAN
+ FILTER_VALIDATE_BOOLEAN,
);
}
if (array_key_exists('googleSync', $provider['settings'])) {
$decoded_resource['settings']['google_sync'] = filter_var(
$provider['settings']['googleSync'],
- FILTER_VALIDATE_BOOLEAN
+ FILTER_VALIDATE_BOOLEAN,
);
}
@@ -913,7 +913,7 @@ class Providers_model extends EA_Model
if (array_key_exists('workingPlanExceptions', $provider['settings'])) {
$decoded_resource['settings']['working_plan_exceptions'] = json_encode(
- $provider['settings']['workingPlanExceptions']
+ $provider['settings']['workingPlanExceptions'],
);
}
}
diff --git a/application/models/Roles_model.php b/application/models/Roles_model.php
index c079639f..7f71d6f8 100644
--- a/application/models/Roles_model.php
+++ b/application/models/Roles_model.php
@@ -31,7 +31,7 @@ class Roles_model extends EA_Model
'services' => 'integer',
'users' => 'integer',
'system_settings' => 'integer',
- 'user_settings' => 'integer'
+ 'user_settings' => 'integer',
];
/**
@@ -69,7 +69,7 @@ class Roles_model extends EA_Model
if (!$count) {
throw new InvalidArgumentException(
- 'The provided role ID does not exist in the database: ' . $role['id']
+ 'The provided role ID does not exist in the database: ' . $role['id'],
);
}
}
@@ -227,7 +227,7 @@ class Roles_model extends EA_Model
'view' => false,
'add' => false,
'edit' => false,
- 'delete' => false
+ 'delete' => false,
];
if ($value > 0) {
@@ -308,7 +308,7 @@ class Roles_model extends EA_Model
array|string $where = null,
int $limit = null,
int $offset = null,
- string $order_by = null
+ string $order_by = null,
): array {
if ($where !== null) {
$this->db->where($where);
diff --git a/application/models/Secretaries_model.php b/application/models/Secretaries_model.php
index b7bb5cba..39e7db0c 100644
--- a/application/models/Secretaries_model.php
+++ b/application/models/Secretaries_model.php
@@ -25,7 +25,7 @@ class Secretaries_model extends EA_Model
*/
protected array $casts = [
'id' => 'integer',
- 'id_roles' => 'integer'
+ 'id_roles' => 'integer',
];
/**
@@ -45,7 +45,7 @@ class Secretaries_model extends EA_Model
'timezone' => 'timezone',
'language' => 'language',
'notes' => 'notes',
- 'roleId' => 'id_roles'
+ 'roleId' => 'id_roles',
];
/**
@@ -84,7 +84,7 @@ class Secretaries_model extends EA_Model
if (!$count) {
throw new InvalidArgumentException(
- 'The provided secretary ID does not exist in the database: ' . $secretary['id']
+ 'The provided secretary ID does not exist in the database: ' . $secretary['id'],
);
}
}
@@ -110,7 +110,7 @@ class Secretaries_model extends EA_Model
foreach ($secretary['providers'] as $secretary_id) {
if (!is_numeric($secretary_id)) {
throw new InvalidArgumentException(
- 'The provided secretary providers are invalid: ' . print_r($secretary, true)
+ 'The provided secretary providers are invalid: ' . print_r($secretary, true),
);
}
}
@@ -122,7 +122,7 @@ class Secretaries_model extends EA_Model
if (!$this->validate_username($secretary['settings']['username'], $secretary_id)) {
throw new InvalidArgumentException(
- 'The provided username is already in use, please use a different one.'
+ 'The provided username is already in use, please use a different one.',
);
}
}
@@ -131,7 +131,7 @@ class Secretaries_model extends EA_Model
if (!empty($secretary['settings']['password'])) {
if (strlen($secretary['settings']['password']) < MIN_PASSWORD_LENGTH) {
throw new InvalidArgumentException(
- 'The secretary password must be at least ' . MIN_PASSWORD_LENGTH . ' characters long.'
+ 'The secretary password must be at least ' . MIN_PASSWORD_LENGTH . ' characters long.',
);
}
}
@@ -147,7 +147,7 @@ class Secretaries_model extends EA_Model
!in_array($secretary['settings']['calendar_view'], [CALENDAR_VIEW_DEFAULT, CALENDAR_VIEW_TABLE])
) {
throw new InvalidArgumentException(
- 'The provided calendar view is invalid: ' . $secretary['settings']['calendar_view']
+ 'The provided calendar view is invalid: ' . $secretary['settings']['calendar_view'],
);
}
@@ -166,7 +166,7 @@ class Secretaries_model extends EA_Model
if ($count > 0) {
throw new InvalidArgumentException(
- 'The provided email address is already in use, please use a different one.'
+ 'The provided email address is already in use, please use a different one.',
);
}
}
@@ -207,7 +207,7 @@ class Secretaries_model extends EA_Model
array|string $where = null,
int $limit = null,
int $offset = null,
- string $order_by = null
+ string $order_by = null,
): array {
$role_id = $this->get_secretary_role_id();
@@ -229,7 +229,7 @@ class Secretaries_model extends EA_Model
unset(
$secretary['settings']['id_users'],
$secretary['settings']['password'],
- $secretary['settings']['salt']
+ $secretary['settings']['salt'],
);
$secretary_provider_connections = $this->db
@@ -391,7 +391,7 @@ class Secretaries_model extends EA_Model
foreach ($provider_ids as $provider_id) {
$secretary_provider_connection = [
'id_users_secretary' => $secretary_id,
- 'id_users_provider' => $provider_id
+ 'id_users_provider' => $provider_id,
];
$this->db->insert('secretaries_providers', $secretary_provider_connection);
@@ -435,7 +435,7 @@ class Secretaries_model extends EA_Model
if (!$query->num_rows()) {
throw new InvalidArgumentException(
- 'The provided secretary ID was not found in the database: ' . $secretary_id
+ 'The provided secretary ID was not found in the database: ' . $secretary_id,
);
}
@@ -525,7 +525,7 @@ class Secretaries_model extends EA_Model
unset(
$secretary['settings']['id_users'],
$secretary['settings']['password'],
- $secretary['settings']['salt']
+ $secretary['settings']['salt'],
);
$secretary_provider_connections = $this->db
@@ -566,8 +566,8 @@ class Secretaries_model extends EA_Model
->get()
->result_array(),
default => throw new InvalidArgumentException(
- 'The requested secretary relation is not supported: ' . $resource
- )
+ 'The requested secretary relation is not supported: ' . $resource,
+ ),
};
}
}
@@ -596,8 +596,8 @@ class Secretaries_model extends EA_Model
'settings' => [
'username' => $secretary['settings']['username'],
'notifications' => filter_var($secretary['settings']['notifications'], FILTER_VALIDATE_BOOLEAN),
- 'calendarView' => $secretary['settings']['calendar_view']
- ]
+ 'calendarView' => $secretary['settings']['calendar_view'],
+ ],
];
$secretary = $encoded_resource;
@@ -681,7 +681,7 @@ class Secretaries_model extends EA_Model
if (array_key_exists('notifications', $secretary['settings'])) {
$decoded_resource['settings']['notifications'] = filter_var(
$secretary['settings']['notifications'],
- FILTER_VALIDATE_BOOLEAN
+ FILTER_VALIDATE_BOOLEAN,
);
}
@@ -723,7 +723,7 @@ class Secretaries_model extends EA_Model
if (!$secretary) {
throw new InvalidArgumentException(
- 'The provided secretary ID was not found in the database: ' . $secretary_id
+ 'The provided secretary ID was not found in the database: ' . $secretary_id,
);
}
diff --git a/application/models/Service_categories_model.php b/application/models/Service_categories_model.php
index 210fbd29..88d624d2 100644
--- a/application/models/Service_categories_model.php
+++ b/application/models/Service_categories_model.php
@@ -24,7 +24,7 @@ class Service_categories_model extends EA_Model
* @var array
*/
protected array $casts = [
- 'id' => 'integer'
+ 'id' => 'integer',
];
/**
@@ -33,7 +33,7 @@ class Service_categories_model extends EA_Model
protected array $api_resource = [
'id' => 'id',
'name' => 'name',
- 'description' => 'description'
+ 'description' => 'description',
];
/**
@@ -71,7 +71,7 @@ class Service_categories_model extends EA_Model
if (!$count) {
throw new InvalidArgumentException(
- 'The provided service-category ID does not exist in the database: ' . $service_category['id']
+ 'The provided service-category ID does not exist in the database: ' . $service_category['id'],
);
}
}
@@ -79,7 +79,7 @@ class Service_categories_model extends EA_Model
// Make sure all required fields are provided.
if (empty($service_category['name'])) {
throw new InvalidArgumentException(
- 'Not all required fields are provided: ' . print_r($service_category, true)
+ 'Not all required fields are provided: ' . print_r($service_category, true),
);
}
}
@@ -152,7 +152,7 @@ class Service_categories_model extends EA_Model
if (!$service_category) {
throw new InvalidArgumentException(
- 'The provided service-category ID was not found in the database: ' . $service_category_id
+ 'The provided service-category ID was not found in the database: ' . $service_category_id,
);
}
@@ -186,7 +186,7 @@ class Service_categories_model extends EA_Model
if (!$query->num_rows()) {
throw new InvalidArgumentException(
- 'The provided service-category ID was not found in the database: ' . $service_category_id
+ 'The provided service-category ID was not found in the database: ' . $service_category_id,
);
}
@@ -197,7 +197,7 @@ class Service_categories_model extends EA_Model
if (!array_key_exists($field, $service_category)) {
throw new InvalidArgumentException(
- 'The requested field was not found in the service-category data: ' . $field
+ 'The requested field was not found in the service-category data: ' . $field,
);
}
@@ -260,7 +260,7 @@ class Service_categories_model extends EA_Model
array|string $where = null,
int $limit = null,
int $offset = null,
- string $order_by = null
+ string $order_by = null,
): array {
if ($where !== null) {
$this->db->where($where);
@@ -304,7 +304,7 @@ class Service_categories_model extends EA_Model
'name' => $service_category['name'],
'description' => array_key_exists('description', $service_category)
? $service_category['description']
- : null
+ : null,
];
$service_category = $encoded_resource;
diff --git a/application/models/Services_model.php b/application/models/Services_model.php
index 5ad51894..527eb1ca 100644
--- a/application/models/Services_model.php
+++ b/application/models/Services_model.php
@@ -28,7 +28,7 @@ class Services_model extends EA_Model
'price' => 'float',
'attendants_number' => 'integer',
'is_private' => 'boolean',
- 'id_service_categories' => 'integer'
+ 'id_service_categories' => 'integer',
];
/**
@@ -46,7 +46,7 @@ class Services_model extends EA_Model
'availabilitiesType' => 'availabilities_type',
'attendantsNumber' => 'attendants_number',
'isPrivate' => 'is_private',
- 'serviceCategoryId' => 'id_service_categories'
+ 'serviceCategoryId' => 'id_service_categories',
];
/**
@@ -84,7 +84,7 @@ class Services_model extends EA_Model
if (!$count) {
throw new InvalidArgumentException(
- 'The provided service ID does not exist in the database: ' . $service['id']
+ 'The provided service ID does not exist in the database: ' . $service['id'],
);
}
}
@@ -100,7 +100,7 @@ class Services_model extends EA_Model
if (!$count) {
throw new InvalidArgumentException(
- 'The provided category ID was not found in the database: ' . $service['id_service_categories']
+ 'The provided category ID was not found in the database: ' . $service['id_service_categories'],
);
}
}
@@ -109,7 +109,7 @@ class Services_model extends EA_Model
if (!empty($service['duration'])) {
if ((int) $service['duration'] < EVENT_MINIMUM_DURATION) {
throw new InvalidArgumentException(
- 'The service duration cannot be less than ' . EVENT_MINIMUM_DURATION . ' minutes long.'
+ 'The service duration cannot be less than ' . EVENT_MINIMUM_DURATION . ' minutes long.',
);
}
}
@@ -127,7 +127,7 @@ class Services_model extends EA_Model
AVAILABILITIES_TYPE_FIXED .
' (given ' .
$service['availabilities_type'] .
- ')'
+ ')',
);
}
@@ -137,14 +137,14 @@ class Services_model extends EA_Model
!in_array($service['availabilities_type'], [AVAILABILITIES_TYPE_FLEXIBLE, AVAILABILITIES_TYPE_FIXED])
) {
throw new InvalidArgumentException(
- 'The provided availabilities type is invalid: ' . $service['availabilities_type']
+ 'The provided availabilities type is invalid: ' . $service['availabilities_type'],
);
}
// Validate the attendants number value.
if (empty($service['attendants_number']) || (int) $service['attendants_number'] < 1) {
throw new InvalidArgumentException(
- 'The provided attendants number is invalid: ' . $service['attendants_number']
+ 'The provided attendants number is invalid: ' . $service['attendants_number'],
);
}
}
@@ -279,7 +279,7 @@ class Services_model extends EA_Model
$services = $this->db
->distinct()
->select(
- 'services.*, service_categories.name AS service_category_name, service_categories.id AS service_category_id'
+ 'services.*, service_categories.name AS service_category_name, service_categories.id AS service_category_id',
)
->from('services')
->join('services_providers', 'services_providers.id_services = services.id', 'inner')
@@ -309,7 +309,7 @@ class Services_model extends EA_Model
array|string $where = null,
int $limit = null,
int $offset = null,
- string $order_by = null
+ string $order_by = null,
): array {
if ($where !== null) {
$this->db->where($where);
@@ -388,12 +388,12 @@ class Services_model extends EA_Model
$service['category'] = match ($resource) {
'category' => $this->db
->get_where('categories', [
- 'id' => $service['id_service_categories'] ?? ($service['serviceCategoryId'] ?? null)
+ 'id' => $service['id_service_categories'] ?? ($service['serviceCategoryId'] ?? null),
])
->row_array(),
default => throw new InvalidArgumentException(
- 'The requested appointment relation is not supported: ' . $resource
- )
+ 'The requested appointment relation is not supported: ' . $resource,
+ ),
};
}
}
@@ -416,7 +416,7 @@ class Services_model extends EA_Model
'availabilitiesType' => $service['availabilities_type'],
'attendantsNumber' => (int) $service['attendants_number'],
'serviceCategoryId' =>
- $service['id_service_categories'] !== null ? (int) $service['id_service_categories'] : null
+ $service['id_service_categories'] !== null ? (int) $service['id_service_categories'] : null,
];
$service = $encoded_resource;
diff --git a/application/models/Settings_model.php b/application/models/Settings_model.php
index f7a3943c..a3fb7416 100644
--- a/application/models/Settings_model.php
+++ b/application/models/Settings_model.php
@@ -24,7 +24,7 @@ class Settings_model extends EA_Model
* @var array
*/
protected array $casts = [
- 'id' => 'integer'
+ 'id' => 'integer',
];
/**
@@ -32,7 +32,7 @@ class Settings_model extends EA_Model
*/
protected array $api_resource = [
'name' => 'name',
- 'value' => 'value'
+ 'value' => 'value',
];
/**
@@ -70,7 +70,7 @@ class Settings_model extends EA_Model
if (!$count) {
throw new InvalidArgumentException(
- 'The provided setting ID does not exist in the database: ' . $setting['id']
+ 'The provided setting ID does not exist in the database: ' . $setting['id'],
);
}
}
@@ -251,7 +251,7 @@ class Settings_model extends EA_Model
array|string $where = null,
int $limit = null,
int $offset = null,
- string $order_by = null
+ string $order_by = null,
): array {
if ($where !== null) {
$this->db->where($where);
@@ -292,7 +292,7 @@ class Settings_model extends EA_Model
{
$encoded_resource = [
'name' => $setting['name'],
- 'value' => $setting['value']
+ 'value' => $setting['value'],
];
$setting = $encoded_resource;
diff --git a/application/models/Unavailabilities_model.php b/application/models/Unavailabilities_model.php
index ef9d0a30..d2711e52 100644
--- a/application/models/Unavailabilities_model.php
+++ b/application/models/Unavailabilities_model.php
@@ -26,7 +26,7 @@ class Unavailabilities_model extends EA_Model
'is_unavailability' => 'boolean',
'id_users_provider' => 'integer',
'id_users_customer' => 'integer',
- 'id_services' => 'integer'
+ 'id_services' => 'integer',
];
/**
@@ -43,7 +43,7 @@ class Unavailabilities_model extends EA_Model
'notes' => 'notes',
'hash' => 'hash',
'providerId' => 'id_users_provider',
- 'googleCalendarId' => 'id_google_calendar'
+ 'googleCalendarId' => 'id_google_calendar',
];
/**
@@ -81,7 +81,7 @@ class Unavailabilities_model extends EA_Model
if (!$count) {
throw new InvalidArgumentException(
- 'The provided unavailability ID does not exist in the database: ' . $unavailability['id']
+ 'The provided unavailability ID does not exist in the database: ' . $unavailability['id'],
);
}
}
@@ -93,7 +93,7 @@ class Unavailabilities_model extends EA_Model
empty($unavailability['id_users_provider'])
) {
throw new InvalidArgumentException(
- 'Not all required fields are provided: ' . print_r($unavailability, true)
+ 'Not all required fields are provided: ' . print_r($unavailability, true),
);
}
@@ -111,7 +111,7 @@ class Unavailabilities_model extends EA_Model
if ($diff < EVENT_MINIMUM_DURATION) {
throw new InvalidArgumentException(
- 'The unavailability duration cannot be less than ' . EVENT_MINIMUM_DURATION . ' minutes.'
+ 'The unavailability duration cannot be less than ' . EVENT_MINIMUM_DURATION . ' minutes.',
);
}
@@ -127,7 +127,7 @@ class Unavailabilities_model extends EA_Model
if (!$count) {
throw new InvalidArgumentException(
- 'The unavailability provider ID was not found in the database: ' . $unavailability['id_users_provider']
+ 'The unavailability provider ID was not found in the database: ' . $unavailability['id_users_provider'],
);
}
}
@@ -146,7 +146,7 @@ class Unavailabilities_model extends EA_Model
array|string $where = null,
int $limit = null,
int $offset = null,
- string $order_by = null
+ string $order_by = null,
): array {
if ($where !== null) {
$this->db->where($where);
@@ -238,7 +238,7 @@ class Unavailabilities_model extends EA_Model
if (!$unavailability) {
throw new InvalidArgumentException(
- 'The provided unavailability ID was not found in the database: ' . $unavailability_id
+ 'The provided unavailability ID was not found in the database: ' . $unavailability_id,
);
}
@@ -272,7 +272,7 @@ class Unavailabilities_model extends EA_Model
if (!$query->num_rows()) {
throw new InvalidArgumentException(
- 'The provided unavailability ID was not found in the database: ' . $unavailability_id
+ 'The provided unavailability ID was not found in the database: ' . $unavailability_id,
);
}
@@ -283,7 +283,7 @@ class Unavailabilities_model extends EA_Model
if (!array_key_exists($field, $unavailability)) {
throw new InvalidArgumentException(
- 'The requested field was not found in the unavailability data: ' . $field
+ 'The requested field was not found in the unavailability data: ' . $field,
);
}
@@ -359,12 +359,12 @@ class Unavailabilities_model extends EA_Model
$unavailability['provider'] = match ($resource) {
'provider' => $this->db
->get_where('users', [
- 'id' => $unavailability['id_users_provider'] ?? ($unavailability['providerId'] ?? null)
+ 'id' => $unavailability['id_users_provider'] ?? ($unavailability['providerId'] ?? null),
])
->row_array(),
default => throw new InvalidArgumentException(
- 'The requested unavailability relation is not supported: ' . $resource
- )
+ 'The requested unavailability relation is not supported: ' . $resource,
+ ),
};
}
}
@@ -387,7 +387,7 @@ class Unavailabilities_model extends EA_Model
'providerId' =>
$unavailability['id_users_provider'] !== null ? (int) $unavailability['id_users_provider'] : null,
'googleCalendarId' =>
- $unavailability['id_google_calendar'] !== null ? (int) $unavailability['id_google_calendar'] : null
+ $unavailability['id_google_calendar'] !== null ? (int) $unavailability['id_google_calendar'] : null,
];
$unavailability = $encoded_resource;
diff --git a/application/models/Users_model.php b/application/models/Users_model.php
index 48c5df29..3bc01245 100644
--- a/application/models/Users_model.php
+++ b/application/models/Users_model.php
@@ -25,7 +25,7 @@ class Users_model extends EA_Model
*/
protected array $casts = [
'id' => 'integer',
- 'id_roles' => 'integer'
+ 'id_roles' => 'integer',
];
/**
@@ -45,7 +45,7 @@ class Users_model extends EA_Model
'timezone' => 'timezone',
'language' => 'language',
'notes' => 'notes',
- 'roleId' => 'id_roles'
+ 'roleId' => 'id_roles',
];
/**
@@ -84,7 +84,7 @@ class Users_model extends EA_Model
if (!$count) {
throw new InvalidArgumentException(
- 'The provided user ID does not exist in the database: ' . $user['id']
+ 'The provided user ID does not exist in the database: ' . $user['id'],
);
}
}
@@ -369,7 +369,7 @@ class Users_model extends EA_Model
array|string $where = null,
int $limit = null,
int $offset = null,
- string $order_by = null
+ string $order_by = null,
): array {
if ($where !== null) {
$this->db->where($where);
diff --git a/application/models/Webhooks_model.php b/application/models/Webhooks_model.php
index db21c8ab..18cec3cb 100644
--- a/application/models/Webhooks_model.php
+++ b/application/models/Webhooks_model.php
@@ -26,7 +26,7 @@ class Webhooks_model extends EA_Model
protected array $casts = [
'id' => 'integer',
'is_active' => 'boolean',
- 'is_ssl_verified' => 'boolean'
+ 'is_ssl_verified' => 'boolean',
];
/**
@@ -40,7 +40,7 @@ class Webhooks_model extends EA_Model
'secretToken' => 'secret_token',
'isActive' => 'is_active',
'isSslVerified' => 'is_ssl_verified',
- 'notes' => 'notes'
+ 'notes' => 'notes',
];
/**
@@ -246,7 +246,7 @@ class Webhooks_model extends EA_Model
array|string $where = null,
int $limit = null,
int $offset = null,
- string $order_by = null
+ string $order_by = null,
): array {
if ($where !== null) {
$this->db->where($where);
diff --git a/application/views/components/appointments_modal.php b/application/views/components/appointments_modal.php
index 3c333e2e..93e55282 100644
--- a/application/views/components/appointments_modal.php
+++ b/application/views/components/appointments_modal.php
@@ -321,7 +321,7 @@
'id="timezone" class="form-control required"',
- 'grouped_timezones' => vars('grouped_timezones')
+ 'grouped_timezones' => vars('grouped_timezones'),
]); ?>
diff --git a/application/views/components/backend_header.php b/application/views/components/backend_header.php
index a58ada02..e1ba0d9e 100755
--- a/application/views/components/backend_header.php
+++ b/application/views/components/backend_header.php
@@ -25,7 +25,7 @@
diff --git a/application/views/components/booking_final_step.php b/application/views/components/booking_final_step.php
index 37175810..bd0abae1 100644
--- a/application/views/components/booking_final_step.php
+++ b/application/views/components/booking_final_step.php
@@ -39,7 +39,7 @@
',
]) ?>
@@ -51,7 +51,7 @@
diff --git a/application/views/components/booking_time_step.php b/application/views/components/booking_time_step.php
index 5e7d8731..79732467 100644
--- a/application/views/components/booking_time_step.php
+++ b/application/views/components/booking_time_step.php
@@ -24,7 +24,7 @@
'id="select-timezone" class="form-control" value="UTC"',
- 'grouped_timezones' => $grouped_timezones
+ 'grouped_timezones' => $grouped_timezones,
]); ?>
diff --git a/application/views/layouts/booking_layout.php b/application/views/layouts/booking_layout.php
index 86cb7b9e..0ccf956f 100644
--- a/application/views/layouts/booking_layout.php
+++ b/application/views/layouts/booking_layout.php
@@ -39,7 +39,7 @@
vars('company_name'),
- 'company_logo' => vars('company_logo')
+ 'company_logo' => vars('company_logo'),
]); ?>
@@ -56,7 +56,7 @@
vars('terms_and_conditions_content')
+ 'terms_and_conditions_content' => vars('terms_and_conditions_content'),
]); ?>
diff --git a/application/views/pages/account.php b/application/views/pages/account.php
index 0a65e22d..4639aa6e 100644
--- a/application/views/pages/account.php
+++ b/application/views/pages/account.php
@@ -155,7 +155,7 @@
'id="timezone" class="form-control required"',
- 'grouped_timezones' => vars('grouped_timezones')
+ 'grouped_timezones' => vars('grouped_timezones'),
]); ?>
diff --git a/application/views/pages/admins.php b/application/views/pages/admins.php
index cd6b0fd8..16c43749 100755
--- a/application/views/pages/admins.php
+++ b/application/views/pages/admins.php
@@ -198,7 +198,7 @@
'id="timezone" class="form-control required" disabled',
- 'grouped_timezones' => vars('grouped_timezones')
+ 'grouped_timezones' => vars('grouped_timezones'),
]); ?>
diff --git a/application/views/pages/booking.php b/application/views/pages/booking.php
index 7d21d79f..1ca82814 100755
--- a/application/views/pages/booking.php
+++ b/application/views/pages/booking.php
@@ -7,7 +7,7 @@
vars('manage_mode'),
'appointment_data' => vars('appointment_data'),
- 'display_delete_personal_information' => vars('display_delete_personal_information')
+ 'display_delete_personal_information' => vars('display_delete_personal_information'),
]); ?>
@@ -36,7 +36,7 @@
'display_zip_code' => vars('display_zip_code'),
'require_zip_code' => vars('require_zip_code'),
'display_notes' => vars('display_notes'),
- 'require_notes' => vars('require_notes')
+ 'require_notes' => vars('require_notes'),
]); ?>
@@ -44,7 +44,7 @@
vars('manage_mode'),
'display_terms_and_conditions' => vars('display_terms_and_conditions'),
- 'display_privacy_policy' => vars('display_privacy_policy')
+ 'display_privacy_policy' => vars('display_privacy_policy'),
]); ?>
diff --git a/application/views/pages/business_settings.php b/application/views/pages/business_settings.php
index 7448cab6..ab8fc134 100755
--- a/application/views/pages/business_settings.php
+++ b/application/views/pages/business_settings.php
@@ -91,7 +91,7 @@
= lang(
- 'allow_rescheduling_cancellation_before'
+ 'allow_rescheduling_cancellation_before',
) ?>
@@ -133,7 +133,7 @@
'id="appointment-status-options"'
+ 'attributes' => 'id="appointment-status-options"',
]); ?>
diff --git a/application/views/pages/calendar.php b/application/views/pages/calendar.php
index f80782d1..fdd175c0 100755
--- a/application/views/pages/calendar.php
+++ b/application/views/pages/calendar.php
@@ -97,12 +97,12 @@
'require_address' => vars('require_address'),
'require_city' => vars('require_city'),
'require_zip_code' => vars('require_zip_code'),
- 'require_notes' => vars('require_notes')
+ 'require_notes' => vars('require_notes'),
]); ?>
vars('timezones'),
- 'timezone' => vars('timezone')
+ 'timezone' => vars('timezone'),
]); ?>
diff --git a/application/views/pages/customers.php b/application/views/pages/customers.php
index 69c59f2d..a9dc21bb 100755
--- a/application/views/pages/customers.php
+++ b/application/views/pages/customers.php
@@ -177,12 +177,12 @@
'id="timezone" class="form-control required" disabled',
- 'grouped_timezones' => vars('grouped_timezones')
+ 'grouped_timezones' => vars('grouped_timezones'),
]); ?>
true
+ 'disabled' => true,
]); ?>
diff --git a/application/views/pages/legal_settings.php b/application/views/pages/legal_settings.php
index 91907a97..3b55594a 100755
--- a/application/views/pages/legal_settings.php
+++ b/application/views/pages/legal_settings.php
@@ -55,7 +55,7 @@
diff --git a/application/views/pages/providers.php b/application/views/pages/providers.php
index 6fac8e4e..a093ce9a 100755
--- a/application/views/pages/providers.php
+++ b/application/views/pages/providers.php
@@ -221,7 +221,7 @@
'id="timezone" class="form-control required" disabled',
- 'grouped_timezones' => vars('grouped_timezones')
+ 'grouped_timezones' => vars('grouped_timezones'),
]); ?>
diff --git a/application/views/pages/secretaries.php b/application/views/pages/secretaries.php
index 73d8a135..01a32911 100755
--- a/application/views/pages/secretaries.php
+++ b/application/views/pages/secretaries.php
@@ -197,7 +197,7 @@
'id="timezone" class="form-control required" disabled',
- 'grouped_timezones' => vars('grouped_timezones')
+ 'grouped_timezones' => vars('grouped_timezones'),
]); ?>
diff --git a/assets/css/general.scss b/assets/css/general.scss
index c20354f9..f2247a23 100644
--- a/assets/css/general.scss
+++ b/assets/css/general.scss
@@ -21,7 +21,7 @@ html {
body .ui-widget {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif,
- 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
+ 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
font-size: 1.1em;
}
@@ -180,7 +180,7 @@ body .ui-widget input,
body .ui-widget textarea,
body .ui-widget button {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif,
- 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
+ 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
font-size: 1rem;
}
@@ -443,29 +443,29 @@ body .clearfix {
box-shadow: none;
.flatpickr-monthDropdown-months:hover {
- background: rgba(0,0,0,.05) !important;
+ background: rgba(0, 0, 0, 0.05) !important;
}
-
+
.flatpickr-months {
padding: 10px 0;
background: #449a82;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
}
-
+
.flatpickr-current-month {
- padding: 3px;
+ padding: 3px;
}
-
+
.flatpickr-innerContainer {
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
}
-
+
.dayContainer {
padding: 10px 0;
}
-
+
.flatpickr-months .flatpickr-month,
.flatpickr-weekdays,
.flatpickr-current-month .flatpickr-monthDropdown-months,
@@ -474,7 +474,24 @@ body .clearfix {
color: white;
}
- .flatpickr-day.endRange, .flatpickr-day.endRange.inRange, .flatpickr-day.endRange.nextMonthDay, .flatpickr-day.endRange.prevMonthDay, .flatpickr-day.endRange:focus, .flatpickr-day.endRange:hover, .flatpickr-day.selected, .flatpickr-day.selected.inRange, .flatpickr-day.selected.nextMonthDay, .flatpickr-day.selected.prevMonthDay, .flatpickr-day.selected:focus, .flatpickr-day.selected:hover, .flatpickr-day.startRange, .flatpickr-day.startRange.inRange, .flatpickr-day.startRange.nextMonthDay, .flatpickr-day.startRange.prevMonthDay, .flatpickr-day.startRange:focus, .flatpickr-day.startRange:hover {
+ .flatpickr-day.endRange,
+ .flatpickr-day.endRange.inRange,
+ .flatpickr-day.endRange.nextMonthDay,
+ .flatpickr-day.endRange.prevMonthDay,
+ .flatpickr-day.endRange:focus,
+ .flatpickr-day.endRange:hover,
+ .flatpickr-day.selected,
+ .flatpickr-day.selected.inRange,
+ .flatpickr-day.selected.nextMonthDay,
+ .flatpickr-day.selected.prevMonthDay,
+ .flatpickr-day.selected:focus,
+ .flatpickr-day.selected:hover,
+ .flatpickr-day.startRange,
+ .flatpickr-day.startRange.inRange,
+ .flatpickr-day.startRange.nextMonthDay,
+ .flatpickr-day.startRange.prevMonthDay,
+ .flatpickr-day.startRange:focus,
+ .flatpickr-day.startRange:hover {
background: #429a82;
border-color: #429a82;
color: white;
diff --git a/assets/css/layouts/backend_layout.scss b/assets/css/layouts/backend_layout.scss
index 0e2bb293..bc4a9956 100644
--- a/assets/css/layouts/backend_layout.scss
+++ b/assets/css/layouts/backend_layout.scss
@@ -347,7 +347,7 @@ body legend {
}
#calendar .fc-header-toolbar {
- display: block ;
+ display: block;
}
#calendar .fc-header-toolbar .fc-toolbar-chunk {
@@ -358,8 +358,8 @@ body legend {
#calendar .fc-col-header-cell-cushion {
text-decoration: none;
text-transform: none;
- cursor: default;
- color: var(--bs-body-color) !important;
+ cursor: default;
+ color: var(--bs-body-color) !important;
}
#calendar .calendar-header .select2-container {
@@ -406,7 +406,6 @@ body legend {
text-shadow: none;
}
-
#calendar-page .fc-event-time {
font-weight: bold;
}
@@ -834,7 +833,7 @@ body .form-horizontal .controls {
#working-plan-exceptions-breaks {
table-layout: fixed;
-
+
.form-control {
width: 100% !important;
}
@@ -870,7 +869,7 @@ body .form-horizontal .controls {
display: block;
text-decoration: none;
text-transform: uppercase;
- font-size: .7rem;
+ font-size: 0.7rem;
margin-top: 2px;
margin-left: -24px;
margin-bottom: 2px;
diff --git a/assets/css/layouts/booking_layout.scss b/assets/css/layouts/booking_layout.scss
index acec0dc2..bc322054 100644
--- a/assets/css/layouts/booking_layout.scss
+++ b/assets/css/layouts/booking_layout.scss
@@ -51,13 +51,13 @@ body {
font-weight: lighter;
color: #fff;
margin: 20px 0;
-
+
#company-logo {
display: block;
margin: 14px auto;
max-height: 56px;
}
-
+
.display-selected-service,
.display-selected-provider {
color: #225d4d;
@@ -65,7 +65,6 @@ body {
font-size: 60%;
font-weight: normal;
}
-
}
#book-appointment-wizard #steps {
diff --git a/assets/css/themes/cosmo.scss b/assets/css/themes/cosmo.scss
index 638161ef..bcd3874a 100644
--- a/assets/css/themes/cosmo.scss
+++ b/assets/css/themes/cosmo.scss
@@ -12,13 +12,13 @@
// Cosmo 5.1.3
// Bootswatch
-$theme: "cosmo" !default;
+$theme: 'cosmo' !default;
//
// Color system
//
-$white: #fff !default;
+$white: #fff !default;
$gray-100: #f8f9fa !default;
$gray-200: #e9ecef !default;
$gray-300: #dee2e6 !default;
@@ -28,29 +28,29 @@ $gray-600: #868e96 !default;
$gray-700: #495057 !default;
$gray-800: #373a3c !default;
$gray-900: #212529 !default;
-$black: #000 !default;
+$black: #000 !default;
-$blue: #2780e3 !default;
-$indigo: #6610f2 !default;
-$purple: #613d7c !default;
-$pink: #e83e8c !default;
-$red: #ff0039 !default;
-$orange: #f0ad4e !default;
-$yellow: #ff7518 !default;
-$green: #3fb618 !default;
-$teal: #20c997 !default;
-$cyan: #9954bb !default;
+$blue: #2780e3 !default;
+$indigo: #6610f2 !default;
+$purple: #613d7c !default;
+$pink: #e83e8c !default;
+$red: #ff0039 !default;
+$orange: #f0ad4e !default;
+$yellow: #ff7518 !default;
+$green: #3fb618 !default;
+$teal: #20c997 !default;
+$cyan: #9954bb !default;
-$primary: $blue !default;
-$secondary: $gray-800 !default;
-$success: $green !default;
-$info: $cyan !default;
-$warning: $yellow !default;
-$danger: $red !default;
-$light: $gray-100 !default;
-$dark: $gray-800 !default;
+$primary: $blue !default;
+$secondary: $gray-800 !default;
+$success: $green !default;
+$info: $cyan !default;
+$warning: $yellow !default;
+$danger: $red !default;
+$light: $gray-100 !default;
+$dark: $gray-800 !default;
-$min-contrast-ratio: 2.6 !default;
+$min-contrast-ratio: 2.6 !default;
// Options
@@ -58,36 +58,46 @@ $enable-rounded: false !default;
// Body
-$body-color: $gray-800 !default;
+$body-color: $gray-800 !default;
// Fonts
// stylelint-disable-next-line value-keyword-case
-$font-family-sans-serif: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !default;
-$headings-font-weight: 400 !default;
+$font-family-sans-serif:
+ 'Source Sans Pro',
+ -apple-system,
+ BlinkMacSystemFont,
+ 'Segoe UI',
+ Roboto,
+ 'Helvetica Neue',
+ Arial,
+ sans-serif,
+ 'Apple Color Emoji',
+ 'Segoe UI Emoji',
+ 'Segoe UI Symbol' !default;
+$headings-font-weight: 400 !default;
// Navbar
-$navbar-dark-hover-color: rgba($white, 1) !default;
-$navbar-light-hover-color: rgba($black, .9) !default;
+$navbar-dark-hover-color: rgba($white, 1) !default;
+$navbar-light-hover-color: rgba($black, 0.9) !default;
// Alerts
-$alert-border-width: 0% !default;
+$alert-border-width: 0% !default;
// Progress bars
-$progress-height: .5rem !default;
+$progress-height: 0.5rem !default;
@import '../../../node_modules/bootstrap/scss/bootstrap';
// Cosmo 5.1.3
// Bootswatch
-
// Variables
-$web-font-path: "https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;400;700&display=swap" !default;
+$web-font-path: 'https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;400;700&display=swap' !default;
@if $web-font-path {
@import url($web-font-path);
}
diff --git a/assets/css/themes/darkly.scss b/assets/css/themes/darkly.scss
index caec79e5..3e0ae109 100644
--- a/assets/css/themes/darkly.scss
+++ b/assets/css/themes/darkly.scss
@@ -12,13 +12,13 @@
// Darkly 5.1.3
// Bootswatch
-$theme: "darkly" !default;
+$theme: 'darkly' !default;
//
// Color system
//
-$white: #fff !default;
+$white: #fff !default;
$gray-100: #f8f9fa !default;
$gray-200: #ebebeb !default;
$gray-300: #dee2e6 !default;
@@ -28,170 +28,180 @@ $gray-600: #888 !default;
$gray-700: #444 !default;
$gray-800: #303030 !default;
$gray-900: #222 !default;
-$black: #000 !default;
+$black: #000 !default;
-$blue: #375a7f !default;
-$indigo: #6610f2 !default;
-$purple: #6f42c1 !default;
-$pink: #e83e8c !default;
-$red: #e74c3c !default;
-$orange: #fd7e14 !default;
-$yellow: #f39c12 !default;
-$green: #00bc8c !default;
-$teal: #20c997 !default;
-$cyan: #3498db !default;
+$blue: #375a7f !default;
+$indigo: #6610f2 !default;
+$purple: #6f42c1 !default;
+$pink: #e83e8c !default;
+$red: #e74c3c !default;
+$orange: #fd7e14 !default;
+$yellow: #f39c12 !default;
+$green: #00bc8c !default;
+$teal: #20c997 !default;
+$cyan: #3498db !default;
-$primary: $blue !default;
-$secondary: $gray-700 !default;
-$success: $green !default;
-$info: $cyan !default;
-$warning: $yellow !default;
-$danger: $red !default;
-$light: $gray-500 !default;
-$dark: $gray-800 !default;
+$primary: $blue !default;
+$secondary: $gray-700 !default;
+$success: $green !default;
+$info: $cyan !default;
+$warning: $yellow !default;
+$danger: $red !default;
+$light: $gray-500 !default;
+$dark: $gray-800 !default;
-$min-contrast-ratio: 1.9 !default;
+$min-contrast-ratio: 1.9 !default;
// Body
-$body-bg: $gray-900 !default;
-$body-color: $white !default;
+$body-bg: $gray-900 !default;
+$body-color: $white !default;
// Links
-$link-color: $success !default;
+$link-color: $success !default;
// Fonts
// stylelint-disable-next-line value-keyword-case
-$font-family-sans-serif: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !default;
-$h1-font-size: 3rem !default;
-$h2-font-size: 2.5rem !default;
-$h3-font-size: 2rem !default;
-$text-muted: $gray-600 !default;
+$font-family-sans-serif:
+ Lato,
+ -apple-system,
+ BlinkMacSystemFont,
+ 'Segoe UI',
+ Roboto,
+ 'Helvetica Neue',
+ Arial,
+ sans-serif,
+ 'Apple Color Emoji',
+ 'Segoe UI Emoji',
+ 'Segoe UI Symbol' !default;
+$h1-font-size: 3rem !default;
+$h2-font-size: 2.5rem !default;
+$h3-font-size: 2rem !default;
+$text-muted: $gray-600 !default;
// Tables
-$table-border-color: $gray-700 !default;
+$table-border-color: $gray-700 !default;
-$table-bg-scale: 0% !default;
+$table-bg-scale: 0% !default;
// Forms
-$input-bg: $white !default;
-$input-color: $gray-800 !default;
-$input-border-color: $body-bg !default;
-$input-group-addon-color: $gray-500 !default;
-$input-group-addon-bg: $gray-700 !default;
+$input-bg: $white !default;
+$input-color: $gray-800 !default;
+$input-border-color: $body-bg !default;
+$input-group-addon-color: $gray-500 !default;
+$input-group-addon-bg: $gray-700 !default;
-$form-check-input-bg: $white !default;
-$form-check-input-border: none !default;
+$form-check-input-bg: $white !default;
+$form-check-input-border: none !default;
-$form-file-button-color: $white !default;
+$form-file-button-color: $white !default;
// Dropdowns
-$dropdown-bg: $gray-900 !default;
-$dropdown-border-color: $gray-700 !default;
-$dropdown-divider-bg: $gray-700 !default;
-$dropdown-link-color: $white !default;
-$dropdown-link-hover-color: $white !default;
-$dropdown-link-hover-bg: $primary !default;
+$dropdown-bg: $gray-900 !default;
+$dropdown-border-color: $gray-700 !default;
+$dropdown-divider-bg: $gray-700 !default;
+$dropdown-link-color: $white !default;
+$dropdown-link-hover-color: $white !default;
+$dropdown-link-hover-bg: $primary !default;
// Navs
-$nav-link-padding-x: 2rem !default;
-$nav-link-disabled-color: $gray-500 !default;
-$nav-tabs-border-color: $gray-700 !default;
-$nav-tabs-link-hover-border-color: $nav-tabs-border-color $nav-tabs-border-color transparent !default;
-$nav-tabs-link-active-color: $white !default;
+$nav-link-padding-x: 2rem !default;
+$nav-link-disabled-color: $gray-500 !default;
+$nav-tabs-border-color: $gray-700 !default;
+$nav-tabs-link-hover-border-color: $nav-tabs-border-color $nav-tabs-border-color transparent !default;
+$nav-tabs-link-active-color: $white !default;
$nav-tabs-link-active-border-color: $nav-tabs-border-color $nav-tabs-border-color transparent !default;
// Navbar
-$navbar-padding-y: 1rem !default;
-$navbar-dark-color: rgba($white, .6) !default;
-$navbar-dark-hover-color: $white !default;
-$navbar-light-color: rgba($gray-900, .7) !default;
-$navbar-light-hover-color: $gray-900 !default;
-$navbar-light-active-color: $gray-900 !default;
-$navbar-light-toggler-border-color: rgba($gray-900, .1) !default;
+$navbar-padding-y: 1rem !default;
+$navbar-dark-color: rgba($white, 0.6) !default;
+$navbar-dark-hover-color: $white !default;
+$navbar-light-color: rgba($gray-900, 0.7) !default;
+$navbar-light-hover-color: $gray-900 !default;
+$navbar-light-active-color: $gray-900 !default;
+$navbar-light-toggler-border-color: rgba($gray-900, 0.1) !default;
// Pagination
-$pagination-color: $white !default;
-$pagination-bg: $success !default;
-$pagination-border-width: 0% !default;
-$pagination-border-color: transparent !default;
-$pagination-hover-color: $white !default;
-$pagination-hover-bg: lighten($success, 10%) !default;
-$pagination-hover-border-color: transparent !default;
-$pagination-active-bg: $pagination-hover-bg !default;
-$pagination-active-border-color: transparent !default;
-$pagination-disabled-color: $white !default;
-$pagination-disabled-bg: darken($success, 15%) !default;
-$pagination-disabled-border-color: transparent !default;
+$pagination-color: $white !default;
+$pagination-bg: $success !default;
+$pagination-border-width: 0% !default;
+$pagination-border-color: transparent !default;
+$pagination-hover-color: $white !default;
+$pagination-hover-bg: lighten($success, 10%) !default;
+$pagination-hover-border-color: transparent !default;
+$pagination-active-bg: $pagination-hover-bg !default;
+$pagination-active-border-color: transparent !default;
+$pagination-disabled-color: $white !default;
+$pagination-disabled-bg: darken($success, 15%) !default;
+$pagination-disabled-border-color: transparent !default;
// Cards
-$card-cap-bg: $gray-700 !default;
-$card-bg: $gray-800 !default;
+$card-cap-bg: $gray-700 !default;
+$card-bg: $gray-800 !default;
// Popovers
-$popover-bg: $gray-800 !default;
-$popover-header-bg: $gray-700 !default;
+$popover-bg: $gray-800 !default;
+$popover-header-bg: $gray-700 !default;
// Toasts
-$toast-background-color: $gray-700 !default;
-$toast-header-background-color: $gray-800 !default;
+$toast-background-color: $gray-700 !default;
+$toast-header-background-color: $gray-800 !default;
// Modals
-$modal-content-bg: $gray-800 !default;
-$modal-content-border-color: $gray-700 !default;
-$modal-header-border-color: $gray-700 !default;
+$modal-content-bg: $gray-800 !default;
+$modal-content-border-color: $gray-700 !default;
+$modal-header-border-color: $gray-700 !default;
// Progress bars
-$progress-bg: $gray-700 !default;
+$progress-bg: $gray-700 !default;
// List group
-$list-group-color: $body-color !default;
-$list-group-bg: $gray-800 !default;
-$list-group-border-color: $gray-700 !default;
-$list-group-hover-bg: $gray-700 !default;
-$list-group-action-hover-color: $list-group-color !default;
-$list-group-action-active-bg: $gray-900 !default;
+$list-group-color: $body-color !default;
+$list-group-bg: $gray-800 !default;
+$list-group-border-color: $gray-700 !default;
+$list-group-hover-bg: $gray-700 !default;
+$list-group-action-hover-color: $list-group-color !default;
+$list-group-action-active-bg: $gray-900 !default;
// Breadcrumbs
-$breadcrumb-padding-y: .375rem !default;
-$breadcrumb-padding-x: .75rem !default;
-$breadcrumb-bg: $gray-700 !default;
-$breadcrumb-border-radius: .25rem !default;
+$breadcrumb-padding-y: 0.375rem !default;
+$breadcrumb-padding-x: 0.75rem !default;
+$breadcrumb-bg: $gray-700 !default;
+$breadcrumb-border-radius: 0.25rem !default;
// Close
-$btn-close-color: $white !default;
-$btn-close-opacity: .4 !default;
-$btn-close-hover-opacity: 1 !default;
+$btn-close-color: $white !default;
+$btn-close-opacity: 0.4 !default;
+$btn-close-hover-opacity: 1 !default;
// Code
-$pre-color: inherit !default;
+$pre-color: inherit !default;
@import '../../../node_modules/bootstrap/scss/bootstrap';
// Darkly 5.1.3
// Bootswatch
-
// Variables
-$web-font-path: "https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400&display=swap" !default;
+$web-font-path: 'https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400&display=swap' !default;
@if $web-font-path {
@import url($web-font-path);
}
diff --git a/assets/css/themes/default.scss b/assets/css/themes/default.scss
index 8467e5c8..e1a28a28 100644
--- a/assets/css/themes/default.scss
+++ b/assets/css/themes/default.scss
@@ -12,7 +12,7 @@
// Lux 5.1.3
// Bootswatch
-$theme: "lux" !default;
+$theme: 'lux' !default;
//
// Color system
@@ -69,13 +69,13 @@ $h2-font-size: 1.75rem !default;
$h3-font-size: 1.5rem !default;
$h4-font-size: 1.25rem !default;
$h5-font-size: 1rem !default;
-$h6-font-size: .75rem !default;
+$h6-font-size: 0.75rem !default;
$headings-font-weight: 600 !default;
$headings-color: $gray-900 !default;
// Tables
-$table-border-color: rgba(0, 0, 0, .05) !default;
+$table-border-color: rgba(0, 0, 0, 0.05) !default;
// Buttons + Forms
@@ -84,10 +84,10 @@ $input-btn-border-width: 1px !default;
// Buttons
$btn-line-height: 1.25rem !default;
-$input-btn-padding-y: .6rem !default;
+$input-btn-padding-y: 0.6rem !default;
$input-btn-padding-x: 1rem !default;
-$input-btn-padding-y-sm: .35rem !default;
-$input-btn-padding-x-sm: .5rem !default;
+$input-btn-padding-y-sm: 0.35rem !default;
+$input-btn-padding-x-sm: 0.5rem !default;
$input-btn-padding-y-lg: 1.85rem !default;
$input-btn-padding-x-lg: 1.5rem !default;
$btn-font-weight: 600 !default;
@@ -103,7 +103,7 @@ $input-group-addon-bg: $gray-300 !default;
$navbar-padding-y: 1.5rem !default;
$navbar-dark-hover-color: $white !default;
-$navbar-light-color: rgba($black, .3) !default;
+$navbar-light-color: rgba($black, 0.3) !default;
$navbar-light-hover-color: $gray-900 !default;
$navbar-light-active-color: $gray-900 !default;
@@ -117,10 +117,9 @@ $pagination-disabled-border-color: $pagination-border-color !default;
// Bootswatch (Lux)
-
// Variables
-// Hint: Use the following $var to load a custom font.
+// Hint: Use the following $var to load a custom font.
// $web-font-path: "https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;600&display=swap" !default;
// @if $web-font-path {
// @import url($web-font-path);
@@ -135,8 +134,8 @@ $pagination-disabled-border-color: $pagination-border-color !default;
&-nav {
.nav-link {
- padding-top: .715rem;
- padding-bottom: .715rem;
+ padding-top: 0.715rem;
+ padding-bottom: 0.715rem;
}
}
@@ -196,16 +195,17 @@ $pagination-disabled-border-color: $pagination-border-color !default;
}
&:not([disabled]):not(.disabled):focus {
- box-shadow: 0 0 0 .2rem rgba($gray-400, .5);
+ box-shadow: 0 0 0 0.2rem rgba($gray-400, 0.5);
}
- &[disabled], &.disabled {
+ &[disabled],
+ &.disabled {
color: $gray-400;
border-color: $gray-400;
}
}
-[class*="btn-outline-"] {
+[class*='btn-outline-'] {
border-width: 1px;
}
@@ -214,7 +214,7 @@ $pagination-disabled-border-color: $pagination-border-color !default;
}
.btn-close {
- opacity: .3;
+ opacity: 0.3;
}
// Typography
@@ -260,7 +260,7 @@ th {
// Indicators
.badge {
- padding-top: .28rem;
+ padding-top: 0.28rem;
&-pill {
border-radius: 10rem;
diff --git a/assets/css/themes/flatly.scss b/assets/css/themes/flatly.scss
index 3737678c..b0678a2a 100644
--- a/assets/css/themes/flatly.scss
+++ b/assets/css/themes/flatly.scss
@@ -12,13 +12,13 @@
// Flatly 5.1.3
// Bootswatch
-$theme: "flatly" !default;
+$theme: 'flatly' !default;
//
// Color system
//
-$white: #fff !default;
+$white: #fff !default;
$gray-100: #f8f9fa !default;
$gray-200: #ecf0f1 !default;
$gray-300: #dee2e6 !default;
@@ -28,110 +28,120 @@ $gray-600: #95a5a6 !default;
$gray-700: #7b8a8b !default;
$gray-800: #343a40 !default;
$gray-900: #212529 !default;
-$black: #000 !default;
+$black: #000 !default;
-$blue: #2c3e50 !default;
-$indigo: #6610f2 !default;
-$purple: #6f42c1 !default;
-$pink: #e83e8c !default;
-$red: #e74c3c !default;
-$orange: #fd7e14 !default;
-$yellow: #f39c12 !default;
-$green: #18bc9c !default;
-$teal: #20c997 !default;
-$cyan: #3498db !default;
+$blue: #2c3e50 !default;
+$indigo: #6610f2 !default;
+$purple: #6f42c1 !default;
+$pink: #e83e8c !default;
+$red: #e74c3c !default;
+$orange: #fd7e14 !default;
+$yellow: #f39c12 !default;
+$green: #18bc9c !default;
+$teal: #20c997 !default;
+$cyan: #3498db !default;
-$primary: $blue !default;
-$secondary: $gray-600 !default;
-$success: $green !default;
-$info: $cyan !default;
-$warning: $yellow !default;
-$danger: $red !default;
-$light: $gray-200 !default;
-$dark: $gray-700 !default;
+$primary: $blue !default;
+$secondary: $gray-600 !default;
+$success: $green !default;
+$info: $cyan !default;
+$warning: $yellow !default;
+$danger: $red !default;
+$light: $gray-200 !default;
+$dark: $gray-700 !default;
-$min-contrast-ratio: 2.05 !default;
+$min-contrast-ratio: 2.05 !default;
// Links
-$link-color: $success !default;
+$link-color: $success !default;
// Fonts
// stylelint-disable-next-line value-keyword-case
-$font-family-sans-serif: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !default;
-$h1-font-size: 3rem !default;
-$h2-font-size: 2.5rem !default;
-$h3-font-size: 2rem !default;
+$font-family-sans-serif:
+ Lato,
+ -apple-system,
+ BlinkMacSystemFont,
+ 'Segoe UI',
+ Roboto,
+ 'Helvetica Neue',
+ Arial,
+ sans-serif,
+ 'Apple Color Emoji',
+ 'Segoe UI Emoji',
+ 'Segoe UI Symbol' !default;
+$h1-font-size: 3rem !default;
+$h2-font-size: 2.5rem !default;
+$h3-font-size: 2rem !default;
// Tables
-$table-bg-scale: 0% !default;
+$table-bg-scale: 0% !default;
// Dropdowns
-$dropdown-link-color: $gray-700 !default;
-$dropdown-link-hover-color: $white !default;
-$dropdown-link-hover-bg: $primary !default;
+$dropdown-link-color: $gray-700 !default;
+$dropdown-link-hover-color: $white !default;
+$dropdown-link-hover-bg: $primary !default;
// Navs
-$nav-link-padding-y: .5rem !default;
-$nav-link-padding-x: 2rem !default;
-$nav-link-disabled-color: $gray-600 !default;
-$nav-tabs-border-color: $gray-200 !default;
+$nav-link-padding-y: 0.5rem !default;
+$nav-link-padding-x: 2rem !default;
+$nav-link-disabled-color: $gray-600 !default;
+$nav-tabs-border-color: $gray-200 !default;
// Navbar
-$navbar-padding-y: 1rem !default;
-$navbar-dark-color: $white !default;
-$navbar-dark-hover-color: $primary !default;
-$navbar-dark-active-color: $primary !default;
+$navbar-padding-y: 1rem !default;
+$navbar-dark-color: $white !default;
+$navbar-dark-hover-color: $primary !default;
+$navbar-dark-active-color: $primary !default;
-$navbar-dark-brand-color: $white !default;
-$navbar-dark-brand-hover-color: $navbar-dark-brand-color !default;
+$navbar-dark-brand-color: $white !default;
+$navbar-dark-brand-hover-color: $navbar-dark-brand-color !default;
// Pagination
-$pagination-color: $white !default;
-$pagination-bg: $success !default;
-$pagination-border-width: 0% !default;
-$pagination-border-color: transparent !default;
-$pagination-hover-color: $white !default;
-$pagination-hover-bg: darken($success, 15%) !default;
-$pagination-hover-border-color: transparent !default;
-$pagination-active-bg: $pagination-hover-bg !default;
-$pagination-active-border-color: transparent !default;
-$pagination-disabled-color: $gray-200 !default;
-$pagination-disabled-bg: lighten($success, 15%) !default;
-$pagination-disabled-border-color: transparent !default;
+$pagination-color: $white !default;
+$pagination-bg: $success !default;
+$pagination-border-width: 0% !default;
+$pagination-border-color: transparent !default;
+$pagination-hover-color: $white !default;
+$pagination-hover-bg: darken($success, 15%) !default;
+$pagination-hover-border-color: transparent !default;
+$pagination-active-bg: $pagination-hover-bg !default;
+$pagination-active-border-color: transparent !default;
+$pagination-disabled-color: $gray-200 !default;
+$pagination-disabled-bg: lighten($success, 15%) !default;
+$pagination-disabled-border-color: transparent !default;
// List group
-$list-group-hover-bg: $gray-200 !default;
-$list-group-disabled-bg: $gray-200 !default;
+$list-group-hover-bg: $gray-200 !default;
+$list-group-disabled-bg: $gray-200 !default;
// Breadcrumbs
-$breadcrumb-padding-y: .375rem !default;
-$breadcrumb-padding-x: .75rem !default;
-$breadcrumb-border-radius: .25rem !default;
+$breadcrumb-padding-y: 0.375rem !default;
+$breadcrumb-padding-x: 0.75rem !default;
+$breadcrumb-border-radius: 0.25rem !default;
// Close
-$btn-close-color: $white !default;
-$btn-close-opacity: .4 !default;
-$btn-close-hover-opacity: 1 !default;
+$btn-close-color: $white !default;
+$btn-close-opacity: 0.4 !default;
+$btn-close-hover-opacity: 1 !default;
@import '../../../node_modules/bootstrap/scss/bootstrap';
// Flatly 5.1.3
// Bootswatch
-
// Variables
-$web-font-path: "https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400&display=swap" !default;
+$web-font-path: 'https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400&display=swap' !default;
@if $web-font-path {
@import url($web-font-path);
}
@@ -209,6 +219,8 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0
.toast,
.offcanvas {
.btn-close {
- background-image: escape-svg(url("data:image/svg+xml,"));
+ background-image: escape-svg(
+ url("data:image/svg+xml,")
+ );
}
}
diff --git a/assets/css/themes/litera.scss b/assets/css/themes/litera.scss
index a884b7b0..88d44544 100644
--- a/assets/css/themes/litera.scss
+++ b/assets/css/themes/litera.scss
@@ -12,13 +12,13 @@
// Litera 5.1.3
// Bootswatch
-$theme: "litera" !default;
+$theme: 'litera' !default;
//
// Color system
//
-$white: #fff !default;
+$white: #fff !default;
$gray-100: #f8f9fa !default;
$gray-200: #e9ecef !default;
$gray-300: #ddd !default;
@@ -28,87 +28,88 @@ $gray-600: #868e96 !default;
$gray-700: #495057 !default;
$gray-800: #343a40 !default;
$gray-900: #212529 !default;
-$black: #000 !default;
+$black: #000 !default;
-$blue: #4582ec !default;
-$indigo: #6610f2 !default;
-$purple: #6f42c1 !default;
-$pink: #e83e8c !default;
-$red: #d9534f !default;
-$orange: #fd7e14 !default;
-$yellow: #f0ad4e !default;
-$green: #02b875 !default;
-$teal: #20c997 !default;
-$cyan: #17a2b8 !default;
+$blue: #4582ec !default;
+$indigo: #6610f2 !default;
+$purple: #6f42c1 !default;
+$pink: #e83e8c !default;
+$red: #d9534f !default;
+$orange: #fd7e14 !default;
+$yellow: #f0ad4e !default;
+$green: #02b875 !default;
+$teal: #20c997 !default;
+$cyan: #17a2b8 !default;
-$primary: $blue !default;
-$secondary: $gray-500 !default;
-$success: $green !default;
-$info: $cyan !default;
-$warning: $yellow !default;
-$danger: $red !default;
-$light: $gray-100 !default;
-$dark: $gray-800 !default;
+$primary: $blue !default;
+$secondary: $gray-500 !default;
+$success: $green !default;
+$info: $cyan !default;
+$warning: $yellow !default;
+$danger: $red !default;
+$light: $gray-100 !default;
+$dark: $gray-800 !default;
-$min-contrast-ratio: 1.85 !default;
+$min-contrast-ratio: 1.85 !default;
// Body
-$body-color: $gray-800 !default;
+$body-color: $gray-800 !default;
// Fonts
// stylelint-disable value-keyword-case
-$font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !default;
-$font-family-serif: Georgia, Cambria, "Times New Roman", Times, serif !default;
+$font-family-sans-serif: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans',
+ sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji' !default;
+$font-family-serif: Georgia, Cambria, 'Times New Roman', Times, serif !default;
// stylelint-enable
-$font-size-base: 1.1rem !default;
-$headings-font-weight: 700 !default;
+$font-size-base: 1.1rem !default;
+$headings-font-weight: 700 !default;
// Tables
-$table-border-color: rgba(0, 0, 0, .1) !default;
+$table-border-color: rgba(0, 0, 0, 0.1) !default;
-$table-bg-scale: 0% !default;
+$table-bg-scale: 0% !default;
// Buttons
-$input-btn-padding-y: .5rem !default;
-$input-btn-padding-x: 1.1rem !default;
-$btn-font-family: $font-family-sans-serif !default;
-$btn-font-size: .875rem !default;
-$btn-font-size-sm: .688rem !default;
+$input-btn-padding-y: 0.5rem !default;
+$input-btn-padding-x: 1.1rem !default;
+$btn-font-family: $font-family-sans-serif !default;
+$btn-font-size: 0.875rem !default;
+$btn-font-size-sm: 0.688rem !default;
-$btn-border-radius: 1.078em !default;
-$btn-border-radius-lg: 2.688em !default;
-$btn-border-radius-sm: .844em !default;
+$btn-border-radius: 1.078em !default;
+$btn-border-radius-lg: 2.688em !default;
+$btn-border-radius-sm: 0.844em !default;
// Forms
-$input-border-color: rgba(0, 0, 0, .1) !default;
-$input-group-addon-bg: $gray-200 !default;
+$input-border-color: rgba(0, 0, 0, 0.1) !default;
+$input-group-addon-bg: $gray-200 !default;
// Navbar
-$navbar-dark-color: rgba($white, .6) !default;
-$navbar-dark-hover-color: $white !default;
-$navbar-light-hover-color: $body-color !default;
-$navbar-light-active-color: $body-color !default;
+$navbar-dark-color: rgba($white, 0.6) !default;
+$navbar-dark-hover-color: $white !default;
+$navbar-light-hover-color: $body-color !default;
+$navbar-light-active-color: $body-color !default;
// Tooltips
-$tooltip-font-size: 11px !default;
+$tooltip-font-size: 11px !default;
// Badges
-$badge-font-weight: 400 !default;
-$badge-padding-y: .6em !default;
-$badge-padding-x: 1.2em !default;
+$badge-font-weight: 400 !default;
+$badge-padding-y: 0.6em !default;
+$badge-padding-x: 1.2em !default;
// Alerts
-$alert-border-width: 0 !default;
+$alert-border-width: 0 !default;
@import '../../../node_modules/bootstrap/scss/bootstrap';
@@ -126,7 +127,7 @@ $alert-border-width: 0 !default;
&.bg-light {
background-color: $white !important;
- border: 1px solid rgba(0, 0, 0, .1);
+ border: 1px solid rgba(0, 0, 0, 0.1);
&.navbar-fixed-top {
border-width: 0 0 1px;
diff --git a/assets/css/themes/lumen.scss b/assets/css/themes/lumen.scss
index 5bbe3be9..4bad8d26 100644
--- a/assets/css/themes/lumen.scss
+++ b/assets/css/themes/lumen.scss
@@ -12,13 +12,13 @@
// Lumen 5.1.3
// Bootswatch
-$theme: "lumen" !default;
+$theme: 'lumen' !default;
//
// Color system
//
-$white: #fff !default;
+$white: #fff !default;
$gray-100: #f6f6f6 !default;
$gray-200: #f0f0f0 !default;
$gray-300: #dee2e6 !default;
@@ -28,97 +28,107 @@ $gray-600: #999 !default;
$gray-700: #555 !default;
$gray-800: #333 !default;
$gray-900: #222 !default;
-$black: #000 !default;
+$black: #000 !default;
-$blue: #158cba !default;
-$indigo: #6610f2 !default;
-$purple: #6f42c1 !default;
-$pink: #e83e8c !default;
-$red: #ff4136 !default;
-$orange: #fd7e14 !default;
-$yellow: #ff851b !default;
-$green: #28b62c !default;
-$teal: #20c997 !default;
-$cyan: #75caeb !default;
+$blue: #158cba !default;
+$indigo: #6610f2 !default;
+$purple: #6f42c1 !default;
+$pink: #e83e8c !default;
+$red: #ff4136 !default;
+$orange: #fd7e14 !default;
+$yellow: #ff851b !default;
+$green: #28b62c !default;
+$teal: #20c997 !default;
+$cyan: #75caeb !default;
-$primary: $blue !default;
-$secondary: $gray-600 !default;
-$success: $green !default;
-$info: $cyan !default;
-$warning: $yellow !default;
-$danger: $red !default;
-$light: $gray-100 !default;
-$dark: $gray-700 !default;
+$primary: $blue !default;
+$secondary: $gray-600 !default;
+$success: $green !default;
+$info: $cyan !default;
+$warning: $yellow !default;
+$danger: $red !default;
+$light: $gray-100 !default;
+$dark: $gray-700 !default;
-$min-contrast-ratio: 1.75 !default;
+$min-contrast-ratio: 1.75 !default;
// Fonts
// stylelint-disable-next-line value-keyword-case
-$font-family-sans-serif: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !default;
+$font-family-sans-serif:
+ 'Source Sans Pro',
+ -apple-system,
+ BlinkMacSystemFont,
+ 'Segoe UI',
+ Roboto,
+ 'Helvetica Neue',
+ Arial,
+ sans-serif,
+ 'Apple Color Emoji',
+ 'Segoe UI Emoji',
+ 'Segoe UI Symbol' !default;
// Tables
-$table-bg-scale: 0% !default;
+$table-bg-scale: 0% !default;
// Buttons
-$btn-font-weight: 700 !default;
+$btn-font-weight: 700 !default;
// Dropdowns
-$dropdown-link-color: rgba(0, 0, 0, .5) !default;
+$dropdown-link-color: rgba(0, 0, 0, 0.5) !default;
// Navs
-$nav-tabs-border-color: $gray-200 !default;
-$nav-tabs-link-hover-border-color: $nav-tabs-border-color !default;
-$nav-tabs-link-active-color: $gray-900 !default;
+$nav-tabs-border-color: $gray-200 !default;
+$nav-tabs-link-hover-border-color: $nav-tabs-border-color !default;
+$nav-tabs-link-active-color: $gray-900 !default;
$nav-tabs-link-active-border-color: $nav-tabs-border-color !default;
// Pagination
-$pagination-color: $gray-700 !default;
-$pagination-bg: $gray-200 !default;
-$pagination-hover-color: $pagination-color !default;
-$pagination-hover-bg: $pagination-bg !default;
-$pagination-active-border-color: darken($primary, 5%) !default;
-$pagination-disabled-color: $gray-600 !default;
-$pagination-disabled-bg: $pagination-bg !default;
+$pagination-color: $gray-700 !default;
+$pagination-bg: $gray-200 !default;
+$pagination-hover-color: $pagination-color !default;
+$pagination-hover-bg: $pagination-bg !default;
+$pagination-active-border-color: darken($primary, 5%) !default;
+$pagination-disabled-color: $gray-600 !default;
+$pagination-disabled-bg: $pagination-bg !default;
// Breadcrumbs
-$breadcrumb-padding-y: .375rem !default;
-$breadcrumb-padding-x: .75rem !default;
-$breadcrumb-bg: $pagination-bg !default;
-$breadcrumb-border-radius: .25rem !default;
+$breadcrumb-padding-y: 0.375rem !default;
+$breadcrumb-padding-x: 0.75rem !default;
+$breadcrumb-bg: $pagination-bg !default;
+$breadcrumb-border-radius: 0.25rem !default;
// Modals
-$modal-content-border-color: rgba($black, .1) !default;
+$modal-content-border-color: rgba($black, 0.1) !default;
// Close
-$btn-close-color: $white !default;
-$btn-close-opacity: .4 !default;
-$btn-close-hover-opacity: 1 !default;
+$btn-close-color: $white !default;
+$btn-close-opacity: 0.4 !default;
+$btn-close-hover-opacity: 1 !default;
@import '../../../node_modules/bootstrap/scss/bootstrap';
// Lumen 5.1.3
// Bootswatch
-
// Variables
-$web-font-path: "https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,wght@0,300;0,400;0,700;1,400&display=swap" !default;
+$web-font-path: 'https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,wght@0,300;0,400;0,700;1,400&display=swap' !default;
@if $web-font-path {
@import url($web-font-path);
}
// Mixins
-@mixin shadow($width: 4px){
+@mixin shadow($width: 4px) {
border-style: solid;
border-width: 0 1px $width 1px;
}
@@ -170,7 +180,7 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,w
}
}
-[class*="btn-outline"] {
+[class*='btn-outline'] {
border-top-width: 1px;
}
@@ -201,7 +211,7 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,w
// Forms
.form-control {
- box-shadow: inset 0 2px 0 rgba(0, 0, 0, .075);
+ box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.075);
}
// Navs
@@ -224,13 +234,16 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,w
&.disabled:focus {
margin-top: 6px;
border-color: $nav-tabs-border-color;
- transition: padding-bottom .2s ease-in-out, margin-top .2s ease-in-out, border-bottom .2s ease-in-out;
+ transition:
+ padding-bottom 0.2s ease-in-out,
+ margin-top 0.2s ease-in-out,
+ border-bottom 0.2s ease-in-out;
}
&:not(.disabled):hover,
&:not(.disabled):focus,
&.active {
- padding-bottom: add(.5rem, 6px);
+ padding-bottom: add(0.5rem, 6px);
margin-top: 0;
border-bottom-color: transparent;
}
@@ -308,7 +321,7 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,w
.btn-close {
text-decoration: none;
- opacity: .4;
+ opacity: 0.4;
&:hover,
&:focus {
@@ -424,6 +437,8 @@ a.list-group-item {
.toast,
.offcanvas {
.btn-close {
- background-image: escape-svg(url("data:image/svg+xml,"));
+ background-image: escape-svg(
+ url("data:image/svg+xml,")
+ );
}
}
diff --git a/assets/css/themes/materia.scss b/assets/css/themes/materia.scss
index 810c639f..11537493 100644
--- a/assets/css/themes/materia.scss
+++ b/assets/css/themes/materia.scss
@@ -12,13 +12,13 @@
// Materia 5.1.3
// Bootswatch
-$theme: "materia" !default;
+$theme: 'materia' !default;
//
// Color system
//
-$white: #fff !default;
+$white: #fff !default;
$gray-100: #f8f9fa !default;
$gray-200: #eee !default;
$gray-300: #dee2e6 !default;
@@ -28,111 +28,117 @@ $gray-600: #666 !default;
$gray-700: #444 !default;
$gray-800: #222 !default;
$gray-900: #212121 !default;
-$black: #000 !default;
+$black: #000 !default;
-$blue: #2196f3 !default;
-$indigo: #6610f2 !default;
-$purple: #6f42c1 !default;
-$pink: #e83e8c !default;
-$red: #e51c23 !default;
-$orange: #fd7e14 !default;
-$yellow: #ff9800 !default;
-$green: #4caf50 !default;
-$teal: #20c997 !default;
-$cyan: #9c27b0 !default;
+$blue: #2196f3 !default;
+$indigo: #6610f2 !default;
+$purple: #6f42c1 !default;
+$pink: #e83e8c !default;
+$red: #e51c23 !default;
+$orange: #fd7e14 !default;
+$yellow: #ff9800 !default;
+$green: #4caf50 !default;
+$teal: #20c997 !default;
+$cyan: #9c27b0 !default;
-$primary: $blue !default;
-$secondary: $white !default;
-$success: $green !default;
-$info: $cyan !default;
-$warning: $yellow !default;
-$danger: $red !default;
-$light: $gray-100 !default;
-$dark: $gray-800 !default;
+$primary: $blue !default;
+$secondary: $white !default;
+$success: $green !default;
+$info: $cyan !default;
+$warning: $yellow !default;
+$danger: $red !default;
+$light: $gray-100 !default;
+$dark: $gray-800 !default;
-$min-contrast-ratio: 2.15 !default;
+$min-contrast-ratio: 2.15 !default;
$enable-gradients: true !default;
// Body
-$body-color: $gray-700 !default;
+$body-color: $gray-700 !default;
// Fonts
// stylelint-disable-next-line value-keyword-case
-$font-family-sans-serif: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif !default;
-$font-size-base: 1rem !default;
-$font-weight-base: 400 !default;
+$font-family-sans-serif:
+ Roboto,
+ -apple-system,
+ BlinkMacSystemFont,
+ 'Segoe UI',
+ 'Helvetica Neue',
+ Arial,
+ sans-serif !default;
+$font-size-base: 1rem !default;
+$font-weight-base: 400 !default;
// Buttons
-$input-btn-padding-y: .8rem !default;
-$input-btn-padding-x: 1rem !default;
+$input-btn-padding-y: 0.8rem !default;
+$input-btn-padding-x: 1rem !default;
// Forms
-$input-padding-y: 1rem !default;
-$input-padding-x: 0% !default;
-$input-padding-y-sm: 0% !default;
-$input-padding-x-sm: 0% !default;
-$input-padding-y-lg: ($font-size-base * 1.25) !default;
-$input-padding-x-lg: 0% !default;
-$input-bg: transparent !default;
-$input-disabled-bg: transparent !default;
-$input-color: $gray-600 !default;
-$input-border-color: transparent !default;
-$input-border-width: 0% !default;
-$input-border-radius: 0% !default;
-$input-border-radius-lg: 0% !default;
-$input-border-radius-sm: 0% !default;
-$input-placeholder-color: rgba(0, 0, 0, .4) !default;
-$input-group-addon-bg: transparent !default;
+$input-padding-y: 1rem !default;
+$input-padding-x: 0% !default;
+$input-padding-y-sm: 0% !default;
+$input-padding-x-sm: 0% !default;
+$input-padding-y-lg: ($font-size-base * 1.25) !default;
+$input-padding-x-lg: 0% !default;
+$input-bg: transparent !default;
+$input-disabled-bg: transparent !default;
+$input-color: $gray-600 !default;
+$input-border-color: transparent !default;
+$input-border-width: 0% !default;
+$input-border-radius: 0% !default;
+$input-border-radius-lg: 0% !default;
+$input-border-radius-sm: 0% !default;
+$input-placeholder-color: rgba(0, 0, 0, 0.4) !default;
+$input-group-addon-bg: transparent !default;
// Navs
-$nav-link-disabled-color: $gray-500 !default;
-$nav-tabs-border-color: transparent !default;
+$nav-link-disabled-color: $gray-500 !default;
+$nav-tabs-border-color: transparent !default;
// Navbar
-$navbar-padding-y: 1rem !default;
-$navbar-dark-color: rgba($white, .75) !default;
-$navbar-dark-hover-color: $white !default;
+$navbar-padding-y: 1rem !default;
+$navbar-dark-color: rgba($white, 0.75) !default;
+$navbar-dark-hover-color: $white !default;
// Cards
-$card-border-width: 0 !default;
-$card-border-color: transparent !default;
+$card-border-width: 0 !default;
+$card-border-color: transparent !default;
// Tooltips
-$tooltip-bg: $gray-700 !default;
+$tooltip-bg: $gray-700 !default;
// Modals
-$modal-content-border-color: transparent !default;
+$modal-content-border-color: transparent !default;
// Progress bars
-$progress-height: .375rem !default;
-$progress-border-radius: 0% !default;
+$progress-height: 0.375rem !default;
+$progress-border-radius: 0% !default;
// Close
-$btn-close-color: $white !default;
-$btn-close-opacity: .6 !default;
-$btn-close-hover-opacity: 1 !default;
+$btn-close-color: $white !default;
+$btn-close-opacity: 0.6 !default;
+$btn-close-hover-opacity: 1 !default;
@import '../../../node_modules/bootstrap/scss/bootstrap';
// Materia 5.1.3
// Bootswatch
-
// Variables
-$web-font-path: "https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" !default;
+$web-font-path: 'https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap' !default;
@if $web-font-path {
@import url($web-font-path);
}
@@ -151,18 +157,20 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;50
height: 100%;
margin-left: 0;
pointer-events: none;
- content: "";
+ content: '';
background-position: 50%;
background-size: 1000% 1000%;
border: none;
opacity: 0;
- transition: background .5s, opacity 1s;
+ transition:
+ background 0.5s,
+ opacity 1s;
@include gradient-radial($color 10%, transparent 10.01%);
}
&:active::before {
background-size: 0 0;
- opacity: .2;
+ opacity: 0.2;
transition: none;
}
@@ -174,11 +182,11 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;50
}
}
-@mixin btn($class,$bg,$color) {
+@mixin btn($class, $bg, $color) {
.btn-#{$class} {
&:focus {
background-color: $bg;
- box-shadow: 0 0 0 2px rgba(204, 204, 204, .5);
+ box-shadow: 0 0 0 2px rgba(204, 204, 204, 0.5);
}
&:hover,
@@ -187,7 +195,7 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;50
}
&:active {
- box-shadow: 2px 2px 4px rgba(0, 0, 0, .4);
+ box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}
@include ripple($color);
@@ -209,34 +217,34 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;50
.navbar {
border: none;
- box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
&-brand {
font-size: 24px;
}
&-nav .nav-link {
- padding-top: .9rem;
- padding-bottom: .9rem;
+ padding-top: 0.9rem;
+ padding-bottom: 0.9rem;
}
&.bg-dark,
&.bg-primary {
- input[type="search"],
- input[type="text"],
- input[type="password"],
- input[type="email"],
- input[type="number"],
- input[type="tel"] {
+ input[type='search'],
+ input[type='text'],
+ input[type='password'],
+ input[type='email'],
+ input[type='number'],
+ input[type='tel'] {
color: $white;
- box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .5);
+ box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.5);
&:focus {
box-shadow: inset 0 -2px 0 $white;
}
&::placeholder {
- color: rgba(255, 255, 255, .5);
+ color: rgba(255, 255, 255, 0.5);
}
}
}
@@ -256,8 +264,12 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;50
.btn {
text-transform: uppercase;
border: none;
- box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
- transition: color .4s, background-color .4s, border-color .4s, box-shadow .4s;
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
+ transition:
+ color 0.4s,
+ background-color 0.4s,
+ border-color 0.4s,
+ box-shadow 0.4s;
&-link {
color: $link-color;
@@ -285,13 +297,13 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;50
&.disabled,
&[disabled],
fieldset[disabled] & {
- color: rgba(0, 0, 0, .4);
- background-color: rgba(0, 0, 0, .1);
+ color: rgba(0, 0, 0, 0.4);
+ background-color: rgba(0, 0, 0, 0.1);
opacity: 1;
&:hover,
&:focus {
- background-color: rgba(0, 0, 0, .1);
+ background-color: rgba(0, 0, 0, 0.1);
}
}
}
@@ -325,7 +337,7 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;50
.btn + .btn,
.btn + .btn-group > .dropdown-toggle {
- box-shadow: 1px 1px 4px rgba(0, 0, 0, .4);
+ box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
}
}
@@ -338,7 +350,7 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;50
body,
input,
button {
- letter-spacing: .1px;
+ letter-spacing: 0.1px;
}
p {
@@ -355,7 +367,9 @@ p {
> tbody > tr,
> tbody > tr > th,
> tbody > tr > td {
- transition: background-color .2s, color .2s;
+ transition:
+ background-color 0.2s,
+ color 0.2s;
}
}
@@ -381,17 +395,17 @@ p {
textarea,
textarea.form-control,
input.form-control,
-input[type="text"],
-input[type="password"],
-input[type="email"],
-input[type="number"],
-[type="text"].form-control,
-[type="password"].form-control,
-[type="email"].form-control,
-[type="tel"].form-control,
+input[type='text'],
+input[type='password'],
+input[type='email'],
+input[type='number'],
+[type='text'].form-control,
+[type='password'].form-control,
+[type='email'].form-control,
+[type='tel'].form-control,
[contenteditable].form-control {
box-shadow: inset 0 -1px 0 #ddd;
- transition: box-shadow .2s;
+ transition: box-shadow 0.2s;
&:focus {
box-shadow: inset 0 -2px 0 $primary;
@@ -411,8 +425,10 @@ input[type="number"],
select,
select.form-control {
- padding: .5rem 0;
- background-image: escape-svg(url("data:image/svg+xml,"));
+ padding: 0.5rem 0;
+ background-image: escape-svg(
+ url("data:image/svg+xml,")
+ );
background-repeat: no-repeat;
background-position: right center;
background-size: 8px 4px;
@@ -430,7 +446,9 @@ select.form-control {
}
&:focus {
- background-image: escape-svg(url("data:image/svg+xml,"));
+ background-image: escape-svg(
+ url("data:image/svg+xml,")
+ );
box-shadow: inset 0 -2px 0 $primary;
}
@@ -445,8 +463,11 @@ select.form-control {
margin-top: 1px;
border: 2px solid $gray-400;
- &:checked[type="radio"] {
- background-image: escape-svg(url("data:image/svg+xml,")), var(--bs-gradient);
+ &:checked[type='radio'] {
+ background-image: escape-svg(
+ url("data:image/svg+xml,")
+ ),
+ var(--bs-gradient);
background-size: 1.8em;
}
}
@@ -454,8 +475,8 @@ select.form-control {
.form-switch {
.form-check-input {
position: relative;
- height: .8em;
- margin-top: .29em;
+ height: 0.8em;
+ margin-top: 0.29em;
background-color: $gray-400;
background-image: none;
border: none;
@@ -466,68 +487,70 @@ select.form-control {
&::before {
position: absolute;
- top: -.2em;
- left: -.2em;
+ top: -0.2em;
+ left: -0.2em;
width: 1.2em;
height: 1.2em;
- content: "";
+ content: '';
background-color: $white;
border-radius: 50%;
- box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
- transition: left .15s ease-in-out;
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
+ transition: left 0.15s ease-in-out;
}
&::after {
position: absolute;
- top: -.2em;
- left: -.2em;
+ top: -0.2em;
+ left: -0.2em;
z-index: -1;
width: 1.2em;
height: 1.2em;
- content: "";
+ content: '';
border-radius: 50%;
- box-shadow: 0 0 0 9px rgba(0, 0, 0, .05);
- transition: left .15s ease-in-out, transform .15s ease-in-out, box-shadow .15s ease-in-out;
+ box-shadow: 0 0 0 9px rgba(0, 0, 0, 0.05);
+ transition:
+ left 0.15s ease-in-out,
+ transform 0.15s ease-in-out,
+ box-shadow 0.15s ease-in-out;
transform: scale(0);
}
&:hover:not(.disabled),
&:focus:not(.disabled) {
-
&::after {
- transform: scale(.9);
+ transform: scale(0.9);
}
}
&:focus:not(.disabled) {
&::after {
- box-shadow: 0 0 0 9px rgba(0, 0, 0, .1);
+ box-shadow: 0 0 0 9px rgba(0, 0, 0, 0.1);
}
}
&:checked {
- background-color: rgba(33, 150, 243, .3);
+ background-color: rgba(33, 150, 243, 0.3);
&::before {
- left: calc(100% - .8em);
+ left: calc(100% - 0.8em);
background-color: rgba(33, 150, 243, 1);
}
&::after {
- left: calc(100% - .8em);
- box-shadow: 0 0 0 9px rgba(33, 150, 243, .1);
+ left: calc(100% - 0.8em);
+ box-shadow: 0 0 0 9px rgba(33, 150, 243, 0.1);
}
&:hover:not(.disabled),
&:focus:not(.disabled) {
&::after {
- transform: scale(.9);
+ transform: scale(0.9);
}
}
&:focus:not(.disabled) {
&::after {
- box-shadow: 0 0 0 9px rgba(33, 150, 243, .2);
+ box-shadow: 0 0 0 9px rgba(33, 150, 243, 0.2);
}
}
}
@@ -536,20 +559,23 @@ select.form-control {
.form-check:not(.form-switch) {
.form-check-input {
- &:checked[type="checkbox"] {
- background-image: escape-svg(url("data:image/svg+xml,")), var(--bs-gradient);
+ &:checked[type='checkbox'] {
+ background-image: escape-svg(
+ url("data:image/svg+xml,")
+ ),
+ var(--bs-gradient);
background-size: 1.6em;
}
}
}
.has-warning {
- input:not([type="checkbox"]),
+ input:not([type='checkbox']),
.form-control,
input.form-control[readonly],
- input[type="text"][readonly],
- [type="text"].form-control[readonly],
- input:not([type="checkbox"]):focus,
+ input[type='text'][readonly],
+ [type='text'].form-control[readonly],
+ input:not([type='checkbox']):focus,
.form-control:focus {
border-bottom: none;
box-shadow: inset 0 -2px 0 $warning;
@@ -557,12 +583,12 @@ select.form-control {
}
.has-danger {
- input:not([type="checkbox"]),
+ input:not([type='checkbox']),
.form-control,
input.form-control[readonly],
- input[type="text"][readonly],
- [type="text"].form-control[readonly],
- input:not([type="checkbox"]):focus,
+ input[type='text'][readonly],
+ [type='text'].form-control[readonly],
+ input:not([type='checkbox']):focus,
.form-control:focus {
border-bottom: none;
box-shadow: inset 0 -2px 0 $danger;
@@ -570,12 +596,12 @@ select.form-control {
}
.has-success {
- input:not([type="checkbox"]),
+ input:not([type='checkbox']),
.form-control,
input.form-control[readonly],
- input[type="text"][readonly],
- [type="text"].form-control[readonly],
- input:not([type="checkbox"]):focus,
+ input[type='text'][readonly],
+ [type='text'].form-control[readonly],
+ input:not([type='checkbox']):focus,
.form-control:focus {
border-bottom: none;
box-shadow: inset 0 -2px 0 $success;
@@ -614,7 +640,9 @@ select.form-control {
background-color: transparent;
border: none;
box-shadow: inset 0 -1px 0 #ddd;
- transition: color .2s, box-shadow .2s;
+ transition:
+ color 0.2s,
+ box-shadow 0.2s;
&:hover {
color: $primary;
@@ -658,7 +686,7 @@ select.form-control {
.dropdown-menu {
margin-top: 0;
border: none;
- box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
// Indicators
@@ -717,7 +745,7 @@ select.form-control {
// Containers
.card {
- box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
&.border-primary,
&.border-secondary,
@@ -745,21 +773,23 @@ select.form-control {
}
.modal-content {
- border-radius: .2rem;
- box-shadow: 0 6px 36px rgba(0, 0, 0, .3);
+ border-radius: 0.2rem;
+ box-shadow: 0 6px 36px rgba(0, 0, 0, 0.3);
}
.modal,
.toast,
.offcanvas {
.btn-close {
- background-image: escape-svg(url("data:image/svg+xml,"));
+ background-image: escape-svg(
+ url("data:image/svg+xml,")
+ );
}
}
.popover {
border: none;
- box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.carousel {
diff --git a/assets/css/themes/minty.scss b/assets/css/themes/minty.scss
index 5c788b89..8eca6b91 100644
--- a/assets/css/themes/minty.scss
+++ b/assets/css/themes/minty.scss
@@ -12,13 +12,13 @@
// Minty 5.1.3
// Bootswatch
-$theme: "minty" !default;
+$theme: 'minty' !default;
//
// Color system
//
-$white: #fff !default;
+$white: #fff !default;
$gray-100: #f8f9fa !default;
$gray-200: #f7f7f9 !default;
$gray-300: #eceeef !default;
@@ -28,103 +28,111 @@ $gray-600: #888 !default;
$gray-700: #5a5a5a !default;
$gray-800: #343a40 !default;
$gray-900: #212529 !default;
-$black: #000 !default;
+$black: #000 !default;
-$blue: #007bff !default;
-$indigo: #6610f2 !default;
-$purple: #6f42c1 !default;
-$pink: #e83e8c !default;
-$red: #ff7851 !default;
-$orange: #fd7e14 !default;
-$yellow: #ffce67 !default;
-$green: #56cc9d !default;
-$teal: #20c997 !default;
-$cyan: #6cc3d5 !default;
+$blue: #007bff !default;
+$indigo: #6610f2 !default;
+$purple: #6f42c1 !default;
+$pink: #e83e8c !default;
+$red: #ff7851 !default;
+$orange: #fd7e14 !default;
+$yellow: #ffce67 !default;
+$green: #56cc9d !default;
+$teal: #20c997 !default;
+$cyan: #6cc3d5 !default;
-$primary: #78c2ad !default;
-$secondary: #f3969a !default;
-$success: $green !default;
-$info: $cyan !default;
-$warning: $yellow !default;
-$danger: $red !default;
-$light: $gray-100 !default;
-$dark: $gray-800 !default;
+$primary: #78c2ad !default;
+$secondary: #f3969a !default;
+$success: $green !default;
+$info: $cyan !default;
+$warning: $yellow !default;
+$danger: $red !default;
+$light: $gray-100 !default;
+$dark: $gray-800 !default;
-$min-contrast-ratio: 1.45 !default;
+$min-contrast-ratio: 1.45 !default;
// Body
-$body-color: $gray-600 !default;
+$body-color: $gray-600 !default;
// Components
-$border-radius: .4rem !default;
-$border-radius-lg: .6rem !default;
-$border-radius-sm: .3rem !default;
+$border-radius: 0.4rem !default;
+$border-radius-lg: 0.6rem !default;
+$border-radius-sm: 0.3rem !default;
// Fonts
// stylelint-disable-next-line value-keyword-case
-$headings-font-family: Montserrat, -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !default;
-$headings-color: $gray-700 !default;
+$headings-font-family:
+ Montserrat,
+ -apple-system,
+ system-ui,
+ BlinkMacSystemFont,
+ 'Segoe UI',
+ Roboto,
+ 'Helvetica Neue',
+ Arial,
+ sans-serif !default;
+$headings-color: $gray-700 !default;
// Tables
-$table-border-color: rgba(0, 0, 0, .05) !default;
+$table-border-color: rgba(0, 0, 0, 0.05) !default;
-$table-bg-scale: 0% !default;
+$table-bg-scale: 0% !default;
// Dropdowns
-$dropdown-link-hover-color: $white !default;
-$dropdown-link-hover-bg: $secondary !default;
+$dropdown-link-hover-color: $white !default;
+$dropdown-link-hover-bg: $secondary !default;
// Navbar
-$navbar-dark-color: rgba($white, .6) !default;
-$navbar-dark-hover-color: $white !default;
-$navbar-light-color: rgba($black, .3) !default;
-$navbar-light-hover-color: $gray-700 !default;
-$navbar-light-active-color: $gray-700 !default;
-$navbar-light-disabled-color: rgba($black, .1) !default;
+$navbar-dark-color: rgba($white, 0.6) !default;
+$navbar-dark-hover-color: $white !default;
+$navbar-light-color: rgba($black, 0.3) !default;
+$navbar-light-hover-color: $gray-700 !default;
+$navbar-light-active-color: $gray-700 !default;
+$navbar-light-disabled-color: rgba($black, 0.1) !default;
// Pagination
-$pagination-color: $white !default;
-$pagination-bg: $primary !default;
-$pagination-border-color: $primary !default;
-$pagination-hover-color: $white !default;
-$pagination-hover-bg: $secondary !default;
-$pagination-hover-border-color: $pagination-hover-bg !default;
-$pagination-active-bg: $secondary !default;
-$pagination-active-border-color: $pagination-active-bg !default;
-$pagination-disabled-color: $white !default;
-$pagination-disabled-bg: #cce8e0 !default;
-$pagination-disabled-border-color: $pagination-disabled-bg !default;
+$pagination-color: $white !default;
+$pagination-bg: $primary !default;
+$pagination-border-color: $primary !default;
+$pagination-hover-color: $white !default;
+$pagination-hover-bg: $secondary !default;
+$pagination-hover-border-color: $pagination-hover-bg !default;
+$pagination-active-bg: $secondary !default;
+$pagination-active-border-color: $pagination-active-bg !default;
+$pagination-disabled-color: $white !default;
+$pagination-disabled-bg: #cce8e0 !default;
+$pagination-disabled-border-color: $pagination-disabled-bg !default;
// Alerts
-$alert-color-scale: 0% !default;
-$alert-bg-scale: 0% !default;
+$alert-color-scale: 0% !default;
+$alert-bg-scale: 0% !default;
// Breadcrumbs
-$breadcrumb-padding-y: .375rem !default;
-$breadcrumb-padding-x: .75rem !default;
-$breadcrumb-bg: $primary !default;
-$breadcrumb-divider-color: $white !default;
-$breadcrumb-active-color: $breadcrumb-divider-color !default;
-$breadcrumb-border-radius: .25rem !default;
+$breadcrumb-padding-y: 0.375rem !default;
+$breadcrumb-padding-x: 0.75rem !default;
+$breadcrumb-bg: $primary !default;
+$breadcrumb-divider-color: $white !default;
+$breadcrumb-active-color: $breadcrumb-divider-color !default;
+$breadcrumb-border-radius: 0.25rem !default;
@import '../../../node_modules/bootstrap/scss/bootstrap';
// Minty 5.1.3
// Bootswatch
-
// Variables
-$web-font-path: "https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700&display=swap" !default;
+$web-font-path: 'https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700&display=swap' !default;
@if $web-font-path {
@import url($web-font-path);
}
@@ -232,7 +240,6 @@ legend {
}
&-light {
-
&,
a:not(.btn),
.alert-link {
diff --git a/assets/css/themes/sketchy.scss b/assets/css/themes/sketchy.scss
index c58a63de..bc133475 100644
--- a/assets/css/themes/sketchy.scss
+++ b/assets/css/themes/sketchy.scss
@@ -12,13 +12,13 @@
// Sketchy 5.1.3
// Bootswatch
-$theme: "sketchy" !default;
+$theme: 'sketchy' !default;
//
// Color system
//
-$white: #fff !default;
+$white: #fff !default;
$gray-100: #f8f9fa !default;
$gray-200: #f7f7f9 !default;
$gray-300: #dee2e6 !default;
@@ -28,163 +28,171 @@ $gray-600: #868e96 !default;
$gray-700: #555 !default;
$gray-800: #333 !default;
$gray-900: #212529 !default;
-$black: #000 !default;
+$black: #000 !default;
-$blue: #007bff !default;
-$indigo: #6610f2 !default;
-$purple: #6f42c1 !default;
-$pink: #e83e8c !default;
-$red: #dc3545 !default;
-$orange: #fd7e14 !default;
-$yellow: #ffc107 !default;
-$green: #28a745 !default;
-$teal: #20c997 !default;
-$cyan: #17a2b8 !default;
+$blue: #007bff !default;
+$indigo: #6610f2 !default;
+$purple: #6f42c1 !default;
+$pink: #e83e8c !default;
+$red: #dc3545 !default;
+$orange: #fd7e14 !default;
+$yellow: #ffc107 !default;
+$green: #28a745 !default;
+$teal: #20c997 !default;
+$cyan: #17a2b8 !default;
-$primary: $gray-800 !default;
-$secondary: $gray-700 !default;
-$success: $green !default;
-$info: $cyan !default;
-$warning: $yellow !default;
-$danger: $red !default;
-$light: $white !default;
-$dark: $gray-700 !default;
+$primary: $gray-800 !default;
+$secondary: $gray-700 !default;
+$success: $green !default;
+$info: $cyan !default;
+$warning: $yellow !default;
+$danger: $red !default;
+$light: $white !default;
+$dark: $gray-700 !default;
-$min-contrast-ratio: 1.6 !default;
+$min-contrast-ratio: 1.6 !default;
// Links
-$link-decoration: underline !default;
+$link-decoration: underline !default;
// Components
-$border-width: 2px !default;
-$border-radius: 25px !default;
-$border-radius-lg: 35px !default;
-$border-radius-sm: 15px !default;
+$border-width: 2px !default;
+$border-radius: 25px !default;
+$border-radius-lg: 35px !default;
+$border-radius-sm: 15px !default;
// Fonts
// stylelint-disable-next-line value-keyword-case
-$font-family-sans-serif: Neucha, -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !default;
-$font-weight-base: 700 !default;
-$headings-font-family: "Cabin Sketch", cursive !default;
+$font-family-sans-serif:
+ Neucha,
+ -apple-system,
+ system-ui,
+ BlinkMacSystemFont,
+ 'Segoe UI',
+ Roboto,
+ 'Helvetica Neue',
+ Arial,
+ sans-serif !default;
+$font-weight-base: 700 !default;
+$headings-font-family: 'Cabin Sketch', cursive !default;
-$blockquote-small-color: $gray-800 !default;
+$blockquote-small-color: $gray-800 !default;
// Tables
-$table-hover-bg: $white !default;
-$table-border-width: 2px !default;
-$table-border-color: $gray-800 !default;
+$table-hover-bg: $white !default;
+$table-border-width: 2px !default;
+$table-border-color: $gray-800 !default;
// Forms
-$input-border-color: $gray-800 !default;
-$input-focus-border-color: $input-border-color !default;
+$input-border-color: $gray-800 !default;
+$input-focus-border-color: $input-border-color !default;
// Dropdowns
-$dropdown-border-color: $gray-800 !default;
-$dropdown-divider-bg: $gray-800 !default;
-$dropdown-link-hover-color: $white !default;
-$dropdown-link-hover-bg: $gray-800 !default;
+$dropdown-border-color: $gray-800 !default;
+$dropdown-divider-bg: $gray-800 !default;
+$dropdown-link-hover-color: $white !default;
+$dropdown-link-hover-bg: $gray-800 !default;
// Navs
-$nav-tabs-border-color: $gray-800 !default;
-$nav-tabs-link-hover-border-color: $gray-800 !default;
-$nav-tabs-link-active-color: $gray-800 !default;
+$nav-tabs-border-color: $gray-800 !default;
+$nav-tabs-link-hover-border-color: $gray-800 !default;
+$nav-tabs-link-active-color: $gray-800 !default;
$nav-tabs-link-active-border-color: $gray-800 !default;
// Navbar
-$navbar-dark-color: $white !default;
-$navbar-dark-hover-color: $white !default;
-$navbar-dark-toggler-border-color: $white !default;
-$navbar-light-color: $gray-800 !default;
-$navbar-light-hover-color: $gray-800 !default;
-$navbar-light-active-color: $gray-800 !default;
+$navbar-dark-color: $white !default;
+$navbar-dark-hover-color: $white !default;
+$navbar-dark-toggler-border-color: $white !default;
+$navbar-light-color: $gray-800 !default;
+$navbar-light-hover-color: $gray-800 !default;
+$navbar-light-active-color: $gray-800 !default;
$navbar-light-toggler-border-color: $gray-800 !default;
// Pagination
-$pagination-border-color: $gray-800 !default;
-$pagination-hover-color: $white !default;
-$pagination-hover-bg: $gray-800 !default;
-$pagination-hover-border-color: $gray-800 !default;
-$pagination-disabled-color: $gray-400 !default;
-$pagination-disabled-border-color: $gray-800 !default;
+$pagination-border-color: $gray-800 !default;
+$pagination-hover-color: $white !default;
+$pagination-hover-bg: $gray-800 !default;
+$pagination-hover-border-color: $gray-800 !default;
+$pagination-disabled-color: $gray-400 !default;
+$pagination-disabled-border-color: $gray-800 !default;
// Cards
-$card-border-width: 2px !default;
-$card-border-color: $gray-800 !default;
+$card-border-width: 2px !default;
+$card-border-color: $gray-800 !default;
// Popovers
-$popover-border-color: $gray-800 !default;
+$popover-border-color: $gray-800 !default;
// Badges
-$badge-padding-y: .5em !default;
-$badge-padding-x: 1.2em !default;
+$badge-padding-y: 0.5em !default;
+$badge-padding-x: 1.2em !default;
// Toasts
-$toast-border-width: 2px !default;
-$toast-border-color: $gray-800 !default;
-$toast-header-color: $gray-800 !default;
-$toast-header-border-color: $toast-border-color !default;
+$toast-border-width: 2px !default;
+$toast-border-color: $gray-800 !default;
+$toast-header-color: $gray-800 !default;
+$toast-header-border-color: $toast-border-color !default;
// Modals
-$modal-content-border-color: $gray-800 !default;
-$modal-header-border-color: $gray-800 !default;
+$modal-content-border-color: $gray-800 !default;
+$modal-header-border-color: $gray-800 !default;
// Progress bars
-$progress-bg: $white !default;
-$progress-bar-bg: $gray-400 !default;
+$progress-bg: $white !default;
+$progress-bar-bg: $gray-400 !default;
// List group
-$list-group-border-color: $gray-800 !default;
-$list-group-hover-bg: $gray-300 !default;
-$list-group-active-color: $white !default;
-$list-group-active-bg: $gray-800 !default;
-$list-group-action-color: $gray-800 !default;
+$list-group-border-color: $gray-800 !default;
+$list-group-hover-bg: $gray-300 !default;
+$list-group-active-color: $white !default;
+$list-group-active-bg: $gray-800 !default;
+$list-group-action-color: $gray-800 !default;
// Breadcrumbs
-$breadcrumb-padding-y: .375rem !default;
-$breadcrumb-padding-x: .75rem !default;
-$breadcrumb-divider-color: $gray-800 !default;
-$breadcrumb-active-color: $gray-800 !default;
-$breadcrumb-border-radius: .25rem !default;
+$breadcrumb-padding-y: 0.375rem !default;
+$breadcrumb-padding-x: 0.75rem !default;
+$breadcrumb-divider-color: $gray-800 !default;
+$breadcrumb-active-color: $gray-800 !default;
+$breadcrumb-border-radius: 0.25rem !default;
// Close
-$btn-close-color: inherit !default;
-$btn-close-opacity: 1 !default;
-$btn-close-hover-opacity: 1 !default;
-$btn-close-focus-shadow: none !default;
+$btn-close-color: inherit !default;
+$btn-close-opacity: 1 !default;
+$btn-close-hover-opacity: 1 !default;
+$btn-close-focus-shadow: none !default;
@import '../../../node_modules/bootstrap/scss/bootstrap';
// Sketchy 5.1.3
// Bootswatch
-
// Variables
-$web-font-path: "https://fonts.googleapis.com/css?family=Neucha|Cabin+Sketch&display=swap" !default;
+$web-font-path: 'https://fonts.googleapis.com/css?family=Neucha|Cabin+Sketch&display=swap' !default;
@if $web-font-path {
@import url($web-font-path);
}
// stylelint-disable scss/dollar-variable-default
-$border-radius-sketchy: 255px 25px 225px 25px / 25px 225px 25px 255px;
+$border-radius-sketchy: 255px 25px 225px 25px / 25px 225px 25px 255px;
$border-radius-lg-sketchy: 55px 225px 15px 25px / 25px 25px 35px 355px;
$border-radius-sm-sketchy: 255px 25px 225px 25px / 25px 225px 25px 255px;
// style-enable scss/dollar-variable-default
@@ -317,7 +325,6 @@ table {
}
}
-
// Forms
input,
@@ -333,7 +340,7 @@ select.form-control {
border-radius: $border-radius-lg-sketchy !important;
}
-[type="checkbox"] {
+[type='checkbox'] {
position: relative;
width: 0;
height: 0;
@@ -343,12 +350,12 @@ select.form-control {
&::before {
position: absolute;
- top: -.1em;
+ top: -0.1em;
left: 0;
display: inline-block;
width: 15px;
height: 16px;
- content: "";
+ content: '';
border: 2px solid $gray-800;
border-radius: 2px 8px 2px 4px / 5px 3px 5px 3px;
}
@@ -356,11 +363,11 @@ select.form-control {
&:checked::after {
position: absolute;
top: 0;
- left: .1em;
+ left: 0.1em;
font-size: 1.5rem;
- line-height: .5;
+ line-height: 0.5;
color: $gray-800;
- content: "x";
+ content: 'x';
}
&:disabled {
@@ -370,7 +377,7 @@ select.form-control {
}
}
-[type="radio"] {
+[type='radio'] {
position: relative;
width: 0;
height: 0;
@@ -380,12 +387,12 @@ select.form-control {
&::before {
position: absolute;
- top: -.1em;
+ top: -0.1em;
left: 0;
display: inline-block;
width: 16px;
height: 16px;
- content: "";
+ content: '';
border: 2px solid $gray-800;
border-radius: 50% 45% 40% 50% / 40% 50% 50% 45%;
}
@@ -426,11 +433,11 @@ select.form-control {
display: inline-block;
width: 12px;
height: 12px;
- content: "";
+ content: '';
background-color: $white;
border: 2px solid #333;
border-radius: 50% 45% 40% 50% / 40% 50% 50% 45%;
- transition: left .15s ease-in-out;
+ transition: left 0.15s ease-in-out;
}
&:checked::after {
@@ -441,7 +448,7 @@ select.form-control {
}
.form-check-label {
- margin-left: .5em;
+ margin-left: 0.5em;
}
}
@@ -625,9 +632,9 @@ pre {
&::before {
position: absolute;
- top: .8rem;
+ top: 0.8rem;
right: 1rem;
- content: "X";
+ content: 'X';
}
}
diff --git a/assets/css/themes/zephyr.scss b/assets/css/themes/zephyr.scss
index c5a46dba..10a58510 100644
--- a/assets/css/themes/zephyr.scss
+++ b/assets/css/themes/zephyr.scss
@@ -12,13 +12,13 @@
// Zephyr 5.1.3
// Bootswatch
-$theme: "zephyr" !default;
+$theme: 'zephyr' !default;
//
// Color system
//
-$white: #fff !default;
+$white: #fff !default;
$gray-100: #f8f9fa !default;
$gray-200: #e9ecef !default;
$gray-300: #dee2e6 !default;
@@ -28,160 +28,172 @@ $gray-600: #6c757d !default;
$gray-700: #495057 !default;
$gray-800: #343a40 !default;
$gray-900: #212529 !default;
-$black: #000 !default;
+$black: #000 !default;
-$blue: #3459e6 !default;
-$indigo: #6610f2 !default;
-$purple: #6f42c1 !default;
-$pink: #d63384 !default;
-$red: #da292e !default;
-$orange: #f8765f !default;
-$yellow: #f4bd61 !default;
-$green: #2fb380 !default;
-$teal: #20c997 !default;
-$cyan: #287bb5 !default;
+$blue: #3459e6 !default;
+$indigo: #6610f2 !default;
+$purple: #6f42c1 !default;
+$pink: #d63384 !default;
+$red: #da292e !default;
+$orange: #f8765f !default;
+$yellow: #f4bd61 !default;
+$green: #2fb380 !default;
+$teal: #20c997 !default;
+$cyan: #287bb5 !default;
-$primary: $blue !default;
-$secondary: $white !default;
-$success: $green !default;
-$info: $cyan !default;
-$warning: $yellow !default;
-$danger: $red !default;
-$light: $gray-100 !default;
-$dark: $gray-900 !default;
+$primary: $blue !default;
+$secondary: $white !default;
+$success: $green !default;
+$info: $cyan !default;
+$warning: $yellow !default;
+$danger: $red !default;
+$light: $gray-100 !default;
+$dark: $gray-900 !default;
-$min-contrast-ratio: 1.65 !default;
+$min-contrast-ratio: 1.65 !default;
-$enable-shadows: true !default;
+$enable-shadows: true !default;
// Body
-$body-color: $gray-700 !default;
+$body-color: $gray-700 !default;
-$headings-color: $gray-900 !default;
+$headings-color: $gray-900 !default;
// Fonts
// stylelint-disable-next-line value-keyword-case
-$font-family-sans-serif: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !default;
-$font-size-base: 1rem !default; // Assumes the browser default, typically `16px`
-$font-size-sm: $font-size-base * .875 !default;
+$font-family-sans-serif:
+ Inter,
+ -apple-system,
+ BlinkMacSystemFont,
+ 'Segoe UI',
+ Roboto,
+ 'Helvetica Neue',
+ Arial,
+ sans-serif,
+ 'Apple Color Emoji',
+ 'Segoe UI Emoji',
+ 'Segoe UI Symbol' !default;
+$font-size-base: 1rem !default; // Assumes the browser default, typically `16px`
+$font-size-sm: $font-size-base * 0.875 !default;
// Components
-$box-shadow: 0 1px 2px rgba($black, .05) !default;
-$box-shadow-lg: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px 0 rgba(0, 0, 0, .06) !default;
+$box-shadow: 0 1px 2px rgba($black, 0.05) !default;
+$box-shadow-lg:
+ 0 1px 3px 0 rgba(0, 0, 0, 0.1),
+ 0 1px 2px 0 rgba(0, 0, 0, 0.06) !default;
// Tables
-$table-cell-padding-y: 1rem !default;
-$table-cell-padding-x: 1rem !default;
-$table-cell-padding-y-sm: .5rem !default;
-$table-cell-padding-x-sm: .5rem !default;
+$table-cell-padding-y: 1rem !default;
+$table-cell-padding-x: 1rem !default;
+$table-cell-padding-y-sm: 0.5rem !default;
+$table-cell-padding-x-sm: 0.5rem !default;
-$table-th-font-weight: 500 !default;
+$table-th-font-weight: 500 !default;
// Buttons + Forms
-$input-btn-padding-y: .5rem !default;
-$input-btn-padding-x: 1rem !default;
-$input-btn-font-size: $font-size-sm !default;
+$input-btn-padding-y: 0.5rem !default;
+$input-btn-padding-x: 1rem !default;
+$input-btn-font-size: $font-size-sm !default;
// Buttons
-$btn-font-weight: 500 !default;
-$btn-box-shadow: $box-shadow !default;
-$btn-focus-box-shadow: $box-shadow !default;
-$btn-active-box-shadow: $box-shadow !default;
+$btn-font-weight: 500 !default;
+$btn-box-shadow: $box-shadow !default;
+$btn-focus-box-shadow: $box-shadow !default;
+$btn-active-box-shadow: $box-shadow !default;
// Forms
-$form-label-font-weight: 500 !default;
+$form-label-font-weight: 500 !default;
-$input-box-shadow: $box-shadow !default;
+$input-box-shadow: $box-shadow !default;
-$input-group-addon-bg: $gray-100 !default;
+$input-group-addon-bg: $gray-100 !default;
// Navs
-$nav-link-color: $body-color !default;
-$nav-link-hover-color: $body-color !default;
+$nav-link-color: $body-color !default;
+$nav-link-hover-color: $body-color !default;
-$nav-tabs-border-radius: 0 !default;
-$nav-tabs-link-active-color: $primary !default;
+$nav-tabs-border-radius: 0 !default;
+$nav-tabs-link-active-color: $primary !default;
// Navbar
-$navbar-padding-y: .85rem !default;
+$navbar-padding-y: 0.85rem !default;
-$navbar-nav-link-padding-x: .75rem !default;
+$navbar-nav-link-padding-x: 0.75rem !default;
-$navbar-dark-color: $white !default;
-$navbar-dark-hover-color: $white !default;
-$navbar-dark-active-color: $white !default;
+$navbar-dark-color: $white !default;
+$navbar-dark-hover-color: $white !default;
+$navbar-dark-active-color: $white !default;
-$navbar-light-color: $black !default;
-$navbar-light-hover-color: $black !default;
-$navbar-light-active-color: $black !default;
+$navbar-light-color: $black !default;
+$navbar-light-hover-color: $black !default;
+$navbar-light-active-color: $black !default;
// Dropdowns
-$dropdown-font-size: $font-size-sm !default;
-$dropdown-border-color: $gray-300 !default;
-$dropdown-divider-bg: $gray-200 !default;
+$dropdown-font-size: $font-size-sm !default;
+$dropdown-border-color: $gray-300 !default;
+$dropdown-divider-bg: $gray-200 !default;
-$dropdown-link-hover-color: $white !default;
-$dropdown-link-hover-bg: $primary !default;
+$dropdown-link-hover-color: $white !default;
+$dropdown-link-hover-bg: $primary !default;
-$dropdown-item-padding-y: .5rem !default;
-$dropdown-item-padding-x: 1rem !default;
+$dropdown-item-padding-y: 0.5rem !default;
+$dropdown-item-padding-x: 1rem !default;
// Pagination
-$pagination-padding-y: .5rem !default;
-$pagination-padding-x: 1rem !default;
+$pagination-padding-y: 0.5rem !default;
+$pagination-padding-x: 1rem !default;
-$pagination-color: $gray-700 !default;
+$pagination-color: $gray-700 !default;
-$pagination-focus-color: $pagination-color !default;
+$pagination-focus-color: $pagination-color !default;
-$pagination-hover-color: $pagination-color !default;
-$pagination-hover-bg: $gray-100 !default;
+$pagination-hover-color: $pagination-color !default;
+$pagination-hover-bg: $gray-100 !default;
// Cards
-$card-spacer-x: 1.5rem !default;
-$card-cap-padding-y: 1rem !default;
-$card-cap-padding-x: 1.5rem !default;
+$card-spacer-x: 1.5rem !default;
+$card-cap-padding-y: 1rem !default;
+$card-cap-padding-x: 1.5rem !default;
// Toasts
-$toast-header-color: $headings-color !default;
+$toast-header-color: $headings-color !default;
// Modals
-$modal-content-border-color: $gray-300 !default;
-$modal-header-border-width: 0 !default;
+$modal-content-border-color: $gray-300 !default;
+$modal-header-border-width: 0 !default;
// List group
-$list-group-item-padding-y: 1rem !default;
-$list-group-item-padding-x: 1.5rem !default;
+$list-group-item-padding-y: 1rem !default;
+$list-group-item-padding-x: 1.5rem !default;
// Breadcrumbs
-$breadcrumb-padding-x: 1rem !default;
+$breadcrumb-padding-x: 1rem !default;
-$breadcrumb-divider: quote(">") !default;
+$breadcrumb-divider: quote('>') !default;
@import '../../../node_modules/bootstrap/scss/bootstrap';
// Zephyr 5.1.3
// Bootswatch
-
// Variables
-$web-font-path: "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap" !default;
+$web-font-path: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap' !default;
@if $web-font-path {
@import url($web-font-path);
}
@@ -193,8 +205,8 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700
font-weight: 500;
.nav-item {
- margin-right: .5rem;
- margin-left: .5rem;
+ margin-right: 0.5rem;
+ margin-left: 0.5rem;
}
.navbar-nav {
@@ -208,11 +220,11 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700
.navbar-nav {
.nav-link {
&:hover {
- background-color: rgba(255, 255, 255, .1);
+ background-color: rgba(255, 255, 255, 0.1);
}
&.active {
- background-color: rgba(0, 0, 0, .5);
+ background-color: rgba(0, 0, 0, 0.5);
}
}
}
@@ -222,11 +234,11 @@ $web-font-path: "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700
.navbar-nav {
.nav-link {
&:hover {
- background-color: rgba(0, 0, 0, .03);
+ background-color: rgba(0, 0, 0, 0.03);
}
&.active {
- background-color: rgba(0, 0, 0, .05);
+ background-color: rgba(0, 0, 0, 0.05);
}
}
}
@@ -324,7 +336,7 @@ thead th {
box-shadow: $box-shadow;
&-item {
- padding: 1rem .5rem 1rem 0;
+ padding: 1rem 0.5rem 1rem 0;
}
}
diff --git a/assets/js/app.js b/assets/js/app.js
index dd4f485f..c6b8c931 100644
--- a/assets/js/app.js
+++ b/assets/js/app.js
@@ -37,28 +37,26 @@ window.App = (function () {
'html': [
$('', {
'class': 'card-body overflow-auto',
- 'html': response.message
- })
- ]
+ 'html': response.message,
+ }),
+ ],
}).appendTo('#message-modal .modal-body');
}
}
$(document).ajaxError(onAjaxError);
-
- $(function() {
+
+ $(function () {
if (window.moment) {
window.moment.locale(vars('language_code'));
- }
- })
-
-
+ }
+ });
return {
Components: {},
Http: {},
Layouts: {},
Pages: {},
- Utils: {}
+ Utils: {},
};
})();
diff --git a/assets/js/components/appointment_status_options.js b/assets/js/components/appointment_status_options.js
index b9be1176..bf7b4ac1 100644
--- a/assets/js/components/appointment_status_options.js
+++ b/assets/js/components/appointment_status_options.js
@@ -59,8 +59,7 @@ App.Components.AppointmentStatusOptions = (function () {
return;
}
- renderListGroupItem()
- .appendTo($listGroup);
+ renderListGroupItem().appendTo($listGroup);
}
/**
@@ -120,6 +119,6 @@ App.Components.AppointmentStatusOptions = (function () {
return {
getOptions,
- setOptions
+ setOptions,
};
})();
diff --git a/assets/js/components/appointments_modal.js b/assets/js/components/appointments_modal.js
index cc91c8bf..55e4f2f3 100755
--- a/assets/js/components/appointments_modal.js
+++ b/assets/js/components/appointments_modal.js
@@ -59,7 +59,7 @@ App.Components.AppointmentsModal = (function () {
const providerId = $selectProvider.val();
const provider = vars('available_providers').find(
- (availableProvider) => Number(availableProvider.id) === Number(providerId)
+ (availableProvider) => Number(availableProvider.id) === Number(providerId),
);
if (provider && provider.timezone) {
@@ -97,7 +97,7 @@ App.Components.AppointmentsModal = (function () {
color: App.Components.ColorSelection.getColor($appointmentColor),
status: $appointmentStatus.val(),
notes: $appointmentNotes.val(),
- is_unavailability: Number(false)
+ is_unavailability: Number(false),
};
if ($appointmentId.val() !== '') {
@@ -120,7 +120,7 @@ App.Components.AppointmentsModal = (function () {
custom_field_2: $customField2.val(),
custom_field_3: $customField3.val(),
custom_field_4: $customField4.val(),
- custom_field_5: $customField5.val()
+ custom_field_5: $customField5.val(),
};
if ($customerId.val() !== '') {
@@ -167,7 +167,7 @@ App.Components.AppointmentsModal = (function () {
const providerId = $('#select-filter-item').val();
const providers = vars('available_providers').filter(
- (provider) => Number(provider.id) === Number(providerId)
+ (provider) => Number(provider.id) === Number(providerId),
);
if (providers.length) {
@@ -185,7 +185,7 @@ App.Components.AppointmentsModal = (function () {
const serviceId = $selectService.val();
const service = vars('available_services').find(
- (availableService) => Number(availableService.id) === Number(serviceId)
+ (availableService) => Number(availableService.id) === Number(serviceId),
);
const duration = service ? service.duration : 60;
@@ -228,7 +228,7 @@ App.Components.AppointmentsModal = (function () {
$('', {
'data-id': customer.id,
'text':
- (customer.first_name || '[No First Name]') + ' ' + (customer.last_name || '[No Last Name]')
+ (customer.first_name || '[No First Name]') + ' ' + (customer.last_name || '[No Last Name]'),
}).appendTo($existingCustomersList);
});
} else {
@@ -297,7 +297,7 @@ App.Components.AppointmentsModal = (function () {
'text':
(customer.first_name || '[No First Name]') +
' ' +
- (customer.last_name || '[No Last Name]')
+ (customer.last_name || '[No Last Name]'),
}).appendTo($existingCustomersList);
// Verify if this customer is on the old customer list.
@@ -331,7 +331,7 @@ App.Components.AppointmentsModal = (function () {
'text':
(customer.first_name || '[No First Name]') +
' ' +
- (customer.last_name || '[No Last Name]')
+ (customer.last_name || '[No Last Name]'),
}).appendTo($existingCustomersList);
}
});
@@ -487,12 +487,12 @@ App.Components.AppointmentsModal = (function () {
// Automatically update the #end-datetime DateTimePicker based on service duration.
const service = vars('available_services').find(
- (availableService) => Number(availableService.id) === Number(serviceId)
+ (availableService) => Number(availableService.id) === Number(serviceId),
);
const start = $startDatetime[0]._flatpickr.selectedDates[0];
$endDatetime[0]._flatpickr.setDate(new Date(start.getTime() + service.duration * 60000));
- }
+ },
});
$startDatetime[0]._flatpickr.setDate(startDatetime);
@@ -567,6 +567,6 @@ App.Components.AppointmentsModal = (function () {
document.addEventListener('DOMContentLoaded', initialize);
return {
- resetModal
+ resetModal,
};
})();
diff --git a/assets/js/components/color_selection.js b/assets/js/components/color_selection.js
index 3e047ff8..471e36b8 100644
--- a/assets/js/components/color_selection.js
+++ b/assets/js/components/color_selection.js
@@ -105,6 +105,6 @@ App.Components.ColorSelection = (function () {
disable,
enable,
getColor,
- setColor
+ setColor,
};
})();
diff --git a/assets/js/components/unavailabilities_modal.js b/assets/js/components/unavailabilities_modal.js
index 53c6d014..0c78186f 100755
--- a/assets/js/components/unavailabilities_modal.js
+++ b/assets/js/components/unavailabilities_modal.js
@@ -35,13 +35,11 @@ App.Components.UnavailabilitiesModal = (function () {
const providerId = $selectProvider.val();
const provider = vars('available_providers').find(
- (availableProvider) => Number(availableProvider.id) === Number(providerId)
+ (availableProvider) => Number(availableProvider.id) === Number(providerId),
);
if (provider && provider.timezone) {
- $unavailabilitiesModal.find('.provider-timezone').text(
- vars('timezones')[provider.timezone]
- );
+ $unavailabilitiesModal.find('.provider-timezone').text(vars('timezones')[provider.timezone]);
}
}
@@ -105,7 +103,7 @@ App.Components.UnavailabilitiesModal = (function () {
start_datetime: startMoment.format('YYYY-MM-DD HH:mm:ss'),
end_datetime: endMoment.format('YYYY-MM-DD HH:mm:ss'),
notes: $unavailabilitiesModal.find('#unavailability-notes').val(),
- id_users_provider: $selectProvider.val()
+ id_users_provider: $selectProvider.val(),
};
if ($id.val() !== '') {
@@ -158,7 +156,7 @@ App.Components.UnavailabilitiesModal = (function () {
$selectProvider.val($selectFilterItem.val()).closest('.form-group').hide();
}
- $startDatetime[0]._flatpickr.setDate(startMoment.toDate())
+ $startDatetime[0]._flatpickr.setDate(startMoment.toDate());
$endDatetime[0]._flatpickr.setDate(startMoment.add(1, 'hour').toDate());
$dialog.find('.modal-header h3').text(lang('new_unavailability_title'));
@@ -182,7 +180,7 @@ App.Components.UnavailabilitiesModal = (function () {
moment().add(1, 'hour').toDate(),
vars('date_format'),
vars('time_format'),
- true
+ true,
);
App.Utils.UI.initializeDatetimepicker($startDatetime);
@@ -213,6 +211,6 @@ App.Components.UnavailabilitiesModal = (function () {
document.addEventListener('DOMContentLoaded', initialize);
return {
- resetModal
+ resetModal,
};
})();
diff --git a/assets/js/components/working_plan_exceptions_modal.js b/assets/js/components/working_plan_exceptions_modal.js
index a4d094be..68a06ecf 100644
--- a/assets/js/components/working_plan_exceptions_modal.js
+++ b/assets/js/components/working_plan_exceptions_modal.js
@@ -130,7 +130,7 @@ App.Components.WorkingPlanExceptionsModal = (function () {
breaks.push({
start: moment(start, vars('time_format') === 'regular' ? 'h:mm a' : 'HH:mm').format('HH:mm'),
- end: moment(end, vars('time_format') === 'regular' ? 'h:mm a' : 'HH:mm').format('HH:mm')
+ end: moment(end, vars('time_format') === 'regular' ? 'h:mm a' : 'HH:mm').format('HH:mm'),
});
});
@@ -166,7 +166,7 @@ App.Components.WorkingPlanExceptionsModal = (function () {
: {
start: moment($start[0]._flatpickr.selectedDates[0]).format('HH:mm'),
end: moment($end[0]._flatpickr.selectedDates[0]).format('HH:mm'),
- breaks: getBreaks()
+ breaks: getBreaks(),
};
deferred.resolve(date, workingPlanException);
@@ -193,12 +193,12 @@ App.Components.WorkingPlanExceptionsModal = (function () {
submit: $('', {
'type': 'button',
'class': 'd-none submit-editable',
- 'text': lang('save')
+ 'text': lang('save'),
}).get(0).outerHTML,
cancel: $('', {
'type': 'button',
'class': 'd-none cancel-editable',
- 'text': lang('cancel')
+ 'text': lang('cancel'),
}).get(0).outerHTML,
onblur: 'ignore',
onreset: () => {
@@ -210,8 +210,8 @@ App.Components.WorkingPlanExceptionsModal = (function () {
if (!enableSubmit) {
return false; // disable Enter button
}
- }
- }
+ },
+ },
);
}
@@ -264,7 +264,7 @@ App.Components.WorkingPlanExceptionsModal = (function () {
});
editableTimeCell(
- $breaks.find('tbody .working-plan-exceptions-break-start, tbody .working-plan-exceptions-break-end')
+ $breaks.find('tbody .working-plan-exceptions-break-start, tbody .working-plan-exceptions-break-end'),
);
} else {
$start[0]._flatpickr.setDate(moment('08:00', 'HH:mm').toDate());
@@ -295,11 +295,11 @@ App.Components.WorkingPlanExceptionsModal = (function () {
'html': [
$(' | ', {
'class': 'working-plan-exceptions-break-start editable',
- 'text': moment(breakPeriod.start, 'HH:mm').format(timeFormat)
+ 'text': moment(breakPeriod.start, 'HH:mm').format(timeFormat),
}),
$(' | ', {
'class': 'working-plan-exceptions-break-end editable',
- 'text': moment(breakPeriod.end, 'HH:mm').format(timeFormat)
+ 'text': moment(breakPeriod.end, 'HH:mm').format(timeFormat),
}),
$(' | ', {
'html': [
@@ -309,9 +309,9 @@ App.Components.WorkingPlanExceptionsModal = (function () {
'title': lang('edit'),
'html': [
$('', {
- 'class': 'fas fa-edit'
- })
- ]
+ 'class': 'fas fa-edit',
+ }),
+ ],
}),
$('', {
'type': 'button',
@@ -319,9 +319,9 @@ App.Components.WorkingPlanExceptionsModal = (function () {
'title': lang('delete'),
'html': [
$('', {
- 'class': 'fas fa-trash-alt'
- })
- ]
+ 'class': 'fas fa-trash-alt',
+ }),
+ ],
}),
$('', {
'type': 'button',
@@ -329,9 +329,9 @@ App.Components.WorkingPlanExceptionsModal = (function () {
'title': lang('save'),
'html': [
$('', {
- 'class': 'fas fa-check-circle'
- })
- ]
+ 'class': 'fas fa-check-circle',
+ }),
+ ],
}),
$('', {
'type': 'button',
@@ -339,13 +339,13 @@ App.Components.WorkingPlanExceptionsModal = (function () {
'title': lang('cancel'),
'html': [
$('', {
- 'class': 'fas fa-ban'
- })
- ]
- })
- ]
- })
- ]
+ 'class': 'fas fa-ban',
+ }),
+ ],
+ }),
+ ],
+ }),
+ ],
});
}
@@ -355,7 +355,7 @@ App.Components.WorkingPlanExceptionsModal = (function () {
function onAddBreakClick() {
const $newBreak = renderBreakRow({
start: '12:00',
- end: '14:00'
+ end: '14:00',
}).appendTo('#working-plan-exceptions-breaks tbody');
// Bind editable and event handlers.
@@ -381,7 +381,7 @@ App.Components.WorkingPlanExceptionsModal = (function () {
let $tr = $(this).closest('tr');
$tr.children().trigger('edit');
App.Utils.UI.initializeTimepicker(
- $tr.find('.working-plan-exceptions-break-start input, .working-plan-exceptions-break-end input')
+ $tr.find('.working-plan-exceptions-break-start input, .working-plan-exceptions-break-end input'),
);
$(this).closest('tr').find('.working-plan-exceptions-break-start').focus();
@@ -409,16 +409,16 @@ App.Components.WorkingPlanExceptionsModal = (function () {
const $tr = $(this).closest('tr');
const start = moment(
$tr.find('.working-plan-exceptions-break-start input').val(),
- vars('time_format') === 'regular' ? 'h:mm a' : 'HH:mm'
+ vars('time_format') === 'regular' ? 'h:mm a' : 'HH:mm',
);
const end = moment(
$tr.find('.working-plan-exceptions-break-end input').val(),
- vars('time_format') === 'regular' ? 'h:mm a' : 'HH:mm'
+ vars('time_format') === 'regular' ? 'h:mm a' : 'HH:mm',
);
if (start > end) {
$tr.find('.working-plan-exceptions-break-end input').val(
- start.add(1, 'hour').format(vars('time_format') === 'regular' ? 'h:mm a' : 'HH:mm')
+ start.add(1, 'hour').format(vars('time_format') === 'regular' ? 'h:mm a' : 'HH:mm'),
);
}
@@ -483,6 +483,6 @@ App.Components.WorkingPlanExceptionsModal = (function () {
return {
add,
- edit
+ edit,
};
})();
diff --git a/assets/js/http/account_http_client.js b/assets/js/http/account_http_client.js
index dc7284f2..77d25f40 100644
--- a/assets/js/http/account_http_client.js
+++ b/assets/js/http/account_http_client.js
@@ -27,7 +27,7 @@ App.Http.Account = (function () {
const data = {
csrf_token: vars('csrf_token'),
- account
+ account,
};
return $.post(url, data);
@@ -47,7 +47,7 @@ App.Http.Account = (function () {
const data = {
csrf_token: vars('csrf_token'),
user_id: userId,
- username
+ username,
};
return $.post(url, data);
@@ -55,6 +55,6 @@ App.Http.Account = (function () {
return {
save,
- validateUsername
+ validateUsername,
};
})();
diff --git a/assets/js/http/admins_http_client.js b/assets/js/http/admins_http_client.js
index c6d7b26a..b987f456 100644
--- a/assets/js/http/admins_http_client.js
+++ b/assets/js/http/admins_http_client.js
@@ -38,7 +38,7 @@ App.Http.Admins = (function () {
const data = {
csrf_token: vars('csrf_token'),
- admin: admin
+ admin: admin,
};
return $.post(url, data);
@@ -56,7 +56,7 @@ App.Http.Admins = (function () {
const data = {
csrf_token: vars('csrf_token'),
- admin: admin
+ admin: admin,
};
return $.post(url, data);
@@ -74,7 +74,7 @@ App.Http.Admins = (function () {
const data = {
csrf_token: vars('csrf_token'),
- admin_id: adminId
+ admin_id: adminId,
};
return $.post(url, data);
@@ -98,7 +98,7 @@ App.Http.Admins = (function () {
keyword,
limit,
offset,
- order_by: orderBy
+ order_by: orderBy,
};
return $.post(url, data);
@@ -116,7 +116,7 @@ App.Http.Admins = (function () {
const data = {
csrf_token: vars('csrf_token'),
- admin_id: adminId
+ admin_id: adminId,
};
return $.post(url, data);
@@ -128,6 +128,6 @@ App.Http.Admins = (function () {
update,
destroy,
search,
- find
+ find,
};
})();
diff --git a/assets/js/http/api_settings_http_client.js b/assets/js/http/api_settings_http_client.js
index e3f93a1a..426df80f 100644
--- a/assets/js/http/api_settings_http_client.js
+++ b/assets/js/http/api_settings_http_client.js
@@ -27,13 +27,13 @@ App.Http.ApiSettings = (function () {
const data = {
csrf_token: vars('csrf_token'),
- api_settings: apiSettings
+ api_settings: apiSettings,
};
return $.post(url, data);
}
return {
- save
+ save,
};
})();
diff --git a/assets/js/http/appointments_http_client.js b/assets/js/http/appointments_http_client.js
index 6f24ee0f..9436cb9b 100644
--- a/assets/js/http/appointments_http_client.js
+++ b/assets/js/http/appointments_http_client.js
@@ -38,7 +38,7 @@ App.Http.Appointments = (function () {
const data = {
csrf_token: vars('csrf_token'),
- appointment: appointment
+ appointment: appointment,
};
return $.post(url, data);
@@ -56,7 +56,7 @@ App.Http.Appointments = (function () {
const data = {
csrf_token: vars('csrf_token'),
- appointment: appointment
+ appointment: appointment,
};
return $.post(url, data);
@@ -74,7 +74,7 @@ App.Http.Appointments = (function () {
const data = {
csrf_token: vars('csrf_token'),
- appointment_id: appointmentId
+ appointment_id: appointmentId,
};
return $.post(url, data);
@@ -98,7 +98,7 @@ App.Http.Appointments = (function () {
keyword,
limit,
offset,
- order_by: orderBy
+ order_by: orderBy,
};
return $.post(url, data);
@@ -116,7 +116,7 @@ App.Http.Appointments = (function () {
const data = {
csrf_token: vars('csrf_token'),
- appointment_id: appointmentId
+ appointment_id: appointmentId,
};
return $.post(url, data);
@@ -128,6 +128,6 @@ App.Http.Appointments = (function () {
update,
destroy,
search,
- find
+ find,
};
})();
diff --git a/assets/js/http/blocked_periods_http_client.js b/assets/js/http/blocked_periods_http_client.js
index 48421c02..8c3caddf 100644
--- a/assets/js/http/blocked_periods_http_client.js
+++ b/assets/js/http/blocked_periods_http_client.js
@@ -38,7 +38,7 @@ App.Http.BlockedPeriods = (function () {
const data = {
csrf_token: vars('csrf_token'),
- blocked_period: blockedPeriod
+ blocked_period: blockedPeriod,
};
return $.post(url, data);
@@ -56,7 +56,7 @@ App.Http.BlockedPeriods = (function () {
const data = {
csrf_token: vars('csrf_token'),
- blocked_period: blockedPeriod
+ blocked_period: blockedPeriod,
};
return $.post(url, data);
@@ -74,7 +74,7 @@ App.Http.BlockedPeriods = (function () {
const data = {
csrf_token: vars('csrf_token'),
- blocked_period_id: blockedPeriodId
+ blocked_period_id: blockedPeriodId,
};
return $.post(url, data);
@@ -90,7 +90,7 @@ App.Http.BlockedPeriods = (function () {
*
* @return {Object}
*/
- function search(keyword, limit = null, offset = null, orderBy = null) {
+ function search(keyword, limit = null, offset = null, orderBy = null) {
const url = App.Utils.Url.siteUrl('blocked_periods/search');
const data = {
@@ -98,7 +98,7 @@ App.Http.BlockedPeriods = (function () {
keyword,
limit,
offset,
- order_by: orderBy
+ order_by: orderBy,
};
return $.post(url, data);
@@ -116,7 +116,7 @@ App.Http.BlockedPeriods = (function () {
const data = {
csrf_token: vars('csrf_token'),
- blocked_period_id: blockedPeriodId
+ blocked_period_id: blockedPeriodId,
};
return $.post(url, data);
@@ -128,6 +128,6 @@ App.Http.BlockedPeriods = (function () {
update,
destroy,
search,
- find
+ find,
};
})();
diff --git a/assets/js/http/booking_http_client.js b/assets/js/http/booking_http_client.js
index 0f9ceb8f..be6a1cb0 100755
--- a/assets/js/http/booking_http_client.js
+++ b/assets/js/http/booking_http_client.js
@@ -48,7 +48,7 @@ App.Http.Booking = (function () {
let serviceDuration = 15;
const service = vars('available_services').find(
- (availableService) => Number(availableService.id) === Number(serviceId)
+ (availableService) => Number(availableService.id) === Number(serviceId),
);
if (service) {
@@ -68,7 +68,7 @@ App.Http.Booking = (function () {
selected_date: selectedDate,
service_duration: serviceDuration,
manage_mode: Number(vars('manage_mode') || 0),
- appointment_id: appointmentId
+ appointment_id: appointmentId,
};
$.post(url, data).done((response) => {
@@ -89,7 +89,7 @@ App.Http.Booking = (function () {
}
const provider = vars('available_providers').find(
- (availableProvider) => Number(providerId) === Number(availableProvider.id)
+ (availableProvider) => Number(providerId) === Number(availableProvider.id),
);
if (!provider) {
@@ -113,10 +113,10 @@ App.Http.Booking = (function () {
$('', {
'class': 'btn btn-outline-secondary w-100 shadow-none available-hour',
'data': {
- 'value': availableHour
+ 'value': availableHour,
},
- 'text': availableHourMoment.format(timeFormat)
- })
+ 'text': availableHourMoment.format(timeFormat),
+ }),
);
});
@@ -127,7 +127,7 @@ App.Http.Booking = (function () {
.filter(
(index, availableHourEl) =>
$(availableHourEl).text() ===
- moment(vars('appointment_data').start_datetime).format(timeFormat)
+ moment(vars('appointment_data').start_datetime).format(timeFormat),
)
.addClass('selected-hour');
} else {
@@ -165,7 +165,7 @@ App.Http.Booking = (function () {
const data = {
csrf_token: vars('csrf_token'),
- post_data: formData
+ post_data: formData,
};
if ($captchaText.length > 0) {
@@ -193,9 +193,9 @@ App.Http.Booking = (function () {
left: '0',
height: '100vh',
width: '100vw',
- opacity: '0.5'
+ opacity: '0.5',
});
- }
+ },
})
.done((response) => {
if (response.captcha_verification === false) {
@@ -252,14 +252,14 @@ App.Http.Booking = (function () {
selected_date: encodeURIComponent(selectedDateString),
csrf_token: vars('csrf_token'),
manage_mode: Number(App.Pages.Booking.manageMode),
- appointment_id: appointmentId
+ appointment_id: appointmentId,
};
$.ajax({
url: url,
type: 'GET',
data: data,
- dataType: 'json'
+ dataType: 'json',
}).done((response) => {
if (response.is_month_unavailable) {
if (searchedMonthCounter >= 3) {
@@ -313,14 +313,21 @@ App.Http.Booking = (function () {
}
// Grey out unavailable dates.
- $('#select-date')[0]._flatpickr.set('disable', unavailableDates.map(unavailableDate => new Date(unavailableDate)));
+ $('#select-date')[0]._flatpickr.set(
+ 'disable',
+ unavailableDates.map((unavailableDate) => new Date(unavailableDate)),
+ );
const dateQueryParam = App.Utils.Url.queryParam('date');
if (dateQueryParam) {
const dateQueryParamMoment = moment(dateQueryParam);
- if (dateQueryParamMoment.isValid() && !unavailableDates.includes(dateQueryParam) && dateQueryParamMoment.format('YYYY-MM') === selectedDateMoment.format('YYYY-MM')) {
+ if (
+ dateQueryParamMoment.isValid() &&
+ !unavailableDates.includes(dateQueryParam) &&
+ dateQueryParamMoment.format('YYYY-MM') === selectedDateMoment.format('YYYY-MM')
+ ) {
$('#select-date')[0]._flatpickr.setDate(dateQueryParamMoment.toDate());
}
}
@@ -338,7 +345,7 @@ App.Http.Booking = (function () {
const data = {
csrf_token: vars('csrf_token'),
- customer_token: customerToken
+ customer_token: customerToken,
};
$.post(url, data).done(() => {
@@ -351,6 +358,6 @@ App.Http.Booking = (function () {
getAvailableHours,
getUnavailableDates,
applyPreviousUnavailableDates,
- deletePersonalInformation
+ deletePersonalInformation,
};
})();
diff --git a/assets/js/http/booking_settings_http_client.js b/assets/js/http/booking_settings_http_client.js
index 1a971bc1..4cfea4c8 100644
--- a/assets/js/http/booking_settings_http_client.js
+++ b/assets/js/http/booking_settings_http_client.js
@@ -27,13 +27,13 @@ App.Http.BookingSettings = (function () {
const data = {
csrf_token: vars('csrf_token'),
- booking_settings: bookingSettings
+ booking_settings: bookingSettings,
};
return $.post(url, data);
}
return {
- save
+ save,
};
})();
diff --git a/assets/js/http/business_settings_http_client.js b/assets/js/http/business_settings_http_client.js
index 00834be6..016bff3d 100644
--- a/assets/js/http/business_settings_http_client.js
+++ b/assets/js/http/business_settings_http_client.js
@@ -27,7 +27,7 @@ App.Http.BusinessSettings = (function () {
const data = {
csrf_token: vars('csrf_token'),
- business_settings: businessSettings
+ business_settings: businessSettings,
};
return $.post(url, data);
@@ -45,7 +45,7 @@ App.Http.BusinessSettings = (function () {
const data = {
csrf_token: vars('csrf_token'),
- working_plan: JSON.stringify(workingPlan)
+ working_plan: JSON.stringify(workingPlan),
};
return $.post(url, data);
@@ -53,6 +53,6 @@ App.Http.BusinessSettings = (function () {
return {
save,
- applyGlobalWorkingPlan
+ applyGlobalWorkingPlan,
};
})();
diff --git a/assets/js/http/calendar_http_client.js b/assets/js/http/calendar_http_client.js
index 1375ea9f..41125abd 100755
--- a/assets/js/http/calendar_http_client.js
+++ b/assets/js/http/calendar_http_client.js
@@ -35,7 +35,7 @@ App.Http.Calendar = (function () {
const data = {
csrf_token: vars('csrf_token'),
- appointment_data: appointment
+ appointment_data: appointment,
};
if (customer) {
@@ -69,7 +69,7 @@ App.Http.Calendar = (function () {
const data = {
csrf_token: vars('csrf_token'),
appointment_id: appointmentId,
- cancellation_reason: cancellationReason
+ cancellation_reason: cancellationReason,
};
return $.post(url, data);
@@ -89,7 +89,7 @@ App.Http.Calendar = (function () {
const data = {
csrf_token: vars('csrf_token'),
- unavailability: unavailability
+ unavailability: unavailability,
};
return $.post(url, data)
@@ -117,7 +117,7 @@ App.Http.Calendar = (function () {
const data = {
csrf_token: vars('csrf_token'),
- unavailability_id: unavailabilityId
+ unavailability_id: unavailabilityId,
};
return $.post(url, data);
@@ -141,7 +141,7 @@ App.Http.Calendar = (function () {
csrf_token: vars('csrf_token'),
date: date,
working_plan_exception: workingPlanException,
- provider_id: providerId
+ provider_id: providerId,
};
return $.post(url, data)
@@ -173,7 +173,7 @@ App.Http.Calendar = (function () {
const data = {
csrf_token: vars('csrf_token'),
date: date,
- provider_id: providerId
+ provider_id: providerId,
};
return $.post(url, data)
@@ -207,7 +207,7 @@ App.Http.Calendar = (function () {
record_id: recordId,
start_date: moment(startDate).format('YYYY-MM-DD'),
end_date: moment(endDate).format('YYYY-MM-DD'),
- filter_type: filterType
+ filter_type: filterType,
};
return $.post(url, data);
@@ -227,7 +227,7 @@ App.Http.Calendar = (function () {
const data = {
csrf_token: vars('csrf_token'),
start_date: moment(startDate).format('YYYY-MM-DD'),
- end_date: moment(endDate).format('YYYY-MM-DD')
+ end_date: moment(endDate).format('YYYY-MM-DD'),
};
return $.post(url, data);
@@ -241,6 +241,6 @@ App.Http.Calendar = (function () {
saveWorkingPlanException,
deleteWorkingPlanException,
getCalendarAppointments,
- getCalendarAppointmentsForTableView
+ getCalendarAppointmentsForTableView,
};
})();
diff --git a/assets/js/http/customers_http_client.js b/assets/js/http/customers_http_client.js
index d3889fa0..d6ad0f0d 100644
--- a/assets/js/http/customers_http_client.js
+++ b/assets/js/http/customers_http_client.js
@@ -38,7 +38,7 @@ App.Http.Customers = (function () {
const data = {
csrf_token: vars('csrf_token'),
- customer: customer
+ customer: customer,
};
return $.post(url, data);
@@ -56,7 +56,7 @@ App.Http.Customers = (function () {
const data = {
csrf_token: vars('csrf_token'),
- customer: customer
+ customer: customer,
};
return $.post(url, data);
@@ -74,7 +74,7 @@ App.Http.Customers = (function () {
const data = {
csrf_token: vars('csrf_token'),
- customer_id: customerId
+ customer_id: customerId,
};
return $.post(url, data);
@@ -98,7 +98,7 @@ App.Http.Customers = (function () {
keyword,
limit,
offset,
- order_by: orderBy
+ order_by: orderBy,
};
return $.post(url, data);
@@ -116,7 +116,7 @@ App.Http.Customers = (function () {
const data = {
csrf_token: vars('csrf_token'),
- customer_id: customerId
+ customer_id: customerId,
};
return $.post(url, data);
@@ -128,6 +128,6 @@ App.Http.Customers = (function () {
update,
destroy,
search,
- find
+ find,
};
})();
diff --git a/assets/js/http/general_settings_http_client.js b/assets/js/http/general_settings_http_client.js
index 2e9745a7..66de9bf4 100644
--- a/assets/js/http/general_settings_http_client.js
+++ b/assets/js/http/general_settings_http_client.js
@@ -27,13 +27,13 @@ App.Http.GeneralSettings = (function () {
const data = {
csrf_token: vars('csrf_token'),
- general_settings: generalSettings
+ general_settings: generalSettings,
};
return $.post(url, data);
}
return {
- save
+ save,
};
})();
diff --git a/assets/js/http/google_analytics_settings_http_client.js b/assets/js/http/google_analytics_settings_http_client.js
index de24aabd..dbe35526 100644
--- a/assets/js/http/google_analytics_settings_http_client.js
+++ b/assets/js/http/google_analytics_settings_http_client.js
@@ -27,13 +27,13 @@ App.Http.GoogleAnalyticsSettings = (function () {
const data = {
csrf_token: vars('csrf_token'),
- google_analytics_settings: googleAnalyticsSettings
+ google_analytics_settings: googleAnalyticsSettings,
};
return $.post(url, data);
}
return {
- save
+ save,
};
})();
diff --git a/assets/js/http/google_http_client.js b/assets/js/http/google_http_client.js
index 11452eb3..05f29508 100755
--- a/assets/js/http/google_http_client.js
+++ b/assets/js/http/google_http_client.js
@@ -29,7 +29,7 @@ App.Http.Google = (function () {
const data = {
csrf_token: vars('csrf_token'),
provider_id: providerId,
- calendar_id: googleCalendarId
+ calendar_id: googleCalendarId,
};
return $.post(url, data);
@@ -47,7 +47,7 @@ App.Http.Google = (function () {
const data = {
csrf_token: vars('csrf_token'),
- provider_id: providerId
+ provider_id: providerId,
};
return $.post(url, data);
@@ -65,7 +65,7 @@ App.Http.Google = (function () {
const data = {
csrf_token: vars('csrf_token'),
- provider_id: providerId
+ provider_id: providerId,
};
return $.post(url, data);
@@ -88,6 +88,6 @@ App.Http.Google = (function () {
getGoogleCalendars,
selectGoogleCalendar,
disableProviderSync,
- syncWithGoogle
+ syncWithGoogle,
};
})();
diff --git a/assets/js/http/legal_settings_http_client.js b/assets/js/http/legal_settings_http_client.js
index a8408d60..cc4720f6 100644
--- a/assets/js/http/legal_settings_http_client.js
+++ b/assets/js/http/legal_settings_http_client.js
@@ -27,13 +27,13 @@ App.Http.LegalSettings = (function () {
const data = {
csrf_token: vars('csrf_token'),
- legal_settings: legalSettings
+ legal_settings: legalSettings,
};
return $.post(url, data);
}
return {
- save
+ save,
};
})();
diff --git a/assets/js/http/localization_http_client.js b/assets/js/http/localization_http_client.js
index 164d8cd0..c5e1d5ce 100644
--- a/assets/js/http/localization_http_client.js
+++ b/assets/js/http/localization_http_client.js
@@ -25,13 +25,13 @@ App.Http.Localization = (function () {
const data = {
csrf_token: vars('csrf_token'),
- language
+ language,
};
return $.post(url, data);
}
return {
- changeLanguage
+ changeLanguage,
};
})();
diff --git a/assets/js/http/login_http_client.js b/assets/js/http/login_http_client.js
index 0f48571a..edbba124 100644
--- a/assets/js/http/login_http_client.js
+++ b/assets/js/http/login_http_client.js
@@ -29,13 +29,13 @@ App.Http.Login = (function () {
const data = {
csrf_token: vars('csrf_token'),
username,
- password
+ password,
};
return $.post(url, data);
}
return {
- validate
+ validate,
};
})();
diff --git a/assets/js/http/matomo_analytics_settings_http_client.js b/assets/js/http/matomo_analytics_settings_http_client.js
index 3fb3e4f9..f514faa7 100644
--- a/assets/js/http/matomo_analytics_settings_http_client.js
+++ b/assets/js/http/matomo_analytics_settings_http_client.js
@@ -27,13 +27,13 @@ App.Http.MatomoAnalyticsSettings = (function () {
const data = {
csrf_token: vars('csrf_token'),
- matomo_analytics_settings: matomoAnalyticsSettings
+ matomo_analytics_settings: matomoAnalyticsSettings,
};
return $.post(url, data);
}
return {
- save
+ save,
};
})();
diff --git a/assets/js/http/providers_http_client.js b/assets/js/http/providers_http_client.js
index 042548a4..3261d7ec 100644
--- a/assets/js/http/providers_http_client.js
+++ b/assets/js/http/providers_http_client.js
@@ -38,7 +38,7 @@ App.Http.Providers = (function () {
const data = {
csrf_token: vars('csrf_token'),
- provider: provider
+ provider: provider,
};
return $.post(url, data);
@@ -56,7 +56,7 @@ App.Http.Providers = (function () {
const data = {
csrf_token: vars('csrf_token'),
- provider: provider
+ provider: provider,
};
return $.post(url, data);
@@ -74,7 +74,7 @@ App.Http.Providers = (function () {
const data = {
csrf_token: vars('csrf_token'),
- provider_id: providerId
+ provider_id: providerId,
};
return $.post(url, data);
@@ -90,7 +90,7 @@ App.Http.Providers = (function () {
*
* @return {Object}
*/
- function search(keyword, limit = null, offset = null, orderBy = null) {
+ function search(keyword, limit = null, offset = null, orderBy = null) {
const url = App.Utils.Url.siteUrl('providers/search');
const data = {
@@ -98,7 +98,7 @@ App.Http.Providers = (function () {
keyword,
limit,
offset,
- order_by: orderBy
+ order_by: orderBy,
};
return $.post(url, data);
@@ -116,7 +116,7 @@ App.Http.Providers = (function () {
const data = {
csrf_token: vars('csrf_token'),
- provider_id: providerId
+ provider_id: providerId,
};
return $.post(url, data);
@@ -128,6 +128,6 @@ App.Http.Providers = (function () {
update,
destroy,
search,
- find
+ find,
};
})();
diff --git a/assets/js/http/recovery_http_client.js b/assets/js/http/recovery_http_client.js
index 97e1a048..2cf6a5c7 100644
--- a/assets/js/http/recovery_http_client.js
+++ b/assets/js/http/recovery_http_client.js
@@ -29,13 +29,13 @@ App.Http.Recovery = (function () {
const data = {
csrf_token: vars('csrf_token'),
username,
- email
+ email,
};
return $.post(url, data);
}
return {
- perform
+ perform,
};
})();
diff --git a/assets/js/http/secretaries_http_client.js b/assets/js/http/secretaries_http_client.js
index 201dde5e..af2234bb 100644
--- a/assets/js/http/secretaries_http_client.js
+++ b/assets/js/http/secretaries_http_client.js
@@ -38,7 +38,7 @@ App.Http.Secretaries = (function () {
const data = {
csrf_token: vars('csrf_token'),
- secretary: secretary
+ secretary: secretary,
};
return $.post(url, data);
@@ -56,7 +56,7 @@ App.Http.Secretaries = (function () {
const data = {
csrf_token: vars('csrf_token'),
- secretary: secretary
+ secretary: secretary,
};
return $.post(url, data);
@@ -74,7 +74,7 @@ App.Http.Secretaries = (function () {
const data = {
csrf_token: vars('csrf_token'),
- secretary_id: secretaryId
+ secretary_id: secretaryId,
};
return $.post(url, data);
@@ -90,7 +90,7 @@ App.Http.Secretaries = (function () {
*
* @return {Object}
*/
- function search(keyword, limit = null, offset = null, orderBy = null) {
+ function search(keyword, limit = null, offset = null, orderBy = null) {
const url = App.Utils.Url.siteUrl('secretaries/search');
const data = {
@@ -98,7 +98,7 @@ App.Http.Secretaries = (function () {
keyword,
limit,
offset,
- order_by: orderBy
+ order_by: orderBy,
};
return $.post(url, data);
@@ -116,7 +116,7 @@ App.Http.Secretaries = (function () {
const data = {
csrf_token: vars('csrf_token'),
- secretary_id: secretaryId
+ secretary_id: secretaryId,
};
return $.post(url, data);
@@ -128,6 +128,6 @@ App.Http.Secretaries = (function () {
update,
destroy,
search,
- find
+ find,
};
})();
diff --git a/assets/js/http/service_categories_http_client.js b/assets/js/http/service_categories_http_client.js
index 77918d08..9d31bec7 100644
--- a/assets/js/http/service_categories_http_client.js
+++ b/assets/js/http/service_categories_http_client.js
@@ -38,7 +38,7 @@ App.Http.ServiceCategories = (function () {
const data = {
csrf_token: vars('csrf_token'),
- service_category: serviceCategory
+ service_category: serviceCategory,
};
return $.post(url, data);
@@ -56,7 +56,7 @@ App.Http.ServiceCategories = (function () {
const data = {
csrf_token: vars('csrf_token'),
- service_category: serviceCategory
+ service_category: serviceCategory,
};
return $.post(url, data);
@@ -74,7 +74,7 @@ App.Http.ServiceCategories = (function () {
const data = {
csrf_token: vars('csrf_token'),
- service_category_id: serviceCategoryId
+ service_category_id: serviceCategoryId,
};
return $.post(url, data);
@@ -90,7 +90,7 @@ App.Http.ServiceCategories = (function () {
*
* @return {Object}
*/
- function search(keyword, limit = null, offset = null, orderBy = null) {
+ function search(keyword, limit = null, offset = null, orderBy = null) {
const url = App.Utils.Url.siteUrl('service_categories/search');
const data = {
@@ -98,7 +98,7 @@ App.Http.ServiceCategories = (function () {
keyword,
limit,
offset,
- order_by: orderBy
+ order_by: orderBy,
};
return $.post(url, data);
@@ -116,7 +116,7 @@ App.Http.ServiceCategories = (function () {
const data = {
csrf_token: vars('csrf_token'),
- service_category_id: serviceCategoryId
+ service_category_id: serviceCategoryId,
};
return $.post(url, data);
@@ -128,6 +128,6 @@ App.Http.ServiceCategories = (function () {
update,
destroy,
search,
- find
+ find,
};
})();
diff --git a/assets/js/http/services_http_client.js b/assets/js/http/services_http_client.js
index 1b5269a8..878aa5e0 100644
--- a/assets/js/http/services_http_client.js
+++ b/assets/js/http/services_http_client.js
@@ -38,7 +38,7 @@ App.Http.Services = (function () {
const data = {
csrf_token: vars('csrf_token'),
- service: service
+ service: service,
};
return $.post(url, data);
@@ -56,7 +56,7 @@ App.Http.Services = (function () {
const data = {
csrf_token: vars('csrf_token'),
- service: service
+ service: service,
};
return $.post(url, data);
@@ -74,7 +74,7 @@ App.Http.Services = (function () {
const data = {
csrf_token: vars('csrf_token'),
- service_id: serviceId
+ service_id: serviceId,
};
return $.post(url, data);
@@ -98,7 +98,7 @@ App.Http.Services = (function () {
keyword,
limit,
offset,
- order_by: orderBy
+ order_by: orderBy,
};
return $.post(url, data);
@@ -116,7 +116,7 @@ App.Http.Services = (function () {
const data = {
csrf_token: vars('csrf_token'),
- service_id: serviceId
+ service_id: serviceId,
};
return $.post(url, data);
@@ -128,6 +128,6 @@ App.Http.Services = (function () {
update,
destroy,
search,
- find
+ find,
};
})();
diff --git a/assets/js/http/settings_http_client.js b/assets/js/http/settings_http_client.js
index 2fc429d4..f2937077 100644
--- a/assets/js/http/settings_http_client.js
+++ b/assets/js/http/settings_http_client.js
@@ -38,7 +38,7 @@ App.Http.Settings = (function () {
const data = {
csrf_token: vars('csrf_token'),
- setting: setting
+ setting: setting,
};
return $.post(url, data);
@@ -56,7 +56,7 @@ App.Http.Settings = (function () {
const data = {
csrf_token: vars('csrf_token'),
- setting: setting
+ setting: setting,
};
return $.post(url, data);
@@ -74,7 +74,7 @@ App.Http.Settings = (function () {
const data = {
csrf_token: vars('csrf_token'),
- setting_id: settingId
+ setting_id: settingId,
};
return $.post(url, data);
@@ -90,7 +90,7 @@ App.Http.Settings = (function () {
*
* @return {Object}
*/
- function search(keyword, limit = null, offset = null, orderBy = null) {
+ function search(keyword, limit = null, offset = null, orderBy = null) {
const url = App.Utils.Url.siteUrl('settings/search');
const data = {
@@ -98,7 +98,7 @@ App.Http.Settings = (function () {
keyword,
limit,
offset,
- order_by: orderBy
+ order_by: orderBy,
};
return $.post(url, data);
@@ -116,7 +116,7 @@ App.Http.Settings = (function () {
const data = {
csrf_token: vars('csrf_token'),
- setting_id: settingId
+ setting_id: settingId,
};
return $.post(url, data);
@@ -128,6 +128,6 @@ App.Http.Settings = (function () {
update,
destroy,
search,
- find
+ find,
};
})();
diff --git a/assets/js/http/unavailabilities_http_client.js b/assets/js/http/unavailabilities_http_client.js
index d93fcdc4..87c58cce 100644
--- a/assets/js/http/unavailabilities_http_client.js
+++ b/assets/js/http/unavailabilities_http_client.js
@@ -38,7 +38,7 @@ App.Http.Unavailabilities = (function () {
const data = {
csrf_token: vars('csrf_token'),
- unavailability: unavailability
+ unavailability: unavailability,
};
return $.post(url, data);
@@ -56,7 +56,7 @@ App.Http.Unavailabilities = (function () {
const data = {
csrf_token: vars('csrf_token'),
- unavailability: unavailability
+ unavailability: unavailability,
};
return $.post(url, data);
@@ -74,7 +74,7 @@ App.Http.Unavailabilities = (function () {
const data = {
csrf_token: vars('csrf_token'),
- unavailability_id: unavailabilityId
+ unavailability_id: unavailabilityId,
};
return $.post(url, data);
@@ -90,7 +90,7 @@ App.Http.Unavailabilities = (function () {
*
* @return {Object}
*/
- function search(keyword, limit = null, offset = null, orderBy = null) {
+ function search(keyword, limit = null, offset = null, orderBy = null) {
const url = App.Utils.Url.siteUrl('unavailabilities/search');
const data = {
@@ -98,7 +98,7 @@ App.Http.Unavailabilities = (function () {
keyword,
limit,
offset,
- order_by: orderBy
+ order_by: orderBy,
};
return $.post(url, data);
@@ -116,7 +116,7 @@ App.Http.Unavailabilities = (function () {
const data = {
csrf_token: vars('csrf_token'),
- unavailability_id: unavailabilityId
+ unavailability_id: unavailabilityId,
};
return $.post(url, data);
@@ -128,6 +128,6 @@ App.Http.Unavailabilities = (function () {
update,
destroy,
search,
- find
+ find,
};
})();
diff --git a/assets/js/http/webhooks_http_client.js b/assets/js/http/webhooks_http_client.js
index ff43a21b..3ecb86a8 100644
--- a/assets/js/http/webhooks_http_client.js
+++ b/assets/js/http/webhooks_http_client.js
@@ -38,7 +38,7 @@ App.Http.Webhooks = (function () {
const data = {
csrf_token: vars('csrf_token'),
- webhook: webhook
+ webhook: webhook,
};
return $.post(url, data);
@@ -56,7 +56,7 @@ App.Http.Webhooks = (function () {
const data = {
csrf_token: vars('csrf_token'),
- webhook: webhook
+ webhook: webhook,
};
return $.post(url, data);
@@ -74,7 +74,7 @@ App.Http.Webhooks = (function () {
const data = {
csrf_token: vars('csrf_token'),
- webhook_id: webhookId
+ webhook_id: webhookId,
};
return $.post(url, data);
@@ -90,7 +90,7 @@ App.Http.Webhooks = (function () {
*
* @return {Object}
*/
- function search(keyword, limit = null, offset = null, orderBy = null) {
+ function search(keyword, limit = null, offset = null, orderBy = null) {
const url = App.Utils.Url.siteUrl('webhooks/search');
const data = {
@@ -98,7 +98,7 @@ App.Http.Webhooks = (function () {
keyword,
limit,
offset,
- order_by: orderBy
+ order_by: orderBy,
};
return $.post(url, data);
@@ -116,7 +116,7 @@ App.Http.Webhooks = (function () {
const data = {
csrf_token: vars('csrf_token'),
- webhook_id: webhookId
+ webhook_id: webhookId,
};
return $.post(url, data);
@@ -128,6 +128,6 @@ App.Http.Webhooks = (function () {
update,
destroy,
search,
- find
+ find,
};
})();
diff --git a/assets/js/layouts/backend_layout.js b/assets/js/layouts/backend_layout.js
index 799b2391..a24ada34 100644
--- a/assets/js/layouts/backend_layout.js
+++ b/assets/js/layouts/backend_layout.js
@@ -115,6 +115,6 @@ window.App.Layouts.Backend = (function () {
PRIV_USERS,
PRIV_SYSTEM_SETTINGS,
PRIV_USER_SETTINGS,
- displayNotification
+ displayNotification,
};
})();
diff --git a/assets/js/pages/account.js b/assets/js/pages/account.js
index 7e7723bc..e6e72ba8 100644
--- a/assets/js/pages/account.js
+++ b/assets/js/pages/account.js
@@ -140,8 +140,8 @@ App.Pages.Account = (function () {
username: $username.val(),
password: $password.val() || undefined,
calendar_view: $calendarView.val(),
- notifications: Number(notifications.prop('checked'))
- }
+ notifications: Number(notifications.prop('checked')),
+ },
};
}
diff --git a/assets/js/pages/admins.js b/assets/js/pages/admins.js
index c1767769..f9b63b25 100644
--- a/assets/js/pages/admins.js
+++ b/assets/js/pages/admins.js
@@ -155,15 +155,15 @@ App.Pages.Admins = (function () {
text: lang('cancel'),
click: (event, messageModal) => {
messageModal.dispose();
- }
+ },
},
{
text: lang('delete'),
click: (event, messageModal) => {
remove(adminId);
messageModal.dispose();
- }
- }
+ },
+ },
];
App.Utils.Message.show(lang('delete_admin'), lang('delete_record_prompt'), buttons);
@@ -189,8 +189,8 @@ App.Pages.Admins = (function () {
settings: {
username: $username.val(),
notifications: Number($notifications.prop('checked')),
- calendar_view: $calendarView.val()
- }
+ calendar_view: $calendarView.val(),
+ },
};
// Include password if changed.
@@ -392,8 +392,8 @@ App.Pages.Admins = (function () {
if (!response.length) {
$filterAdmins.find('.results').append(
$('', {
- 'text': lang('no_records_found')
- })
+ 'text': lang('no_records_found'),
+ }),
);
} else if (response.length === filterLimit) {
$('', {
@@ -403,7 +403,7 @@ App.Pages.Admins = (function () {
'click': () => {
filterLimit += 20;
filter(keyword, selectId, show);
- }
+ },
}).appendTo('#filter-admins .results');
}
@@ -434,15 +434,15 @@ App.Pages.Admins = (function () {
'data-id': admin.id,
'html': [
$('', {
- 'text': name
+ 'text': name,
}),
$('
'),
$('', {
'class': 'text-muted',
- 'text': info
+ 'text': info,
}),
- $('
')
- ]
+ $('
'),
+ ],
});
}
@@ -485,6 +485,6 @@ App.Pages.Admins = (function () {
remove,
getFilterHtml,
resetForm,
- select
+ select,
};
})();
diff --git a/assets/js/pages/api_settings.js b/assets/js/pages/api_settings.js
index 4dc5a725..b2c464d7 100644
--- a/assets/js/pages/api_settings.js
+++ b/assets/js/pages/api_settings.js
@@ -68,7 +68,7 @@ App.Pages.ApiSettings = (function () {
apiSettings.push({
name: $field.data('field'),
- value: $field.is(':checkbox') ? Number($field.prop('checked')) : $field.val()
+ value: $field.is(':checkbox') ? Number($field.prop('checked')) : $field.val(),
});
});
diff --git a/assets/js/pages/blocked_periods.js b/assets/js/pages/blocked_periods.js
index 16d465b4..9fc57e3e 100644
--- a/assets/js/pages/blocked_periods.js
+++ b/assets/js/pages/blocked_periods.js
@@ -59,7 +59,9 @@ App.Pages.BlockedPeriods = (function () {
const blockedPeriodId = $(event.currentTarget).attr('data-id');
- const blockedPeriod = filterResults.find((filterResult) => Number(filterResult.id) === Number(blockedPeriodId));
+ const blockedPeriod = filterResults.find(
+ (filterResult) => Number(filterResult.id) === Number(blockedPeriodId),
+ );
display(blockedPeriod);
$('#filter-blocked-periods .selected').removeClass('selected');
@@ -103,15 +105,15 @@ App.Pages.BlockedPeriods = (function () {
text: lang('cancel'),
click: (event, messageModal) => {
messageModal.dispose();
- }
+ },
},
{
text: lang('delete'),
click: (event, messageModal) => {
remove(blockedPeriodId);
messageModal.dispose();
- }
- }
+ },
+ },
];
App.Utils.Message.show(lang('delete_blocked_period'), lang('delete_record_prompt'), buttons);
@@ -130,7 +132,7 @@ App.Pages.BlockedPeriods = (function () {
name: $name.val(),
start_datetime: startDateTimeMoment.format('YYYY-MM-DD HH:mm:ss'),
end_datetime: endDateTimeMoment.format('YYYY-MM-DD HH:mm:ss'),
- notes: $notes.val()
+ notes: $notes.val(),
};
if ($id.val() !== '') {
@@ -177,8 +179,8 @@ App.Pages.BlockedPeriods = (function () {
if (response.length === 0) {
$('#filter-blocked-periods .results').append(
$('', {
- 'text': lang('no_records_found')
- })
+ 'text': lang('no_records_found'),
+ }),
);
} else if (response.length === filterLimit) {
$('', {
@@ -188,7 +190,7 @@ App.Pages.BlockedPeriods = (function () {
'click': () => {
filterLimit += 20;
filter(keyword, selectId, show);
- }
+ },
}).appendTo('#filter-blocked-periods .results');
}
@@ -308,10 +310,10 @@ App.Pages.BlockedPeriods = (function () {
'data-id': blockedPeriod.id,
'html': [
$('', {
- 'text': blockedPeriod.name
+ 'text': blockedPeriod.name,
}),
- $('
')
- ]
+ $('
'),
+ ],
});
}
@@ -356,6 +358,6 @@ App.Pages.BlockedPeriods = (function () {
remove,
getFilterHtml,
resetForm,
- select
+ select,
};
})();
diff --git a/assets/js/pages/booking.js b/assets/js/pages/booking.js
index aa6ceced..255bb8e0 100644
--- a/assets/js/pages/booking.js
+++ b/assets/js/pages/booking.js
@@ -53,17 +53,17 @@ App.Pages.Booking = (function () {
palette: {
popup: {
background: '#ffffffbd',
- text: '#666666'
+ text: '#666666',
},
button: {
background: '#429a82',
- text: '#ffffff'
- }
+ text: '#ffffff',
+ },
},
content: {
message: lang('website_using_cookies_to_ensure_best_experience'),
- dismiss: 'OK'
- }
+ dismiss: 'OK',
+ },
});
$cookieNoticeLink.replaceWith(
@@ -72,8 +72,8 @@ App.Pages.Booking = (function () {
'data-target': '#cookie-notice-modal',
'href': '#',
'class': 'cc-link',
- 'text': $cookieNoticeLink.text()
- })
+ 'text': $cookieNoticeLink.text(),
+ }),
);
}
@@ -93,24 +93,34 @@ App.Pages.Booking = (function () {
onMonthChange: (selectedDates, dateStr, instance) => {
setTimeout(() => {
- const displayedMonthMoment = moment(instance.currentYearElement.value + '-' + String(Number(instance.monthsDropdownContainer.value) + 1).padStart(2, '0') + '-01');
+ const displayedMonthMoment = moment(
+ instance.currentYearElement.value +
+ '-' +
+ String(Number(instance.monthsDropdownContainer.value) + 1).padStart(2, '0') +
+ '-01',
+ );
App.Http.Booking.getUnavailableDates(
$selectProvider.val(),
$selectService.val(),
- displayedMonthMoment.format('YYYY-MM-DD')
+ displayedMonthMoment.format('YYYY-MM-DD'),
);
}, 500);
},
onYearChange: (selectedDates, dateStr, instance) => {
setTimeout(() => {
- const displayedMonthMoment = moment(instance.currentYearElement.value + '-' + (Number(instance.monthsDropdownContainer.value) + 1) + '-01');
+ const displayedMonthMoment = moment(
+ instance.currentYearElement.value +
+ '-' +
+ (Number(instance.monthsDropdownContainer.value) + 1) +
+ '-01',
+ );
App.Http.Booking.getUnavailableDates(
$selectProvider.val(),
$selectService.val(),
- displayedMonthMoment.format('YYYY-MM-DD')
+ displayedMonthMoment.format('YYYY-MM-DD'),
);
}, 500);
},
@@ -130,10 +140,12 @@ App.Pages.Booking = (function () {
// If the manage mode is true, the appointment data should be loaded by default.
if (manageMode) {
applyAppointmentData(vars('appointment_data'), vars('provider_data'), vars('customer_data'));
- $('#wizard-frame-1').css({
- 'visibility': 'visible',
- 'display': 'none'
- }).fadeIn();
+ $('#wizard-frame-1')
+ .css({
+ 'visibility': 'visible',
+ 'display': 'none',
+ })
+ .fadeIn();
} else {
// Check if a specific service was selected (via URL parameter).
const selectedServiceId = App.Utils.Url.queryParam('service');
@@ -182,13 +194,15 @@ App.Pages.Booking = (function () {
.each((index, bookStepEl) =>
$(bookStepEl)
.find('strong')
- .text(index + 1)
+ .text(index + 1),
);
} else {
- $('#wizard-frame-1').css({
- 'visibility': 'visible',
- 'display': 'none'
- }).fadeIn();
+ $('#wizard-frame-1')
+ .css({
+ 'visibility': 'visible',
+ 'display': 'none',
+ })
+ .fadeIn();
}
prefillFromQueryParam('#first-name', 'first_name');
@@ -215,7 +229,7 @@ App.Pages.Booking = (function () {
* Remove empty columns and center elements if needed.
*/
function optimizeContactInfoDisplay() {
- // If a column has only one control shown then move the control to the other column.
+ // If a column has only one control shown then move the control to the other column.
const $firstCol = $('#wizard-frame-3 .field-col:first');
const $firstColControls = $firstCol.find('.form-control');
@@ -234,7 +248,7 @@ App.Pages.Booking = (function () {
});
}
- // Hide columns that do not have any controls displayed.
+ // Hide columns that do not have any controls displayed.
const $fieldCols = $(document).find('#wizard-frame-3 .field-col');
@@ -277,7 +291,7 @@ App.Pages.Booking = (function () {
App.Http.Booking.getUnavailableDates(
$target.val(),
$selectService.val(),
- moment($selectDate[0]._flatpickr.selectedDates[0]).format('YYYY-MM-DD')
+ moment($selectDate[0]._flatpickr.selectedDates[0]).format('YYYY-MM-DD'),
);
updateConfirmFrame();
});
@@ -313,7 +327,7 @@ App.Pages.Booking = (function () {
App.Http.Booking.getUnavailableDates(
$selectProvider.val(),
$target.val(),
- moment($selectDate[0]._flatpickr.selectedDates[0]).format('YYYY-MM-DD')
+ moment($selectDate[0]._flatpickr.selectedDates[0]).format('YYYY-MM-DD'),
);
updateConfirmFrame();
@@ -342,7 +356,7 @@ App.Pages.Booking = (function () {
$('', {
'id': 'select-hour-prompt',
'class': 'text-danger mb-4',
- 'text': lang('appointment_hour_missing')
+ 'text': lang('appointment_hour_missing'),
}).prependTo('#available-hours');
}
return;
@@ -422,7 +436,7 @@ App.Pages.Booking = (function () {
text: lang('close'),
click: (event, messageModal) => {
messageModal.dispose();
- }
+ },
},
{
text: lang('confirm'),
@@ -433,14 +447,14 @@ App.Pages.Booking = (function () {
}
$cancelAppointmentForm.find('#hidden-cancellation-reason').val($cancellationReason.val());
$cancelAppointmentForm.submit();
- }
- }
+ },
+ },
];
App.Utils.Message.show(
lang('cancel_appointment_title'),
lang('write_appointment_removal_reason'),
- buttons
+ buttons,
);
$cancellationReason = $('', {
@@ -448,8 +462,8 @@ App.Pages.Booking = (function () {
'id': 'cancellation-reason',
'rows': '3',
'css': {
- 'width': '100%'
- }
+ 'width': '100%',
+ },
}).appendTo('#message-modal .modal-body');
return false;
@@ -461,20 +475,20 @@ App.Pages.Booking = (function () {
text: lang('cancel'),
click: (event, messageModal) => {
messageModal.dispose();
- }
+ },
},
{
text: lang('delete'),
click: () => {
App.Http.Booking.deletePersonalInformation(vars('customer_token'));
- }
- }
+ },
+ },
];
App.Utils.Message.show(
lang('delete_personal_information'),
lang('delete_personal_information_prompt'),
- buttons
+ buttons,
);
});
}
@@ -610,16 +624,16 @@ App.Pages.Booking = (function () {
$('', {
'html': [
$('', {
- 'text': lang('appointment')
+ 'text': lang('appointment'),
}),
$('', {
'html': [
$('', {
- 'text': lang('service') + ': ' + $selectService.find('option:selected').text()
+ 'text': lang('service') + ': ' + $selectService.find('option:selected').text(),
}),
$('
'),
$('', {
- 'text': lang('provider') + ': ' + $selectProvider.find('option:selected').text()
+ 'text': lang('provider') + ': ' + $selectProvider.find('option:selected').text(),
}),
$('
'),
$('', {
@@ -628,22 +642,22 @@ App.Pages.Booking = (function () {
': ' +
selectedDate +
' ' +
- $availableHours.find('.selected-hour').text()
+ $availableHours.find('.selected-hour').text(),
}),
$('
'),
$('', {
- 'text': lang('timezone') + ': ' + $selectTimezone.find('option:selected').text()
+ 'text': lang('timezone') + ': ' + $selectTimezone.find('option:selected').text(),
}),
$('
'),
$('', {
'text': lang('price') + ': ' + servicePrice + ' ' + serviceCurrency,
'prop': {
- 'hidden': !servicePrice
- }
- })
- ]
- })
- ]
+ 'hidden': !servicePrice,
+ },
+ }),
+ ],
+ }),
+ ],
}).appendTo('#appointment-details');
// Customer Details
@@ -661,37 +675,49 @@ App.Pages.Booking = (function () {
$('', {
'html': [
$(')', {
- 'text': lang('customer')
+ 'text': lang('customer'),
}),
$('', {
'html': [
- fullName ? $('', {
- 'text': lang('customer') + ': ' + fullName
- }) : null,
+ fullName
+ ? $('', {
+ 'text': lang('customer') + ': ' + fullName,
+ })
+ : null,
fullName ? $('
') : null,
- phoneNumber ? $('', {
- 'text': lang('phone_number') + ': ' + phoneNumber
- }) : null,
+ phoneNumber
+ ? $('', {
+ 'text': lang('phone_number') + ': ' + phoneNumber,
+ })
+ : null,
phoneNumber ? $('
') : null,
- email ? $('', {
- 'text': lang('email') + ': ' + email
- }) : null,
+ email
+ ? $('', {
+ 'text': lang('email') + ': ' + email,
+ })
+ : null,
email ? $('
') : null,
- address ? $('', {
- 'text': lang('address') + ': ' + address
- }) : null,
+ address
+ ? $('', {
+ 'text': lang('address') + ': ' + address,
+ })
+ : null,
address ? $('
') : null,
- city ? $('', {
- 'text': lang('city') + ': ' + city,
- }) : null,
+ city
+ ? $('', {
+ 'text': lang('city') + ': ' + city,
+ })
+ : null,
city ? $('
') : null,
- zipCode ? $('', {
- 'text': lang('zip_code') + ': ' + zipCode
- }) : null,
- zipCode ? $('
') : null
- ]
- })
- ]
+ zipCode
+ ? $('', {
+ 'text': lang('zip_code') + ': ' + zipCode,
+ })
+ : null,
+ zipCode ? $('
') : null,
+ ],
+ }),
+ ],
}).appendTo('#customer-details');
// Update appointment form data for submission to server when the user confirms the appointment.
@@ -705,7 +731,7 @@ App.Pages.Booking = (function () {
address: $address.val(),
city: $city.val(),
zip_code: $zipCode.val(),
- timezone: $selectTimezone.val()
+ timezone: $selectTimezone.val(),
};
data.appointment = {
@@ -718,7 +744,7 @@ App.Pages.Booking = (function () {
notes: $notes.val(),
is_unavailability: false,
id_users_provider: $selectProvider.val(),
- id_services: $selectService.val()
+ id_services: $selectService.val(),
};
data.manage_mode = Number(manageMode);
@@ -742,7 +768,7 @@ App.Pages.Booking = (function () {
const serviceId = $selectService.val();
const service = vars('available_services').find(
- (availableService) => Number(availableService.id) === Number(serviceId)
+ (availableService) => Number(availableService.id) === Number(serviceId),
);
// Add the duration to the start datetime.
@@ -819,7 +845,7 @@ App.Pages.Booking = (function () {
$serviceDescription.empty();
const service = vars('available_services').find(
- (availableService) => Number(availableService.id) === Number(serviceId)
+ (availableService) => Number(availableService.id) === Number(serviceId),
);
if (!service) {
@@ -834,7 +860,7 @@ App.Pages.Booking = (function () {
$('
').appendTo($serviceDescription);
$('', {
- 'html': App.Utils.String.escapeHtml(service.description).replaceAll('\n', '
')
+ 'html': App.Utils.String.escapeHtml(service.description).replaceAll('\n', '
'),
}).appendTo($serviceDescription);
}
@@ -844,19 +870,19 @@ App.Pages.Booking = (function () {
if (service.duration) {
$('', {
- 'text': '[' + lang('duration') + ' ' + service.duration + ' ' + lang('minutes') + ']'
+ 'text': '[' + lang('duration') + ' ' + service.duration + ' ' + lang('minutes') + ']',
}).appendTo($serviceDescription);
}
if (Number(service.price) > 0) {
$('', {
- 'text': '[' + lang('price') + ' ' + service.price + ' ' + service.currency + ']'
+ 'text': '[' + lang('price') + ' ' + service.price + ' ' + service.currency + ']',
}).appendTo($serviceDescription);
}
if (service.location) {
$('', {
- 'text': '[' + lang('location') + ' ' + service.location + ']'
+ 'text': '[' + lang('location') + ' ' + service.location + ']',
}).appendTo($serviceDescription);
}
}
@@ -866,6 +892,6 @@ App.Pages.Booking = (function () {
return {
manageMode,
initialize,
- updateConfirmFrame
+ updateConfirmFrame,
};
})();
diff --git a/assets/js/pages/booking_settings.js b/assets/js/pages/booking_settings.js
index 406fe85d..63662fcd 100644
--- a/assets/js/pages/booking_settings.js
+++ b/assets/js/pages/booking_settings.js
@@ -94,13 +94,13 @@ App.Pages.BookingSettings = (function () {
bookingSettings.push({
name: $field.data('field'),
- value: $field.is(':checkbox') ? Number($field.prop('checked')) : $field.val()
+ value: $field.is(':checkbox') ? Number($field.prop('checked')) : $field.val(),
});
});
bookingSettings.push({
name: 'disable_booking_message',
- value: $disableBookingMessage.trumbowyg('html')
+ value: $disableBookingMessage.trumbowyg('html'),
});
return bookingSettings;
diff --git a/assets/js/pages/business_settings.js b/assets/js/pages/business_settings.js
index 1c5fdb15..f68b3d1e 100644
--- a/assets/js/pages/business_settings.js
+++ b/assets/js/pages/business_settings.js
@@ -71,7 +71,7 @@ App.Pages.BusinessSettings = (function () {
businessSettings.push({
name: $field.data('field'),
- value: $field.is(':checkbox') ? Number($field.prop('checked')) : $field.val()
+ value: $field.is(':checkbox') ? Number($field.prop('checked')) : $field.val(),
});
});
@@ -79,14 +79,14 @@ App.Pages.BusinessSettings = (function () {
businessSettings.push({
name: 'company_working_plan',
- value: JSON.stringify(workingPlan)
+ value: JSON.stringify(workingPlan),
});
const appointmentStatusOptions = App.Components.AppointmentStatusOptions.getOptions($appointmentStatusOptions);
businessSettings.push({
name: 'appointment_status_options',
- value: JSON.stringify(appointmentStatusOptions)
+ value: JSON.stringify(appointmentStatusOptions),
});
return businessSettings;
@@ -118,7 +118,7 @@ App.Pages.BusinessSettings = (function () {
text: lang('cancel'),
click: (event, messageModal) => {
messageModal.dispose();
- }
+ },
},
{
text: 'OK',
@@ -132,8 +132,8 @@ App.Pages.BusinessSettings = (function () {
.always(() => {
messageModal.dispose();
});
- }
- }
+ },
+ },
];
App.Utils.Message.show(lang('working_plan'), lang('overwrite_existing_working_plans'), buttons);
diff --git a/assets/js/pages/calendar.js b/assets/js/pages/calendar.js
index 70c0662b..b6eaa85f 100755
--- a/assets/js/pages/calendar.js
+++ b/assets/js/pages/calendar.js
@@ -26,7 +26,8 @@ App.Pages.Calendar = (function () {
$calendarPage.on('click', '#toggle-fullscreen', (event) => {
const $toggleFullscreen = $(event.target);
const element = document.documentElement;
- const isFullScreen = document.fullScreenElement || document.mozFullScreen || document.webkitIsFullScreen || false;
+ const isFullScreen =
+ document.fullScreenElement || document.mozFullScreen || document.webkitIsFullScreen || false;
if (isFullScreen) {
// Exit fullscreen mode.
@@ -97,7 +98,7 @@ App.Pages.Calendar = (function () {
workingPlanException,
providerId,
successCallback,
- null
+ null,
);
});
});
@@ -122,7 +123,9 @@ App.Pages.Calendar = (function () {
if (durationInMinutes <= minDurationInMinutes) {
const serviceId = $('#select-service').val();
- const service = vars('available_services').find(availableService => Number(availableService.id) === Number(serviceId));
+ const service = vars('available_services').find(
+ (availableService) => Number(availableService.id) === Number(serviceId),
+ );
if (service) {
endMoment.add(service.duration - durationInMinutes, 'minutes');
@@ -154,6 +157,6 @@ App.Pages.Calendar = (function () {
return {
initialize,
- getSelectionEndDate
+ getSelectionEndDate,
};
})();
diff --git a/assets/js/pages/customers.js b/assets/js/pages/customers.js
index e8935095..fd286d2c 100644
--- a/assets/js/pages/customers.js
+++ b/assets/js/pages/customers.js
@@ -135,7 +135,7 @@ App.Pages.Customers = (function () {
custom_field_2: $customField2.val(),
custom_field_3: $customField3.val(),
custom_field_4: $customField4.val(),
- custom_field_5: $customField5.val()
+ custom_field_5: $customField5.val(),
};
if ($id.val()) {
@@ -159,15 +159,15 @@ App.Pages.Customers = (function () {
text: lang('cancel'),
click: (event, messageModal) => {
messageModal.dispose();
- }
+ },
},
{
text: lang('delete'),
click: (event, messageModal) => {
remove(customerId);
messageModal.dispose();
- }
- }
+ },
+ },
];
App.Utils.Message.show(lang('delete_customer'), lang('delete_record_prompt'), buttons);
@@ -297,7 +297,7 @@ App.Pages.Customers = (function () {
if (!customer.appointments.length) {
$('', {
- 'text': lang('no_records_found')
+ 'text': lang('no_records_found'),
}).appendTo($customerAppointments);
}
@@ -320,14 +320,14 @@ App.Pages.Customers = (function () {
moment(appointment.start_datetime).toDate(),
vars('date_format'),
vars('time_format'),
- true
+ true,
);
const end = App.Utils.Date.format(
moment(appointment.end_datetime).toDate(),
vars('date_format'),
vars('time_format'),
- true
+ true,
);
$('', {
@@ -340,7 +340,7 @@ App.Pages.Customers = (function () {
'href': App.Utils.Url.siteUrl(`calendar/reschedule/${appointment.hash}`),
'html': [
$('', {
- 'class': 'fas fa-edit me-1'
+ 'class': 'fas fa-edit me-1',
}),
$('', {
'text':
@@ -348,32 +348,32 @@ App.Pages.Customers = (function () {
' - ' +
appointment.provider.first_name +
' ' +
- appointment.provider.last_name
+ appointment.provider.last_name,
}),
- $('
')
- ]
+ $('
'),
+ ],
}),
// Start
$('', {
- 'text': start
+ 'text': start,
}),
$('
'),
// End
$('', {
- 'text': end
+ 'text': end,
}),
$('
'),
// Timezone
$('', {
- 'text': vars('timezones')[appointment.provider.timezone]
- })
- ]
+ 'text': vars('timezones')[appointment.provider.timezone],
+ }),
+ ],
}).appendTo('#customer-appointments');
});
}
@@ -399,8 +399,8 @@ App.Pages.Customers = (function () {
if (!response.length) {
$filterCustomers.find('.results').append(
$('', {
- 'text': lang('no_records_found')
- })
+ 'text': lang('no_records_found'),
+ }),
);
} else if (response.length === filterLimit) {
$('', {
@@ -410,7 +410,7 @@ App.Pages.Customers = (function () {
'click': () => {
filterLimit += 20;
filter(keyword, selectId, show);
- }
+ },
}).appendTo('#filter-customers .results');
}
@@ -439,15 +439,15 @@ App.Pages.Customers = (function () {
'data-id': customer.id,
'html': [
$('', {
- 'text': name
+ 'text': name,
}),
$('
'),
$('', {
'class': 'text-muted',
- 'text': info
+ 'text': info,
}),
- $('
')
- ]
+ $('
'),
+ ],
});
}
@@ -490,6 +490,6 @@ App.Pages.Customers = (function () {
remove,
getFilterHtml,
resetForm,
- select
+ select,
};
})();
diff --git a/assets/js/pages/general_settings.js b/assets/js/pages/general_settings.js
index 209656f2..e0e7bbca 100644
--- a/assets/js/pages/general_settings.js
+++ b/assets/js/pages/general_settings.js
@@ -86,13 +86,13 @@ App.Pages.GeneralSettings = (function () {
generalSettings.push({
name: $field.data('field'),
- value: $field.is(':checkbox') ? Number($field.prop('checked')) : $field.val()
+ value: $field.is(':checkbox') ? Number($field.prop('checked')) : $field.val(),
});
});
generalSettings.push({
name: 'company_logo',
- value: companyLogoBase64
+ value: companyLogoBase64,
});
return generalSettings;
diff --git a/assets/js/pages/google_analytics_settings.js b/assets/js/pages/google_analytics_settings.js
index dcc6a393..c44d3bf0 100644
--- a/assets/js/pages/google_analytics_settings.js
+++ b/assets/js/pages/google_analytics_settings.js
@@ -68,7 +68,7 @@ App.Pages.GoogleAnalyticsSettings = (function () {
googleAnalyticsSettings.push({
name: $field.data('field'),
- value: $field.is(':checkbox') ? Number($field.prop('checked')) : $field.val()
+ value: $field.is(':checkbox') ? Number($field.prop('checked')) : $field.val(),
});
});
diff --git a/assets/js/pages/installation.js b/assets/js/pages/installation.js
index 2266002c..34708551 100644
--- a/assets/js/pages/installation.js
+++ b/assets/js/pages/installation.js
@@ -51,14 +51,14 @@ App.Pages.Installation = (function () {
const data = {
csrf_token: vars('csrf_token'),
admin: getAdminData(),
- company: getCompanyData()
+ company: getCompanyData(),
};
$.ajax({
url: url,
type: 'POST',
data: data,
- dataType: 'json'
+ dataType: 'json',
}).done(() => {
$alert
.text('Easy!Appointments has been successfully installed!')
@@ -144,7 +144,7 @@ App.Pages.Installation = (function () {
email: $email.val(),
phone_number: $phoneNumber.val(),
username: $username.val(),
- password: $password.val()
+ password: $password.val(),
};
}
@@ -157,7 +157,7 @@ App.Pages.Installation = (function () {
return {
company_name: $companyName.val(),
company_email: $companyEmail.val(),
- company_link: $companyLink.val()
+ company_link: $companyLink.val(),
};
}
@@ -165,7 +165,7 @@ App.Pages.Installation = (function () {
if (vars('base_url').slice(-1) === '/') {
App.Utils.Message.show(
'Invalid Configuration Detected',
- 'Please remove any trailing slashes from your "BASE_URL" setting of the root "config.php" file and try again.'
+ 'Please remove any trailing slashes from your "BASE_URL" setting of the root "config.php" file and try again.',
);
$install.prop('disabled', true).fadeTo('0.4');
}
diff --git a/assets/js/pages/legal_settings.js b/assets/js/pages/legal_settings.js
index 027708ae..4add054e 100644
--- a/assets/js/pages/legal_settings.js
+++ b/assets/js/pages/legal_settings.js
@@ -89,32 +89,32 @@ App.Pages.LegalSettings = (function () {
legalSettings.push({
name: 'display_cookie_notice',
- value: $displayCookieNotice.prop('checked') ? '1' : '0'
+ value: $displayCookieNotice.prop('checked') ? '1' : '0',
});
legalSettings.push({
name: 'cookie_notice_content',
- value: $cookieNoticeContent.trumbowyg('html')
+ value: $cookieNoticeContent.trumbowyg('html'),
});
legalSettings.push({
name: 'display_terms_and_conditions',
- value: $displayTermsAndConditions.prop('checked') ? '1' : '0'
+ value: $displayTermsAndConditions.prop('checked') ? '1' : '0',
});
legalSettings.push({
name: 'terms_and_conditions_content',
- value: $termsAndConditionsContent.trumbowyg('html')
+ value: $termsAndConditionsContent.trumbowyg('html'),
});
legalSettings.push({
name: 'display_privacy_policy',
- value: $displayPrivacyPolicy.prop('checked') ? '1' : '0'
+ value: $displayPrivacyPolicy.prop('checked') ? '1' : '0',
});
legalSettings.push({
name: 'privacy_policy_content',
- value: $privacyPolicyContent.trumbowyg('html')
+ value: $privacyPolicyContent.trumbowyg('html'),
});
return legalSettings;
@@ -141,9 +141,9 @@ App.Pages.LegalSettings = (function () {
* Initialize the module.
*/
function initialize() {
- App.Utils.UI.initializeTextEditor($cookieNoticeContent);
- App.Utils.UI.initializeTextEditor($termsAndConditionsContent);
- App.Utils.UI.initializeTextEditor($privacyPolicyContent);
+ App.Utils.UI.initializeTextEditor($cookieNoticeContent);
+ App.Utils.UI.initializeTextEditor($termsAndConditionsContent);
+ App.Utils.UI.initializeTextEditor($privacyPolicyContent);
const legalSettings = vars('legal_settings');
diff --git a/assets/js/pages/matomo_analytics_settings.js b/assets/js/pages/matomo_analytics_settings.js
index 50211516..9e939c50 100644
--- a/assets/js/pages/matomo_analytics_settings.js
+++ b/assets/js/pages/matomo_analytics_settings.js
@@ -68,7 +68,7 @@ App.Pages.MatomoAnalyticsSettings = (function () {
matomoAnalyticsSettings.push({
name: $field.data('field'),
- value: $field.is(':checkbox') ? Number($field.prop('checked')) : $field.val()
+ value: $field.is(':checkbox') ? Number($field.prop('checked')) : $field.val(),
});
});
diff --git a/assets/js/pages/providers.js b/assets/js/pages/providers.js
index fb48b222..6d284e17 100755
--- a/assets/js/pages/providers.js
+++ b/assets/js/pages/providers.js
@@ -93,7 +93,7 @@ App.Pages.Providers = (function () {
$('#password, #password-confirm').addClass('required');
$providers
.find(
- '.add-break, .edit-break, .delete-break, .add-working-plan-exception, .edit-working-plan-exception, .delete-working-plan-exception, #reset-working-plan'
+ '.add-break, .edit-break, .delete-break, .add-working-plan-exception, .edit-working-plan-exception, .delete-working-plan-exception, #reset-working-plan',
)
.prop('disabled', false);
$('#provider-services input:checkbox').prop('disabled', false);
@@ -118,7 +118,7 @@ App.Pages.Providers = (function () {
$('#provider-services input:checkbox').prop('disabled', false);
$providers
.find(
- '.add-break, .edit-break, .delete-break, .add-working-plan-exception, .edit-working-plan-exception, .delete-working-plan-exception, #reset-working-plan'
+ '.add-break, .edit-break, .delete-break, .add-working-plan-exception, .edit-working-plan-exception, .delete-working-plan-exception, #reset-working-plan',
)
.prop('disabled', false);
$('#providers input:checkbox').prop('disabled', false);
@@ -136,15 +136,15 @@ App.Pages.Providers = (function () {
text: lang('cancel'),
click: (event, messageModal) => {
messageModal.dispose();
- }
+ },
},
{
text: lang('delete'),
click: (event, messageModal) => {
remove(providerId);
messageModal.dispose();
- }
- }
+ },
+ },
];
App.Utils.Message.show(lang('delete_provider'), lang('delete_record_prompt'), buttons);
@@ -173,8 +173,8 @@ App.Pages.Providers = (function () {
working_plan: JSON.stringify(workingPlanManager.get()),
working_plan_exceptions: JSON.stringify(workingPlanManager.getWorkingPlanExceptions()),
notifications: Number($notifications.prop('checked')),
- calendar_view: $calendarView.val()
- }
+ calendar_view: $calendarView.val(),
+ },
};
// Include provider services.
@@ -396,13 +396,13 @@ App.Pages.Providers = (function () {
'target': '_blank',
'html': [
$('', {
- 'class': 'fas fa-link me-2'
+ 'class': 'fas fa-link me-2',
}),
$('', {
- 'text': lang('booking_link')
- })
- ]
+ 'text': lang('booking_link'),
+ }),
+ ],
});
$providers.find('.details-view h4').find('a').remove().end().append($link);
@@ -421,7 +421,7 @@ App.Pages.Providers = (function () {
// Add dedicated service-provider link.
dedicatedUrl = App.Utils.Url.siteUrl(
- '?provider=' + encodeURIComponent(provider.id) + '&service=' + encodeURIComponent(providerServiceId)
+ '?provider=' + encodeURIComponent(provider.id) + '&service=' + encodeURIComponent(providerServiceId),
);
$link = $('', {
@@ -429,13 +429,13 @@ App.Pages.Providers = (function () {
'target': '_blank',
'html': [
$('', {
- 'class': 'fas fa-link me-2'
+ 'class': 'fas fa-link me-2',
}),
$('', {
- 'text': lang('booking_link')
- })
- ]
+ 'text': lang('booking_link'),
+ }),
+ ],
});
$checkbox.parent().append($link);
@@ -474,8 +474,8 @@ App.Pages.Providers = (function () {
if (!response.length) {
$filterProviders.find('.results').append(
$('', {
- 'text': lang('no_records_found')
- })
+ 'text': lang('no_records_found'),
+ }),
);
} else if (response.length === filterLimit) {
$('', {
@@ -485,7 +485,7 @@ App.Pages.Providers = (function () {
'click': () => {
filterLimit += 20;
filter(keyword, selectId, show);
- }
+ },
}).appendTo('#filter-providers .results');
}
@@ -516,15 +516,15 @@ App.Pages.Providers = (function () {
'data-id': provider.id,
'html': [
$('', {
- 'text': name
+ 'text': name,
}),
$('
'),
$('', {
'class': 'text-muted',
- 'text': info
+ 'text': info,
}),
- $('
')
- ]
+ $('
'),
+ ],
});
}
@@ -560,8 +560,8 @@ App.Pages.Providers = (function () {
addEventListeners();
vars('services').forEach((service) => {
- const checkboxId = `provider-service-${service.id}`;
-
+ const checkboxId = `provider-service-${service.id}`;
+
$('', {
'class': 'checkbox',
'html': [
@@ -574,17 +574,17 @@ App.Pages.Providers = (function () {
'type': 'checkbox',
'data-id': service.id,
'prop': {
- 'disabled': true
- }
+ 'disabled': true,
+ },
}),
$('', {
'class': 'form-check-label',
'text': service.name,
'for': checkboxId,
- })
- ]
- })
- ]
+ }),
+ ],
+ }),
+ ],
}).appendTo('#provider-services');
});
}
@@ -597,6 +597,6 @@ App.Pages.Providers = (function () {
remove,
getFilterHtml,
resetForm,
- select
+ select,
};
})();
diff --git a/assets/js/pages/recovery.js b/assets/js/pages/recovery.js
index 84f2a8f7..d95f9bd0 100644
--- a/assets/js/pages/recovery.js
+++ b/assets/js/pages/recovery.js
@@ -50,7 +50,7 @@ App.Pages.Recovery = (function () {
$alert.addClass('alert-danger');
$alert.text(
'The operation failed! Please enter a valid username ' +
- 'and email address in order to get a new password.'
+ 'and email address in order to get a new password.',
);
}
});
diff --git a/assets/js/pages/secretaries.js b/assets/js/pages/secretaries.js
index 5db6a171..75e85a83 100644
--- a/assets/js/pages/secretaries.js
+++ b/assets/js/pages/secretaries.js
@@ -159,15 +159,15 @@ App.Pages.Secretaries = (function () {
text: lang('cancel'),
click: (event, messageModal) => {
messageModal.dispose();
- }
+ },
},
{
text: lang('delete'),
click: (event, messageModal) => {
remove(secretaryId);
messageModal.dispose();
- }
- }
+ },
+ },
];
App.Utils.Message.show(lang('delete_secretary'), lang('delete_record_prompt'), buttons);
@@ -193,8 +193,8 @@ App.Pages.Secretaries = (function () {
settings: {
username: $username.val(),
notifications: Number($notifications.prop('checked')),
- calendar_view: $calendarView.val()
- }
+ calendar_view: $calendarView.val(),
+ },
};
// Include secretary services.
@@ -296,9 +296,7 @@ App.Pages.Secretaries = (function () {
if ($password.val().length < vars('min_password_length') && $password.val() !== '') {
$('#password, #password-confirm').addClass('is-invalid');
- throw new Error(
- 'Password must be at least ' + vars('min_password_length')+ ' characters long.'
- );
+ throw new Error('Password must be at least ' + vars('min_password_length') + ' characters long.');
}
// Validate user email.
@@ -414,8 +412,8 @@ App.Pages.Secretaries = (function () {
if (!response.length) {
$('#filter-secretaries .results').append(
$('', {
- 'text': lang('no_records_found')
- })
+ 'text': lang('no_records_found'),
+ }),
);
} else if (response.length === filterLimit) {
$('', {
@@ -425,7 +423,7 @@ App.Pages.Secretaries = (function () {
'click': () => {
filterLimit += 20;
filter(keyword, selectId, show);
- }
+ },
}).appendTo('#filter-secretaries .results');
}
@@ -456,15 +454,15 @@ App.Pages.Secretaries = (function () {
'data-id': secretary.id,
'html': [
$('', {
- 'text': name
+ 'text': name,
}),
$('
'),
$('', {
'class': 'text-muted',
- 'text': info
+ 'text': info,
}),
- $('
')
- ]
+ $('
'),
+ ],
});
}
@@ -499,7 +497,7 @@ App.Pages.Secretaries = (function () {
vars('providers').forEach((provider) => {
const checkboxId = `provider-service-${provider.id}`;
-
+
$('', {
'class': 'checkbox',
'html': [
@@ -513,16 +511,16 @@ App.Pages.Secretaries = (function () {
'data-id': provider.id,
'prop': {
'disabled': true,
- }
+ },
}),
$('', {
'class': 'form-check-label',
'text': provider.first_name + ' ' + provider.last_name,
'for': checkboxId,
- })
- ]
- })
- ]
+ }),
+ ],
+ }),
+ ],
}).appendTo('#secretary-providers');
});
}
@@ -535,6 +533,6 @@ App.Pages.Secretaries = (function () {
remove,
getFilterHtml,
resetForm,
- select
+ select,
};
})();
diff --git a/assets/js/pages/service_categories.js b/assets/js/pages/service_categories.js
index 8fa5c7ec..2f8aad49 100644
--- a/assets/js/pages/service_categories.js
+++ b/assets/js/pages/service_categories.js
@@ -55,7 +55,9 @@ App.Pages.ServiceCategories = (function () {
const serviceCategoryId = $(event.currentTarget).attr('data-id');
- const serviceCategory = filterResults.find((filterResult) => Number(filterResult.id) === Number(serviceCategoryId));
+ const serviceCategory = filterResults.find(
+ (filterResult) => Number(filterResult.id) === Number(serviceCategoryId),
+ );
display(serviceCategory);
$('#filter-service-categories .selected').removeClass('selected');
@@ -99,15 +101,15 @@ App.Pages.ServiceCategories = (function () {
text: lang('cancel'),
click: (event, messageModal) => {
messageModal.dispose();
- }
+ },
},
{
text: lang('delete'),
click: (event, messageModal) => {
remove(serviceCategoryId);
messageModal.dispose();
- }
- }
+ },
+ },
];
App.Utils.Message.show(lang('delete_service_category'), lang('delete_record_prompt'), buttons);
@@ -119,7 +121,7 @@ App.Pages.ServiceCategories = (function () {
$serviceCategories.on('click', '#save-service-category', () => {
const serviceCategory = {
name: $name.val(),
- description: $description.val()
+ description: $description.val(),
};
if ($id.val() !== '') {
@@ -166,8 +168,8 @@ App.Pages.ServiceCategories = (function () {
if (response.length === 0) {
$('#filter-service-categories .results').append(
$('', {
- 'text': lang('no_records_found')
- })
+ 'text': lang('no_records_found'),
+ }),
);
} else if (response.length === filterLimit) {
$('', {
@@ -177,7 +179,7 @@ App.Pages.ServiceCategories = (function () {
'click': () => {
filterLimit += 20;
filter(keyword, selectId, show);
- }
+ },
}).appendTo('#filter-service-categories .results');
}
@@ -286,10 +288,10 @@ App.Pages.ServiceCategories = (function () {
'data-id': serviceCategory.id,
'html': [
$('', {
- 'text': serviceCategory.name
+ 'text': serviceCategory.name,
}),
- $('
')
- ]
+ $('
'),
+ ],
});
}
@@ -332,6 +334,6 @@ App.Pages.ServiceCategories = (function () {
remove,
getFilterHtml,
resetForm,
- select
+ select,
};
})();
diff --git a/assets/js/pages/services.js b/assets/js/pages/services.js
index 3d4cd534..f4e85567 100644
--- a/assets/js/pages/services.js
+++ b/assets/js/pages/services.js
@@ -72,13 +72,13 @@ App.Pages.Services = (function () {
'target': '_blank',
'html': [
$('', {
- 'class': 'fas fa-link me-2'
+ 'class': 'fas fa-link me-2',
}),
$('', {
- 'text': lang('booking_link')
- })
- ]
+ 'text': lang('booking_link'),
+ }),
+ ],
});
$services.find('.record-details h4').find('a').remove().end().append($link);
@@ -142,7 +142,7 @@ App.Pages.Services = (function () {
availabilities_type: $availabilitiesType.val(),
attendants_number: $attendantsNumber.val(),
is_private: Number($isPrivate.prop('checked')),
- id_service_categories: $serviceCategoryId.val() || undefined
+ id_service_categories: $serviceCategoryId.val() || undefined,
};
if ($id.val() !== '') {
@@ -179,15 +179,15 @@ App.Pages.Services = (function () {
text: lang('cancel'),
click: (event, messageModal) => {
messageModal.dispose();
- }
+ },
},
{
text: lang('delete'),
click: (event, messageModal) => {
remove(serviceId);
messageModal.dispose();
- }
- }
+ },
+ },
];
App.Utils.Message.show(lang('delete_service'), lang('delete_record_prompt'), buttons);
@@ -325,8 +325,8 @@ App.Pages.Services = (function () {
if (response.length === 0) {
$filterServices.find('.results').append(
$('', {
- 'text': lang('no_records_found')
- })
+ 'text': lang('no_records_found'),
+ }),
);
} else if (response.length === filterLimit) {
$('', {
@@ -336,7 +336,7 @@ App.Pages.Services = (function () {
'click': () => {
filterLimit += 20;
filter(keyword, selectId, show);
- }
+ },
}).appendTo('#filter-services .results');
}
@@ -365,15 +365,15 @@ App.Pages.Services = (function () {
'data-id': service.id,
'html': [
$('', {
- 'text': name
+ 'text': name,
}),
$('
'),
$('', {
'class': 'text-muted',
- 'text': info
+ 'text': info,
}),
- $('
')
- ]
+ $('
'),
+ ],
});
}
@@ -433,6 +433,6 @@ App.Pages.Services = (function () {
remove,
getFilterHtml,
resetForm,
- select
+ select,
};
})();
diff --git a/assets/js/pages/webhooks.js b/assets/js/pages/webhooks.js
index e58f151f..8805ade4 100644
--- a/assets/js/pages/webhooks.js
+++ b/assets/js/pages/webhooks.js
@@ -149,15 +149,15 @@ App.Pages.Webhooks = (function () {
text: lang('cancel'),
click: (event, messageModal) => {
messageModal.dispose();
- }
+ },
},
{
text: lang('delete'),
click: (event, messageModal) => {
remove(webhookId);
messageModal.dispose();
- }
- }
+ },
+ },
];
App.Utils.Message.show(lang('delete_webhook'), lang('delete_record_prompt'), buttons);
@@ -286,8 +286,8 @@ App.Pages.Webhooks = (function () {
if (response.length === 0) {
$filterWebhooks.find('.results').append(
$('', {
- 'text': lang('no_records_found')
- })
+ 'text': lang('no_records_found'),
+ }),
);
} else if (response.length === filterLimit) {
$('', {
@@ -297,7 +297,7 @@ App.Pages.Webhooks = (function () {
'click': () => {
filterLimit += 20;
filter(keyword, selectId, show);
- }
+ },
}).appendTo('#filter-webhooks .results');
}
@@ -328,15 +328,15 @@ App.Pages.Webhooks = (function () {
'data-id': webhook.id,
'html': [
$('', {
- 'text': name
+ 'text': name,
}),
$('
'),
$('', {
'class': 'text-muted',
- 'text': info
+ 'text': info,
}),
- $('
')
- ]
+ $('
'),
+ ],
});
}
@@ -378,6 +378,6 @@ App.Pages.Webhooks = (function () {
remove,
getFilterHtml,
resetForm,
- select
+ select,
};
})();
diff --git a/assets/js/utils/calendar_default_view.js b/assets/js/utils/calendar_default_view.js
index c389a715..0edabae4 100755
--- a/assets/js/utils/calendar_default_view.js
+++ b/assets/js/utils/calendar_default_view.js
@@ -57,7 +57,7 @@ App.Utils.CalendarDefaultView = (function () {
$selectFilterItem.val(),
$selectFilterItem.find('option:selected').attr('type'),
calendarView.currentStart,
- calendarView.currentEnd
+ calendarView.currentEnd,
);
});
@@ -121,9 +121,9 @@ App.Utils.CalendarDefaultView = (function () {
workingPlanException,
provider.id,
successCallback,
- null
+ null,
);
- }
+ },
);
} else if (!lastFocusedEventData.extendedProps.data.is_unavailability) {
const appointment = lastFocusedEventData.extendedProps.data;
@@ -166,7 +166,7 @@ App.Utils.CalendarDefaultView = (function () {
App.Components.ColorSelection.setColor(
$appointmentsModal.find('#appointment-color'),
- appointment.color
+ appointment.color,
);
$appointmentsModal.modal('show');
@@ -209,7 +209,7 @@ App.Utils.CalendarDefaultView = (function () {
const providerId = $selectFilterItem.val();
const provider = vars('available_providers').find(
- (availableProvider) => Number(availableProvider.id) === Number(providerId)
+ (availableProvider) => Number(availableProvider.id) === Number(providerId),
);
if (!provider) {
@@ -243,7 +243,7 @@ App.Utils.CalendarDefaultView = (function () {
text: lang('cancel'),
click: (event, messageModal) => {
messageModal.dispose();
- }
+ },
},
{
text: lang('delete'),
@@ -258,20 +258,20 @@ App.Utils.CalendarDefaultView = (function () {
// Refresh calendar event items.
$reloadAppointments.trigger('click');
});
- }
- }
+ },
+ },
];
App.Utils.Message.show(
lang('delete_appointment_title'),
lang('write_appointment_removal_reason'),
- buttons
+ buttons,
);
$('', {
'class': 'form-control w-100',
'id': 'cancellation-reason',
- 'rows': '3'
+ 'rows': '3',
}).appendTo('#message-modal .modal-body');
} else {
// Do not display confirmation prompt.
@@ -307,7 +307,7 @@ App.Utils.CalendarDefaultView = (function () {
const providerId = $selectFilterItem.val();
const provider = vars('available_providers').find(
- (availableProvider) => Number(availableProvider.id) === Number(providerId)
+ (availableProvider) => Number(availableProvider.id) === Number(providerId),
);
if (provider && provider.timezone) {
@@ -326,7 +326,7 @@ App.Utils.CalendarDefaultView = (function () {
}
$('#insert-working-plan-exception').toggle(
- providerId !== App.Utils.CalendarDefaultView.FILTER_TYPE_ALL
+ providerId !== App.Utils.CalendarDefaultView.FILTER_TYPE_ALL,
);
}
@@ -405,38 +405,38 @@ App.Utils.CalendarDefaultView = (function () {
'html': [
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('start')
+ 'text': lang('start'),
}),
$('', {
'text': App.Utils.Date.format(
moment(startDateTimeObject).format('YYYY-MM-DD HH:mm:ss'),
vars('date_format'),
vars('time_format'),
- true
- )
+ true,
+ ),
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('end')
+ 'text': lang('end'),
}),
$('', {
'text': App.Utils.Date.format(
moment(endDateTimeObject).format('YYYY-MM-DD HH:mm:ss'),
vars('date_format'),
vars('time_format'),
- true
- )
+ true,
+ ),
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('notes')
+ 'text': lang('notes'),
}),
$('', {
- 'text': getEventNotes(info.event)
+ 'text': getEventNotes(info.event),
}),
$('
'),
@@ -449,38 +449,38 @@ App.Utils.CalendarDefaultView = (function () {
'class': 'close-popover btn btn-outline-secondary me-2',
'html': [
$('', {
- 'class': 'fas fa-ban me-2'
+ 'class': 'fas fa-ban me-2',
}),
$('', {
- 'text': lang('close')
- })
- ]
+ 'text': lang('close'),
+ }),
+ ],
}),
$('', {
'class': 'delete-popover btn btn-outline-secondary ' + displayDelete,
'html': [
$('', {
- 'class': 'fas fa-trash-alt me-2'
+ 'class': 'fas fa-trash-alt me-2',
}),
$('', {
- 'text': lang('delete')
- })
- ]
+ 'text': lang('delete'),
+ }),
+ ],
}),
$('', {
'class': 'edit-popover btn btn-primary ' + displayEdit,
'html': [
$('', {
- 'class': 'fas fa-edit me-2'
+ 'class': 'fas fa-edit me-2',
}),
$('', {
- 'text': lang('edit')
- })
- ]
- })
- ]
- })
- ]
+ 'text': lang('edit'),
+ }),
+ ],
+ }),
+ ],
+ }),
+ ],
});
} else if ($target.hasClass('fc-working-plan-exception')) {
displayDelete =
@@ -494,16 +494,16 @@ App.Utils.CalendarDefaultView = (function () {
'html': [
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('provider')
+ 'text': lang('provider'),
}),
$('', {
- 'text': `${provider.first_name} ${provider.last_name}`
+ 'text': `${provider.first_name} ${provider.last_name}`,
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('start')
+ 'text': lang('start'),
}),
$('', {
'text': startTime
@@ -511,15 +511,15 @@ App.Utils.CalendarDefaultView = (function () {
`${date} ${startTime}`,
vars('date_format'),
vars('time_format'),
- true
+ true,
)
- : '-'
+ : '-',
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('end')
+ 'text': lang('end'),
}),
$('', {
'text': endTime
@@ -527,18 +527,18 @@ App.Utils.CalendarDefaultView = (function () {
`${date} ${endTime}`,
vars('date_format'),
vars('time_format'),
- true
+ true,
)
- : '-'
+ : '-',
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('timezone')
+ 'text': lang('timezone'),
}),
$('', {
- 'text': startTime ? vars('timezones')[provider.timezone] : '-'
+ 'text': startTime ? vars('timezones')[provider.timezone] : '-',
}),
$('
'),
@@ -551,38 +551,38 @@ App.Utils.CalendarDefaultView = (function () {
'class': 'close-popover btn btn-outline-secondary me-2',
'html': [
$('', {
- 'class': 'fas fa-ban me-2'
+ 'class': 'fas fa-ban me-2',
}),
$('', {
- 'text': lang('close')
- })
- ]
+ 'text': lang('close'),
+ }),
+ ],
}),
$('', {
'class': 'delete-popover btn btn-outline-secondary ' + displayDelete,
'html': [
$('', {
- 'class': 'fas fa-trash-alt me-2'
+ 'class': 'fas fa-trash-alt me-2',
}),
$('', {
- 'text': lang('delete')
- })
- ]
+ 'text': lang('delete'),
+ }),
+ ],
}),
$('', {
'class': 'edit-popover btn btn-primary',
'html': [
$('', {
- 'class': 'fas fa-edit me-2'
+ 'class': 'fas fa-edit me-2',
}),
$('', {
- 'text': lang('edit')
- })
- ]
- })
- ]
- })
- ]
+ 'text': lang('edit'),
+ }),
+ ],
+ }),
+ ],
+ }),
+ ],
});
} else {
displayEdit = vars('privileges').appointments.edit === true ? '' : 'd-none';
@@ -602,111 +602,111 @@ App.Utils.CalendarDefaultView = (function () {
'html': [
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('start')
+ 'text': lang('start'),
}),
$('', {
'text': App.Utils.Date.format(
moment(info.event.start).format('YYYY-MM-DD HH:mm:ss'),
vars('date_format'),
vars('time_format'),
- true
- )
+ true,
+ ),
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('end')
+ 'text': lang('end'),
}),
$('', {
'text': App.Utils.Date.format(
moment(info.event.end).format('YYYY-MM-DD HH:mm:ss'),
vars('date_format'),
vars('time_format'),
- true
- )
+ true,
+ ),
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('timezone')
+ 'text': lang('timezone'),
}),
$('', {
- 'text': vars('timezones')[info.event.extendedProps.data.provider.timezone]
+ 'text': vars('timezones')[info.event.extendedProps.data.provider.timezone],
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('status')
+ 'text': lang('status'),
}),
$('', {
- 'text': info.event.extendedProps.data.status || '-'
+ 'text': info.event.extendedProps.data.status || '-',
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('service')
+ 'text': lang('service'),
}),
$('', {
- 'text': info.event.extendedProps.data.service.name
+ 'text': info.event.extendedProps.data.service.name,
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('provider')
+ 'text': lang('provider'),
}),
App.Utils.CalendarEventPopover.renderMapIcon(info.event.extendedProps.data.provider),
$('', {
'text':
info.event.extendedProps.data.provider.first_name +
' ' +
- info.event.extendedProps.data.provider.last_name
+ info.event.extendedProps.data.provider.last_name,
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('customer')
+ 'text': lang('customer'),
}),
App.Utils.CalendarEventPopover.renderMapIcon(info.event.extendedProps.data.customer),
$('', {
'class': 'd-inline-block',
- 'text': customerInfo.length ? customerInfo.join(' ') : '-'
+ 'text': customerInfo.length ? customerInfo.join(' ') : '-',
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('email')
+ 'text': lang('email'),
}),
App.Utils.CalendarEventPopover.renderMailIcon(info.event.extendedProps.data.customer.email),
$('', {
'class': 'd-inline-block',
- 'text': info.event.extendedProps.data.customer.email || '-'
+ 'text': info.event.extendedProps.data.customer.email || '-',
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('phone')
+ 'text': lang('phone'),
}),
App.Utils.CalendarEventPopover.renderPhoneIcon(info.event.extendedProps.data.customer.phone_number),
$('', {
'class': 'd-inline-block',
- 'text': info.event.extendedProps.data.customer.phone_number || '-'
+ 'text': info.event.extendedProps.data.customer.phone_number || '-',
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('notes')
+ 'text': lang('notes'),
}),
$('', {
- 'text': getEventNotes(info.event)
+ 'text': getEventNotes(info.event),
}),
$('
'),
@@ -719,38 +719,38 @@ App.Utils.CalendarDefaultView = (function () {
'class': 'close-popover btn btn-outline-secondary me-2',
'html': [
$('', {
- 'class': 'fas fa-ban me-2'
+ 'class': 'fas fa-ban me-2',
}),
$('', {
- 'text': lang('close')
- })
- ]
+ 'text': lang('close'),
+ }),
+ ],
}),
$('', {
'class': 'delete-popover btn btn-outline-secondary ' + displayDelete,
'html': [
$('', {
- 'class': 'fas fa-trash-alt me-2'
+ 'class': 'fas fa-trash-alt me-2',
}),
$('', {
- 'text': lang('delete')
- })
- ]
+ 'text': lang('delete'),
+ }),
+ ],
}),
$('', {
'class': 'edit-popover btn btn-primary ' + displayEdit,
'html': [
$('', {
- 'class': 'fas fa-edit me-2'
+ 'class': 'fas fa-edit me-2',
}),
$('', {
- 'text': lang('edit')
- })
- ]
- })
- ]
- })
- ]
+ 'text': lang('edit'),
+ }),
+ ],
+ }),
+ ],
+ }),
+ ],
});
}
@@ -760,7 +760,7 @@ App.Utils.CalendarDefaultView = (function () {
content: $html,
html: true,
container: '#calendar',
- trigger: 'manual'
+ trigger: 'manual',
});
lastFocusedEventData = info.event;
@@ -820,7 +820,7 @@ App.Utils.CalendarDefaultView = (function () {
// Display success notification to user.
const undoFunction = () => {
appointment.end_datetime = info.event.extendedProps.data.end_datetime = moment(
- appointment.end_datetime
+ appointment.end_datetime,
)
.add({days: -info.endDelta.days, milliseconds: -info.endDelta.milliseconds})
.format('YYYY-MM-DD HH:mm:ss');
@@ -835,8 +835,8 @@ App.Utils.CalendarDefaultView = (function () {
App.Layouts.Backend.displayNotification(lang('appointment_updated'), [
{
'label': lang('undo'),
- 'function': undoFunction
- }
+ 'function': undoFunction,
+ },
]);
// Update the event data for later use.
@@ -851,7 +851,7 @@ App.Utils.CalendarDefaultView = (function () {
id: info.event.extendedProps.data.id,
start_datetime: moment(info.event.start).format('YYYY-MM-DD HH:mm:ss'),
end_datetime: moment(info.event.end).format('YYYY-MM-DD HH:mm:ss'),
- id_users_provider: info.event.extendedProps.data.id_users_provider
+ id_users_provider: info.event.extendedProps.data.id_users_provider,
};
info.event.extendedProps.data.end_datetime = unavailability.end_datetime;
@@ -861,7 +861,7 @@ App.Utils.CalendarDefaultView = (function () {
// Display success notification to user.
const undoFunction = () => {
unavailability.end_datetime = info.event.extendedProps.data.end_datetime = moment(
- unavailability.end_datetime
+ unavailability.end_datetime,
)
.add({days: -info.delta.days, milliseconds: -info.delta.milliseconds})
.format('YYYY-MM-DD HH:mm:ss');
@@ -876,8 +876,8 @@ App.Utils.CalendarDefaultView = (function () {
App.Layouts.Backend.displayNotification(lang('unavailability_updated'), [
{
'label': lang('undo'),
- 'function': undoFunction
- }
+ 'function': undoFunction,
+ },
]);
// Update the event data for later use.
@@ -965,7 +965,7 @@ App.Utils.CalendarDefaultView = (function () {
appointment.start_datetime = moment(appointment.start_datetime)
.add({
days: -info.delta.days,
- milliseconds: -info.delta.milliseconds
+ milliseconds: -info.delta.milliseconds,
})
.format('YYYY-MM-DD HH:mm:ss');
@@ -986,8 +986,8 @@ App.Utils.CalendarDefaultView = (function () {
App.Layouts.Backend.displayNotification(lang('appointment_updated'), [
{
'label': lang('undo'),
- 'function': undoFunction
- }
+ 'function': undoFunction,
+ },
]);
};
@@ -999,7 +999,7 @@ App.Utils.CalendarDefaultView = (function () {
id: info.event.extendedProps.data.id,
start_datetime: moment(info.event.start).format('YYYY-MM-DD HH:mm:ss'),
end_datetime: moment(info.event.end).format('YYYY-MM-DD HH:mm:ss'),
- id_users_provider: info.event.extendedProps.data.id_users_provider
+ id_users_provider: info.event.extendedProps.data.id_users_provider,
};
successCallback = () => {
@@ -1027,8 +1027,8 @@ App.Utils.CalendarDefaultView = (function () {
App.Layouts.Backend.displayNotification(lang('unavailability_updated'), [
{
label: lang('undo'),
- function: undoFunction
- }
+ function: undoFunction,
+ },
]);
};
@@ -1062,7 +1062,7 @@ App.Utils.CalendarDefaultView = (function () {
$('#unavailability-end')[0]._flatpickr.setDate(info.end);
messageModal.dispose();
- }
+ },
},
{
text: lang('appointment'),
@@ -1074,12 +1074,12 @@ App.Utils.CalendarDefaultView = (function () {
if (isProviderDisplayed) {
const provider = vars('available_providers').find(
- (availableProvider) => Number(availableProvider.id) === Number($selectFilterItem.val())
+ (availableProvider) => Number(availableProvider.id) === Number($selectFilterItem.val()),
);
if (provider) {
service = vars('available_services').find(
- (availableService) => provider.services.indexOf(availableService.id) !== -1
+ (availableService) => provider.services.indexOf(availableService.id) !== -1,
);
if (service) {
@@ -1104,7 +1104,7 @@ App.Utils.CalendarDefaultView = (function () {
$appointmentsModal.find('#select-provider').trigger('change');
} else {
service = vars('available_services').find(
- (availableService) => Number(availableService.id) === Number($selectFilterItem.val())
+ (availableService) => Number(availableService.id) === Number($selectFilterItem.val()),
);
if (service) {
@@ -1117,8 +1117,8 @@ App.Utils.CalendarDefaultView = (function () {
$('#end-datetime')[0]._flatpickr.setDate(App.Pages.Calendar.getSelectionEndDate(info));
messageModal.dispose();
- }
- }
+ },
+ },
];
App.Utils.Message.show(lang('add_new_event'), lang('what_kind_of_event'), buttons);
@@ -1149,7 +1149,7 @@ App.Utils.CalendarDefaultView = (function () {
$selectFilterItem.val(),
$('#select-filter-item option:selected').attr('type'),
fullCalendar.view.currentStart,
- fullCalendar.view.currentEnd
+ fullCalendar.view.currentEnd,
);
$(window).trigger('resize'); // Places the footer on the bottom.
@@ -1218,7 +1218,7 @@ App.Utils.CalendarDefaultView = (function () {
end: moment(appointment.end_datetime).toDate(),
allDay: false,
color: appointment.color,
- data: appointment // Store appointment data for later use.
+ data: appointment, // Store appointment data for later use.
};
calendarEventSource.push(appointmentEvent);
@@ -1241,7 +1241,7 @@ App.Utils.CalendarDefaultView = (function () {
color: '#879DB4',
editable: true,
className: 'fc-unavailability fc-custom',
- data: unavailability
+ data: unavailability,
};
calendarEventSource.push(unavailabilityEvent);
@@ -1258,7 +1258,7 @@ App.Utils.CalendarDefaultView = (function () {
textColor: '#ffffff',
editable: false,
className: 'fc-blocked-period fc-unavailability',
- data: blockedPeriod
+ data: blockedPeriod,
};
calendarEventSource.push(blockedPeriodEvent);
@@ -1271,11 +1271,11 @@ App.Utils.CalendarDefaultView = (function () {
}
const provider = vars('available_providers').find(
- (availableProvider) => Number(availableProvider.id) === Number(recordId)
+ (availableProvider) => Number(availableProvider.id) === Number(recordId),
);
const workingPlan = JSON.parse(
- provider ? provider.settings.working_plan : vars('company_working_plan')
+ provider ? provider.settings.working_plan : vars('company_working_plan'),
);
const workingPlanExceptions = JSON.parse(provider ? provider.settings.working_plan_exceptions : '{}');
let unavailabilityEvent;
@@ -1325,8 +1325,8 @@ App.Utils.CalendarDefaultView = (function () {
data: {
date: weekdayDate,
workingPlanException: workingPlanExceptions[weekdayDate],
- provider: provider
- }
+ provider: provider,
+ },
};
calendarEventSource.push(workingPlanExceptionEvent);
@@ -1342,7 +1342,7 @@ App.Utils.CalendarDefaultView = (function () {
allDay: false,
color: '#BEBEBE',
editable: false,
- className: 'fc-unavailability'
+ className: 'fc-unavailability',
};
calendarEventSource.push(unavailabilityEvent);
@@ -1363,12 +1363,12 @@ App.Utils.CalendarDefaultView = (function () {
title: lang('not_working'),
start: calendarDate.clone().toDate(),
end: moment(
- calendarDate.format('YYYY-MM-DD') + ' ' + sortedWorkingPlan[weekdayName].start + ':00'
+ calendarDate.format('YYYY-MM-DD') + ' ' + sortedWorkingPlan[weekdayName].start + ':00',
).toDate(),
allDay: false,
color: '#BEBEBE',
editable: false,
- className: 'fc-unavailability'
+ className: 'fc-unavailability',
};
calendarEventSource.push(unavailabilityEvent);
@@ -1384,13 +1384,13 @@ App.Utils.CalendarDefaultView = (function () {
unavailabilityEvent = {
title: lang('not_working'),
start: moment(
- calendarDate.format('YYYY-MM-DD') + ' ' + sortedWorkingPlan[weekdayName].end + ':00'
+ calendarDate.format('YYYY-MM-DD') + ' ' + sortedWorkingPlan[weekdayName].end + ':00',
).toDate(),
end: calendarDate.clone().add(1, 'day').toDate(),
allDay: false,
color: '#BEBEBE',
editable: false,
- className: 'fc-unavailability'
+ className: 'fc-unavailability',
};
calendarEventSource.push(unavailabilityEvent);
@@ -1415,7 +1415,7 @@ App.Utils.CalendarDefaultView = (function () {
allDay: false,
color: '#BEBEBE',
editable: false,
- className: 'fc-unavailability fc-break'
+ className: 'fc-unavailability fc-break',
};
calendarEventSource.push(unavailabilityEvent);
@@ -1493,13 +1493,13 @@ App.Utils.CalendarDefaultView = (function () {
headerToolbar: {
left: 'prev,next today',
center: 'title',
- right: 'timeGridDay,timeGridWeek,dayGridMonth'
+ right: 'timeGridDay,timeGridWeek,dayGridMonth',
},
buttonText: {
today: lang('today'),
day: lang('day'),
week: lang('week'),
- month: lang('month')
+ month: lang('month'),
},
windowResize: onWindowResize,
datesSet: onDatesSet,
@@ -1507,7 +1507,7 @@ App.Utils.CalendarDefaultView = (function () {
eventClick: onEventClick,
eventResize: onEventResize,
eventDrop: onEventDrop,
- select: onSelect
+ select: onSelect,
});
fullCalendar.render();
@@ -1531,9 +1531,9 @@ App.Utils.CalendarDefaultView = (function () {
'value': availableProvider.id,
'type': FILTER_TYPE_PROVIDER,
'google-sync': hasGoogleSync,
- 'text': availableProvider.first_name + ' ' + availableProvider.last_name
+ 'text': availableProvider.first_name + ' ' + availableProvider.last_name,
});
- })
+ }),
}).appendTo('#select-filter-item');
}
@@ -1545,9 +1545,9 @@ App.Utils.CalendarDefaultView = (function () {
$('', {
'value': availableService.id,
'type': FILTER_TYPE_SERVICE,
- 'text': availableService.name
- })
- )
+ 'text': availableService.name,
+ }),
+ ),
}).appendTo('#select-filter-item');
}
@@ -1634,7 +1634,7 @@ App.Utils.CalendarDefaultView = (function () {
$selectFilterItem.val(),
$selectFilterItem.find('option:selected').attr('type'),
fullCalendar.view.currentStart,
- fullCalendar.view.currentEnd
+ fullCalendar.view.currentEnd,
);
}, 60000);
}
@@ -1643,6 +1643,6 @@ App.Utils.CalendarDefaultView = (function () {
initialize,
FILTER_TYPE_ALL,
FILTER_TYPE_PROVIDER,
- FILTER_TYPE_SERVICE
+ FILTER_TYPE_SERVICE,
};
})();
diff --git a/assets/js/utils/calendar_event_popover.js b/assets/js/utils/calendar_event_popover.js
index 1ed12e6e..bd9dcffe 100644
--- a/assets/js/utils/calendar_event_popover.js
+++ b/assets/js/utils/calendar_event_popover.js
@@ -54,11 +54,11 @@ App.Utils.CalendarEventPopover = (function () {
'target': '_blank',
'html': [
$('', {
- 'class': 'fas fa-map-marker-alt'
- })
- ]
- })
- ]
+ 'class': 'fas fa-map-marker-alt',
+ }),
+ ],
+ }),
+ ],
}).html();
}
@@ -83,11 +83,11 @@ App.Utils.CalendarEventPopover = (function () {
'target': '_blank',
'html': [
$('', {
- 'class': 'fas fa-envelope'
- })
- ]
- })
- ]
+ 'class': 'fas fa-envelope',
+ }),
+ ],
+ }),
+ ],
}).html();
}
@@ -112,17 +112,17 @@ App.Utils.CalendarEventPopover = (function () {
'target': '_blank',
'html': [
$('', {
- 'class': 'fas fa-phone-alt'
- })
- ]
- })
- ]
+ 'class': 'fas fa-phone-alt',
+ }),
+ ],
+ }),
+ ],
}).html();
}
return {
renderPhoneIcon,
renderMapIcon,
- renderMailIcon
+ renderMailIcon,
};
})();
diff --git a/assets/js/utils/calendar_google_sync.js b/assets/js/utils/calendar_google_sync.js
index 971ec3d8..9cb53a83 100644
--- a/assets/js/utils/calendar_google_sync.js
+++ b/assets/js/utils/calendar_google_sync.js
@@ -81,7 +81,7 @@ App.Utils.CalendarGoogleSync = (function () {
text: lang('cancel'),
click: (event, messageModal) => {
messageModal.dispose();
- }
+ },
},
{
text: 'OK',
@@ -90,7 +90,7 @@ App.Utils.CalendarGoogleSync = (function () {
const providerId = $('#select-filter-item').val();
const provider = vars('available_providers').find(
- (availableProvider) => Number(availableProvider.id) === Number(providerId)
+ (availableProvider) => Number(availableProvider.id) === Number(providerId),
);
if (!provider) {
@@ -108,8 +108,8 @@ App.Utils.CalendarGoogleSync = (function () {
$('#select-filter-item option:selected').attr('google-sync', 'false');
messageModal.dispose();
- }
- }
+ },
+ },
];
App.Utils.Message.show(lang('disable_sync'), lang('disable_sync_prompt'), buttons);
@@ -159,6 +159,6 @@ App.Utils.CalendarGoogleSync = (function () {
document.addEventListener('DOMContentLoaded', initialize);
return {
- initialize
+ initialize,
};
})();
diff --git a/assets/js/utils/calendar_table_view.js b/assets/js/utils/calendar_table_view.js
index 1a8c1132..dfee3514 100755
--- a/assets/js/utils/calendar_table_view.js
+++ b/assets/js/utils/calendar_table_view.js
@@ -104,7 +104,7 @@ App.Utils.CalendarTableView = (function () {
createNonWorkingHours(
$providerColumn.find('.calendar-wrapper'),
- $providerColumn.data('provider')
+ $providerColumn.data('provider'),
);
// Add the appointments to the column.
@@ -196,9 +196,9 @@ App.Utils.CalendarTableView = (function () {
workingPlanException,
provider.id,
successCallback,
- null
+ null,
);
- }
+ },
);
} else if (lastFocusedEventData.extendedProps.data.is_unavailability === false) {
const appointment = lastFocusedEventData.extendedProps.data;
@@ -240,7 +240,7 @@ App.Utils.CalendarTableView = (function () {
App.Components.ColorSelection.setColor(
$appointmentsModal.find('#appointment-color'),
- appointment.color
+ appointment.color,
);
$appointmentsModal.modal('show');
@@ -290,7 +290,7 @@ App.Utils.CalendarTableView = (function () {
$('#message-box').dialog('close');
const workingPlanExceptions = JSON.parse(
- lastFocusedEventData.extendedProps.data.settings.working_plan_exceptions
+ lastFocusedEventData.extendedProps.data.settings.working_plan_exceptions,
);
delete workingPlanExceptions[moment(lastFocusedEventData.start).format('YYYY-MM-DD')];
@@ -307,7 +307,7 @@ App.Utils.CalendarTableView = (function () {
text: lang('cancel'),
click: (event, messageModal) => {
messageModal.dispose();
- }
+ },
},
{
text: lang('delete'),
@@ -322,20 +322,20 @@ App.Utils.CalendarTableView = (function () {
// Refresh calendar event items.
$reloadAppointments.trigger('click');
});
- }
- }
+ },
+ },
];
App.Utils.Message.show(
lang('delete_appointment_title'),
lang('write_appointment_removal_reason'),
- buttons
+ buttons,
);
$('', {
'class': 'form-control w-100',
'id': 'cancellation-reason',
- 'rows': '3'
+ 'rows': '3',
}).appendTo('#message-modal .modal-body');
} else {
// Do not display confirmation prompt.
@@ -362,31 +362,31 @@ App.Utils.CalendarTableView = (function () {
.append(new Option(`3 ${lang('days')}`, '3'));
const $calendarHeader = $('', {
- 'class': 'calendar-header'
+ 'class': 'calendar-header',
}).appendTo('#calendar');
$('', {
'class': 'btn btn-xs btn-outline-secondary previous me-2',
'html': [
$('', {
- 'class': 'fas fa-chevron-left'
- })
- ]
+ 'class': 'fas fa-chevron-left',
+ }),
+ ],
}).appendTo($calendarHeader);
$selectDate = $('', {
'type': 'text',
'class': 'form-control d-inline-block select-date me-2',
- 'value': App.Utils.Date.format(new Date(), vars('date_format'), vars('time_format'), false)
+ 'value': App.Utils.Date.format(new Date(), vars('date_format'), vars('time_format'), false),
}).appendTo($calendarHeader);
$('', {
'class': 'btn btn-xs btn-outline-secondary next',
'html': [
$('', {
- 'class': 'fas fa-chevron-right'
- })
- ]
+ 'class': 'fas fa-chevron-right',
+ }),
+ ],
}).appendTo($calendarHeader);
App.Utils.UI.initializeDatepicker($calendarHeader.find('.select-date'), {
@@ -396,7 +396,7 @@ App.Utils.CalendarTableView = (function () {
.add(parseInt($selectFilterItem.val()) - 1, 'days')
.toDate();
createView(startDate, endDate);
- }
+ },
});
const providers = vars('available_providers').filter(
@@ -405,12 +405,12 @@ App.Utils.CalendarTableView = (function () {
(vars('role_slug') === App.Layouts.Backend.DB_SLUG_SECRETARY &&
vars('secretary_providers').indexOf(Number(provider.id)) !== -1) ||
(vars('role_slug') === App.Layouts.Backend.DB_SLUG_PROVIDER &&
- Number(provider.id) === Number(vars('user_id')))
+ Number(provider.id) === Number(vars('user_id'))),
);
// Create providers and service filters.
$('', {
- 'text': lang('provider')
+ 'text': lang('provider'),
}).appendTo($calendarHeader);
$filterProvider = $('', {
@@ -422,8 +422,8 @@ App.Utils.CalendarTableView = (function () {
const startDateMoment = moment(firstColumnDate);
const endDateMoment = moment(firstColumnDate).add(parseInt($selectFilterItem.val()) - 1, 'day');
createView(startDateMoment.toDate(), endDateMoment.toDate());
- }
- }
+ },
+ },
}).appendTo($calendarHeader);
if (vars('role_slug') !== App.Layouts.Backend.DB_SLUG_PROVIDER) {
@@ -447,7 +447,7 @@ App.Utils.CalendarTableView = (function () {
});
$('', {
- 'text': lang('service')
+ 'text': lang('service'),
}).appendTo($calendarHeader);
$filterService = $('', {
@@ -459,8 +459,8 @@ App.Utils.CalendarTableView = (function () {
const startDateMoment = moment(firstColumnDate);
const endDateMoment = moment(firstColumnDate).add({days: parseInt($selectFilterItem.val()) - 1});
createView(startDateMoment.toDate(), endDateMoment.toDate());
- }
- }
+ },
+ },
}).appendTo($calendarHeader);
services.forEach((service) => {
@@ -494,12 +494,12 @@ App.Utils.CalendarTableView = (function () {
$('#calendar .calendar-view').remove();
const $calendarView = $('', {
- 'class': 'calendar-view'
+ 'class': 'calendar-view',
}).appendTo('#calendar');
$calendarView.data({
startDate: moment(startDate).format('YYYY-MM-DD'),
- endDate: moment(endDate).format('YYYY-MM-DD')
+ endDate: moment(endDate).format('YYYY-MM-DD'),
});
const $wrapper = $('').appendTo($calendarView);
@@ -540,14 +540,14 @@ App.Utils.CalendarTableView = (function () {
*/
function createDateColumn($wrapper, date, events) {
const $dateColumn = $('', {
- 'class': 'date-column'
+ 'class': 'date-column',
}).appendTo($wrapper);
$dateColumn.data('date', date.getTime());
$('', {
'class': 'date-column-title',
- 'text': App.Utils.Date.format(date, vars('date_format'), vars('time_format'))
+ 'text': App.Utils.Date.format(date, vars('date_format'), vars('time_format')),
}).appendTo($dateColumn);
const filterProviderIds = $filterProvider.val();
@@ -556,7 +556,7 @@ App.Utils.CalendarTableView = (function () {
let providers = vars('available_providers').filter((provider) => {
const servedServiceIds = provider.services.filter((serviceId) => {
const matches = filterServiceIds.filter(
- (filterServiceId) => Number(serviceId) === Number(filterServiceId)
+ (filterServiceId) => Number(serviceId) === Number(filterServiceId),
);
return matches.length;
@@ -611,7 +611,7 @@ App.Utils.CalendarTableView = (function () {
}
const $providerColumn = $('', {
- 'class': 'provider-column'
+ 'class': 'provider-column',
}).appendTo($dateColumn);
$providerColumn.data('provider', provider);
@@ -649,7 +649,7 @@ App.Utils.CalendarTableView = (function () {
function createCalendar($providerColumn, goToDate, provider) {
const $wrapper = $('', {
- 'class': 'calendar-wrapper'
+ 'class': 'calendar-wrapper',
}).appendTo($providerColumn);
let columnFormat = '';
@@ -711,7 +711,7 @@ App.Utils.CalendarTableView = (function () {
headerToolbar: {
left: 'listDay,timeGridDay',
center: '',
- right: ''
+ right: '',
},
buttonText: {
today: lang('today'),
@@ -719,12 +719,12 @@ App.Utils.CalendarTableView = (function () {
week: lang('week'),
month: lang('month'),
timeGridDay: lang('calendar'),
- listDay: lang('list')
+ listDay: lang('list'),
},
eventClick: onEventClick,
eventResize: onEventResize,
eventDrop: onEventDrop,
- select: (info) => onSelect(info, fullCalendar)
+ select: (info) => onSelect(info, fullCalendar),
});
fullCalendar.render();
@@ -734,7 +734,7 @@ App.Utils.CalendarTableView = (function () {
fullCalendar.gotoDate(goToDate);
$('', {
- 'text': provider.first_name + ' ' + provider.last_name
+ 'text': provider.first_name + ' ' + provider.last_name,
}).prependTo($providerColumn);
}
@@ -765,8 +765,8 @@ App.Utils.CalendarTableView = (function () {
data: {
date: selDayDate,
workingPlanException: workingPlanExceptions[selDayDate],
- provider: provider
- }
+ provider: provider,
+ },
};
calendarEventSource.push(workingPlanExceptionEvent);
@@ -780,7 +780,7 @@ App.Utils.CalendarTableView = (function () {
allDay: false,
color: '#BEBEBE',
editable: false,
- className: 'fc-unavailability'
+ className: 'fc-unavailability',
};
calendarEventSource.push(nonWorkingDay);
@@ -800,7 +800,7 @@ App.Utils.CalendarTableView = (function () {
allDay: false,
color: '#BEBEBE',
editable: false,
- className: 'fc-unavailability'
+ className: 'fc-unavailability',
};
calendarEventSource.push(unavailabilityPeriod);
@@ -817,7 +817,7 @@ App.Utils.CalendarTableView = (function () {
allDay: false,
color: '#BEBEBE',
editable: false,
- className: 'fc-unavailability'
+ className: 'fc-unavailability',
};
calendarEventSource.push(unavailabilityPeriod);
@@ -838,7 +838,7 @@ App.Utils.CalendarTableView = (function () {
allDay: false,
color: '#BEBEBE',
editable: false,
- className: 'fc-unavailability fc-break'
+ className: 'fc-unavailability fc-break',
};
calendarEventSource.push(unavailabilityPeriod);
@@ -863,7 +863,7 @@ App.Utils.CalendarTableView = (function () {
const filterServiceIds = $filterService.val().map((serviceId) => Number(serviceId));
appointments = appointments.filter(
- (appointment) => !filterServiceIds.length || filterServiceIds.includes(appointment.id_services)
+ (appointment) => !filterServiceIds.length || filterServiceIds.includes(appointment.id_services),
);
const calendarEvents = [];
@@ -898,7 +898,7 @@ App.Utils.CalendarTableView = (function () {
end: moment(appointment.end_datetime).toDate(),
allDay: false,
color: appointment.color,
- data: appointment // Store appointment data for later use.
+ data: appointment, // Store appointment data for later use.
});
}
@@ -935,7 +935,7 @@ App.Utils.CalendarTableView = (function () {
color: '#879DB4',
editable: true,
className: 'fc-unavailability fc-custom',
- data: unavailability
+ data: unavailability,
};
calendarEventSource.push(event);
@@ -972,7 +972,7 @@ App.Utils.CalendarTableView = (function () {
textColor: '#ffffff',
editable: false,
className: 'fc-blocked-period fc-unavailability',
- data: blockedPeriod
+ data: blockedPeriod,
};
calendarEventSource.push(event);
@@ -1003,7 +1003,7 @@ App.Utils.CalendarTableView = (function () {
currentDate.getMonth(),
currentDate.getDate(),
startHour[0],
- startHour[1]
+ startHour[1],
);
const endHour = entry.end.split(':');
const endDate = new Date(
@@ -1011,11 +1011,11 @@ App.Utils.CalendarTableView = (function () {
currentDate.getMonth(),
currentDate.getDate(),
endHour[0],
- endHour[1]
+ endHour[1],
);
const eventDuration = Math.round((endDate - eventDate) / 60000);
const $event = $('', {
- 'class': 'event unavailability break'
+ 'class': 'event unavailability break',
});
$event.html(
@@ -1024,7 +1024,7 @@ App.Utils.CalendarTableView = (function () {
moment(eventDate).format('HH:mm') +
' (' +
eventDuration +
- "')"
+ "')",
);
$event.data(entry);
@@ -1035,7 +1035,7 @@ App.Utils.CalendarTableView = (function () {
const cellDate = moment(currentDate)
.set({
hour: parseInt($td.text().split(':')[0]),
- minute: parseInt($td.text().split(':')[1])
+ minute: parseInt($td.text().split(':')[1]),
})
.toDate();
@@ -1111,38 +1111,38 @@ App.Utils.CalendarTableView = (function () {
'html': [
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('start')
+ 'text': lang('start'),
}),
$('', {
'text': App.Utils.Date.format(
moment(startDateTimeObject).format('YYYY-MM-DD HH:mm:ss'),
vars('date_format'),
vars('time_format'),
- true
- )
+ true,
+ ),
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('end')
+ 'text': lang('end'),
}),
$('', {
'text': App.Utils.Date.format(
moment(endDateTimeObject).format('YYYY-MM-DD HH:mm:ss'),
vars('date_format'),
vars('time_format'),
- true
- )
+ true,
+ ),
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('notes')
+ 'text': lang('notes'),
}),
$('', {
- 'text': getEventNotes(info.event)
+ 'text': getEventNotes(info.event),
}),
$('
'),
@@ -1155,38 +1155,38 @@ App.Utils.CalendarTableView = (function () {
'class': 'close-popover btn btn-outline-secondary me-2',
'html': [
$('', {
- 'class': 'fas fa-ban me-2'
+ 'class': 'fas fa-ban me-2',
}),
$('', {
- 'text': lang('close')
- })
- ]
+ 'text': lang('close'),
+ }),
+ ],
}),
$('', {
'class': 'delete-popover btn btn-outline-secondary me-2 ' + displayDelete,
'html': [
$('', {
- 'class': 'fas fa-trash-alt me-2'
+ 'class': 'fas fa-trash-alt me-2',
}),
$('', {
- 'text': lang('delete')
- })
- ]
+ 'text': lang('delete'),
+ }),
+ ],
}),
$('', {
'class': 'edit-popover btn btn-primary ' + displayEdit,
'html': [
$('', {
- 'class': 'fas fa-edit me-2'
+ 'class': 'fas fa-edit me-2',
}),
$('', {
- 'text': lang('edit')
- })
- ]
- })
- ]
- })
- ]
+ 'text': lang('edit'),
+ }),
+ ],
+ }),
+ ],
+ }),
+ ],
});
} else if ($target.hasClass('fc-working-plan-exception')) {
displayEdit =
@@ -1199,20 +1199,20 @@ App.Utils.CalendarTableView = (function () {
'html': [
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('provider')
+ 'text': lang('provider'),
}),
$('', {
'text': info.event.extendedProps.data
? info.event.extendedProps.data.provider.first_name +
' ' +
info.event.extendedProps.data.provider.last_name
- : '-'
+ : '-',
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('start')
+ 'text': lang('start'),
}),
$('', {
'text': App.Utils.Date.format(
@@ -1221,14 +1221,14 @@ App.Utils.CalendarTableView = (function () {
info.event.extendedProps.data.workingPlanException.start,
vars('date_format'),
vars('time_format'),
- true
- )
+ true,
+ ),
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('end')
+ 'text': lang('end'),
}),
$('', {
'text': App.Utils.Date.format(
@@ -1237,17 +1237,17 @@ App.Utils.CalendarTableView = (function () {
info.event.extendedProps.data.workingPlanException.end,
vars('date_format'),
vars('time_format'),
- true
- )
+ true,
+ ),
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('timezone')
+ 'text': lang('timezone'),
}),
$('', {
- 'text': vars('timezones')[info.event.extendedProps.data.provider.timezone]
+ 'text': vars('timezones')[info.event.extendedProps.data.provider.timezone],
}),
$('
'),
@@ -1260,38 +1260,38 @@ App.Utils.CalendarTableView = (function () {
'class': 'close-popover btn btn-outline-secondary me-2',
'html': [
$('', {
- 'class': 'fas fa-ban me-2'
+ 'class': 'fas fa-ban me-2',
}),
$('', {
- 'text': lang('close')
- })
- ]
+ 'text': lang('close'),
+ }),
+ ],
}),
$('', {
'class': 'delete-popover btn btn-outline-secondary me-2 ' + displayDelete,
'html': [
$('', {
- 'class': 'fas fa-trash-alt me-2'
+ 'class': 'fas fa-trash-alt me-2',
}),
$('', {
- 'text': lang('delete')
- })
- ]
+ 'text': lang('delete'),
+ }),
+ ],
}),
$('', {
'class': 'edit-popover btn btn-primary ' + displayEdit,
'html': [
$('', {
- 'class': 'fas fa-edit me-2'
+ 'class': 'fas fa-edit me-2',
}),
$('', {
- 'text': lang('edit')
- })
- ]
- })
- ]
- })
- ]
+ 'text': lang('edit'),
+ }),
+ ],
+ }),
+ ],
+ }),
+ ],
});
} else {
displayEdit = vars('privileges').appointments.edit === true ? '' : 'd-none';
@@ -1311,108 +1311,108 @@ App.Utils.CalendarTableView = (function () {
'html': [
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('start')
+ 'text': lang('start'),
}),
$('', {
'text': App.Utils.Date.format(
moment(info.event.start).format('YYYY-MM-DD HH:mm:ss'),
vars('date_format'),
vars('time_format'),
- true
- )
+ true,
+ ),
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('end')
+ 'text': lang('end'),
}),
$('', {
'text': App.Utils.Date.format(
moment(info.event.end).format('YYYY-MM-DD HH:mm:ss'),
vars('date_format'),
vars('time_format'),
- true
- )
+ true,
+ ),
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('timezone')
+ 'text': lang('timezone'),
}),
$('', {
- 'text': vars('timezones')[info.event.extendedProps.data.provider.timezone]
+ 'text': vars('timezones')[info.event.extendedProps.data.provider.timezone],
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('status')
+ 'text': lang('status'),
}),
$('', {
- 'text': info.event.extendedProps.data.status || '-'
+ 'text': info.event.extendedProps.data.status || '-',
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('service')
+ 'text': lang('service'),
}),
$('', {
- 'text': info.event.extendedProps.data.service.name
+ 'text': info.event.extendedProps.data.service.name,
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('provider')
+ 'text': lang('provider'),
}),
App.Utils.CalendarEventPopover.renderMapIcon(info.event.extendedProps.data.provider),
$('', {
'text':
info.event.extendedProps.data.provider.first_name +
' ' +
- info.event.extendedProps.data.provider.last_name
+ info.event.extendedProps.data.provider.last_name,
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('customer')
+ 'text': lang('customer'),
}),
App.Utils.CalendarEventPopover.renderMapIcon(info.event.extendedProps.data.customer),
$('', {
- 'text': customerInfo.length ? customerInfo.join(' ') : '-'
+ 'text': customerInfo.length ? customerInfo.join(' ') : '-',
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('email')
+ 'text': lang('email'),
}),
App.Utils.CalendarEventPopover.renderMailIcon(info.event.extendedProps.data.customer.email),
$('', {
- 'text': info.event.extendedProps.data.customer.email || '-'
+ 'text': info.event.extendedProps.data.customer.email || '-',
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('phone')
+ 'text': lang('phone'),
}),
App.Utils.CalendarEventPopover.renderPhoneIcon(info.event.extendedProps.data.customer.phone_number),
$('', {
- 'text': info.event.extendedProps.data.customer.phone_number || '-'
+ 'text': info.event.extendedProps.data.customer.phone_number || '-',
}),
$('
'),
$('', {
'class': 'd-inline-block me-2',
- 'text': lang('notes')
+ 'text': lang('notes'),
}),
$('', {
- 'text': getEventNotes(info.event)
+ 'text': getEventNotes(info.event),
}),
$('
'),
@@ -1425,38 +1425,38 @@ App.Utils.CalendarTableView = (function () {
'class': 'close-popover btn btn-outline-secondary me-2',
'html': [
$('', {
- 'class': 'fas fa-ban me-2'
+ 'class': 'fas fa-ban me-2',
}),
$('', {
- 'text': lang('close')
- })
- ]
+ 'text': lang('close'),
+ }),
+ ],
}),
$('', {
'class': 'delete-popover btn btn-outline-secondary me-2 ' + displayDelete,
'html': [
$('', {
- 'class': 'fas fa-trash-alt me-2'
+ 'class': 'fas fa-trash-alt me-2',
}),
$('', {
- 'text': lang('delete')
- })
- ]
+ 'text': lang('delete'),
+ }),
+ ],
}),
$('', {
'class': 'edit-popover btn btn-primary ' + displayEdit,
'html': [
$('', {
- 'class': 'fas fa-edit me-2'
+ 'class': 'fas fa-edit me-2',
}),
$('', {
- 'text': lang('edit')
- })
- ]
- })
- ]
- })
- ]
+ 'text': lang('edit'),
+ }),
+ ],
+ }),
+ ],
+ }),
+ ],
});
}
@@ -1466,7 +1466,7 @@ App.Utils.CalendarTableView = (function () {
content: $html,
html: true,
container: '#calendar',
- trigger: 'manual'
+ trigger: 'manual',
});
lastFocusedEventData = info.event;
@@ -1524,7 +1524,7 @@ App.Utils.CalendarTableView = (function () {
// Display success notification to user.
const undoFunction = () => {
appointment.end_datetime = info.event.extendedProps.data.end_datetime = moment(
- appointment.end_datetime
+ appointment.end_datetime,
)
.add({days: -info.endDelta.days, milliseconds: -info.endDelta.milliseconds})
.format('YYYY-MM-DD HH:mm:ss');
@@ -1539,8 +1539,8 @@ App.Utils.CalendarTableView = (function () {
App.Layouts.Backend.displayNotification(lang('appointment_updated'), [
{
'label': lang('undo'),
- 'function': undoFunction
- }
+ 'function': undoFunction,
+ },
]);
$footer.css('position', 'static'); // Footer position fix.
@@ -1557,7 +1557,7 @@ App.Utils.CalendarTableView = (function () {
id: info.event.extendedProps.data.id,
start_datetime: moment(info.event.start).format('YYYY-MM-DD HH:mm:ss'),
end_datetime: moment(info.event.end).format('YYYY-MM-DD HH:mm:ss'),
- id_users_provider: info.event.extendedProps.data.id_users_provider
+ id_users_provider: info.event.extendedProps.data.id_users_provider,
};
info.event.extendedProps.data.end_datetime = unavailability.end_datetime;
@@ -1567,7 +1567,7 @@ App.Utils.CalendarTableView = (function () {
// Display success notification to user.
const undoFunction = () => {
unavailability.end_datetime = info.event.extendedProps.data.end_datetime = moment(
- unavailability.end_datetime
+ unavailability.end_datetime,
)
.add({days: -info.endDelta.days, milliseconds: -info.endDelta.milliseconds})
.format('YYYY-MM-DD HH:mm:ss');
@@ -1582,8 +1582,8 @@ App.Utils.CalendarTableView = (function () {
App.Layouts.Backend.displayNotification(lang('unavailability_updated'), [
{
'label': lang('undo'),
- 'function': undoFunction
- }
+ 'function': undoFunction,
+ },
]);
$footer.css('position', 'static'); // Footer position fix.
@@ -1646,7 +1646,7 @@ App.Utils.CalendarTableView = (function () {
appointment.start_datetime = moment(appointment.start_datetime)
.add({
days: -info.delta.days,
- milliseconds: -info.delta.milliseconds
+ milliseconds: -info.delta.milliseconds,
})
.format('YYYY-MM-DD HH:mm:ss');
@@ -1667,8 +1667,8 @@ App.Utils.CalendarTableView = (function () {
App.Layouts.Backend.displayNotification(lang('appointment_updated'), [
{
'label': lang('undo'),
- 'function': undoFunction
- }
+ 'function': undoFunction,
+ },
]);
$footer.css('position', 'static'); // Footer position fix.
@@ -1682,7 +1682,7 @@ App.Utils.CalendarTableView = (function () {
id: info.event.extendedProps.data.id,
start_datetime: moment(info.event.start).format('YYYY-MM-DD HH:mm:ss'),
end_datetime: moment(info.event.end).format('YYYY-MM-DD HH:mm:ss'),
- id_users_provider: info.event.extendedProps.data.id_users_provider
+ id_users_provider: info.event.extendedProps.data.id_users_provider,
};
successCallback = () => {
@@ -1708,8 +1708,8 @@ App.Utils.CalendarTableView = (function () {
App.Layouts.Backend.displayNotification(lang('unavailability_updated'), [
{
label: lang('undo'),
- function: undoFunction
- }
+ function: undoFunction,
+ },
]);
$footer.css('position', 'static'); // Footer position fix.
@@ -1747,7 +1747,7 @@ App.Utils.CalendarTableView = (function () {
$('#unavailability-end')[0]._flatpickr.setDate(info.end);
messageModal.dispose();
- }
+ },
},
{
text: lang('appointment'),
@@ -1755,11 +1755,11 @@ App.Utils.CalendarTableView = (function () {
$('#insert-appointment').trigger('click');
const provider = vars('available_providers').find(
- (provider) => Number(provider.id) === Number(providerId)
+ (provider) => Number(provider.id) === Number(providerId),
);
const service = vars('available_services').find(
- (service) => provider.services.indexOf(service.id) !== -1
+ (service) => provider.services.indexOf(service.id) !== -1,
);
if (service) {
@@ -1787,8 +1787,8 @@ App.Utils.CalendarTableView = (function () {
$('#end-datetime')[0]._flatpickr.setDate(App.Pages.Calendar.getSelectionEndDate(info));
messageModal.dispose();
- }
- }
+ },
+ },
];
App.Utils.Message.show(lang('add_new_event'), lang('what_kind_of_event'), buttons);
@@ -1863,6 +1863,6 @@ App.Utils.CalendarTableView = (function () {
}
return {
- initialize
+ initialize,
};
})();
diff --git a/assets/js/utils/date.js b/assets/js/utils/date.js
index 6fb71b5d..5188cf38 100644
--- a/assets/js/utils/date.js
+++ b/assets/js/utils/date.js
@@ -193,6 +193,6 @@ window.App.Utils.Date = (function () {
format,
getWeekdayId,
sortWeekDictionary,
- getWeekdayName
+ getWeekdayName,
};
})();
diff --git a/assets/js/utils/file.js b/assets/js/utils/file.js
index 0938f588..fce0ba60 100644
--- a/assets/js/utils/file.js
+++ b/assets/js/utils/file.js
@@ -32,6 +32,6 @@ window.App.Utils.File = (function () {
}
return {
- toBase64
+ toBase64,
};
})();
diff --git a/assets/js/utils/http.js b/assets/js/utils/http.js
index a16334de..fd774800 100644
--- a/assets/js/utils/http.js
+++ b/assets/js/utils/http.js
@@ -31,11 +31,11 @@ window.App.Utils.Http = (function () {
mode: 'cors',
credentials: 'same-origin',
headers: {
- 'Content-Type': 'application/json'
+ 'Content-Type': 'application/json',
},
redirect: 'follow',
referrer: 'no-referrer',
- body: data ? JSON.stringify(data) : undefined
+ body: data ? JSON.stringify(data) : undefined,
})
.then((response) => {
if (!response.ok) {
@@ -86,7 +86,7 @@ window.App.Utils.Http = (function () {
method,
redirect: 'follow',
referrer: 'no-referrer',
- body: formData
+ body: formData,
})
.then((response) => {
if (!response.ok) {
@@ -133,10 +133,10 @@ window.App.Utils.Http = (function () {
mode: 'cors',
credentials: 'same-origin',
headers: {
- 'Content-Type': 'application/json'
+ 'Content-Type': 'application/json',
},
redirect: 'follow',
- referrer: 'no-referrer'
+ referrer: 'no-referrer',
})
.then((response) => {
if (!response.ok) {
@@ -171,6 +171,6 @@ window.App.Utils.Http = (function () {
return {
request,
upload,
- download
+ download,
};
})();
diff --git a/assets/js/utils/lang.js b/assets/js/utils/lang.js
index 95e2ef30..296336ec 100644
--- a/assets/js/utils/lang.js
+++ b/assets/js/utils/lang.js
@@ -31,9 +31,9 @@ window.App.Utils.Lang = (function () {
$('', {
'class': 'language',
'data-language': availableLanguage,
- 'text': App.Utils.String.upperCaseFirstLetter(availableLanguage)
- })
- )
+ 'text': App.Utils.String.upperCaseFirstLetter(availableLanguage),
+ }),
+ ),
});
$target.popover({
@@ -42,7 +42,7 @@ window.App.Utils.Lang = (function () {
content: $languageList[0],
html: true,
container: 'body',
- trigger: 'manual'
+ trigger: 'manual',
});
$target.on('click', function (event) {
@@ -73,6 +73,6 @@ window.App.Utils.Lang = (function () {
}
return {
- enableLanguageSelection
+ enableLanguageSelection,
};
})();
diff --git a/assets/js/utils/message.js b/assets/js/utils/message.js
index dcbf7e12..54045cd3 100644
--- a/assets/js/utils/message.js
+++ b/assets/js/utils/message.js
@@ -59,7 +59,11 @@ window.App.Utils.Message = (function () {
${title}
- ${isDismissible ? '' : ''}
+ ${
+ isDismissible
+ ? ''
+ : ''
+ }
@@ -105,6 +109,6 @@ window.App.Utils.Message = (function () {
}
return {
- show
+ show,
};
})();
diff --git a/assets/js/utils/string.js b/assets/js/utils/string.js
index 38b13fa5..70ca03f4 100644
--- a/assets/js/utils/string.js
+++ b/assets/js/utils/string.js
@@ -43,6 +43,6 @@ window.App.Utils.String = (function () {
return {
upperCaseFirstLetter,
- escapeHtml
+ escapeHtml,
};
})();
diff --git a/assets/js/utils/ui.js b/assets/js/utils/ui.js
index 3599cbcf..882be9b0 100644
--- a/assets/js/utils/ui.js
+++ b/assets/js/utils/ui.js
@@ -68,7 +68,7 @@ window.App.Utils.UI = (function () {
lang('wednesday_short'),
lang('thursday_short'),
lang('friday_short'),
- lang('saturday_short')
+ lang('saturday_short'),
],
longhand: [
lang('sunday'),
@@ -77,7 +77,7 @@ window.App.Utils.UI = (function () {
lang('wednesday'),
lang('thursday'),
lang('friday'),
- lang('saturday')
+ lang('saturday'),
],
},
months: {
@@ -107,7 +107,7 @@ window.App.Utils.UI = (function () {
lang('september'),
lang('october'),
lang('november'),
- lang('december')
+ lang('december'),
],
},
daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
@@ -115,8 +115,7 @@ window.App.Utils.UI = (function () {
ordinal: function (nth) {
const s = nth % 100;
- if (s > 3 && s < 21)
- return 'th';
+ if (s > 3 && s < 21) return 'th';
switch (s % 10) {
case 1:
return 'st';
@@ -138,10 +137,9 @@ window.App.Utils.UI = (function () {
hourAriaLabel: lang('hour'),
minuteAriaLabel: lang('minute'),
time_24hr: false,
- }
+ };
}
-
/**
* Initialize the date time picker component.
*
@@ -158,7 +156,7 @@ window.App.Utils.UI = (function () {
dateFormat: `${getDateFormat()} ${getTimeFormat()}`,
time_24hr: vars('time_format') === 'military',
locale: getFlatpickrLocale(),
- ...params
+ ...params,
});
}
@@ -176,7 +174,7 @@ window.App.Utils.UI = (function () {
dateFormat: getDateFormat(),
locale: getFlatpickrLocale(),
static: true,
- ...params
+ ...params,
});
}
@@ -197,7 +195,7 @@ window.App.Utils.UI = (function () {
time_24hr: vars('time_format') === 'military',
locale: getFlatpickrLocale(),
static: true,
- ...params
+ ...params,
});
}
@@ -234,7 +232,7 @@ window.App.Utils.UI = (function () {
*/
function getDatetimepickerValue($target) {
if (!$target?.length) {
- throw new Error('Empty $target argument provided.')
+ throw new Error('Empty $target argument provided.');
}
return $target[0]._flatpickr.selectedDates[0];
@@ -248,7 +246,7 @@ window.App.Utils.UI = (function () {
*/
function setDatetimepickerValue($target, value) {
if (!$target?.length) {
- throw new Error('Empty $target argument provided.')
+ throw new Error('Empty $target argument provided.');
}
return $target[0]._flatpickr.setDate(value);
diff --git a/assets/js/utils/url.js b/assets/js/utils/url.js
index c73a1368..434f2569 100644
--- a/assets/js/utils/url.js
+++ b/assets/js/utils/url.js
@@ -69,6 +69,6 @@ window.App.Utils.Url = (function () {
return {
baseUrl,
siteUrl,
- queryParam
+ queryParam,
};
})();
diff --git a/assets/js/utils/validation.js b/assets/js/utils/validation.js
index cd302368..7f301cf4 100644
--- a/assets/js/utils/validation.js
+++ b/assets/js/utils/validation.js
@@ -44,6 +44,6 @@ window.App.Utils.Validation = (function () {
return {
email,
- phone
+ phone,
};
})();
diff --git a/assets/js/utils/working_plan.js b/assets/js/utils/working_plan.js
index 9158e4ad..0b670e70 100755
--- a/assets/js/utils/working_plan.js
+++ b/assets/js/utils/working_plan.js
@@ -72,40 +72,40 @@ App.Utils.WorkingPlan = (function () {
$('', {
'class': 'form-check-input',
'type': 'checkbox',
- 'id': index
+ 'id': index,
}),
$('', {
'class': 'form-check-label',
'text': dayDisplayName,
- 'for': index
- })
- ]
- })
- ]
+ 'for': index,
+ }),
+ ],
+ }),
+ ],
}),
$('
| ', {
'html': [
$('
', {
'id': index + '-start',
- 'class': 'work-start form-control form-control-sm'
- })
- ]
+ 'class': 'work-start form-control form-control-sm',
+ }),
+ ],
}),
$('
| ', {
'html': [
$('
', {
'id': index + '-end',
- 'class': 'work-end form-control form-control-sm'
- })
- ]
- })
- ]
+ 'class': 'work-end form-control form-control-sm',
+ }),
+ ],
+ }),
+ ],
}).appendTo('.working-plan tbody');
if (workingDay) {
$('#' + index).prop('checked', true);
$('#' + index + '-start').val(
- moment(workingDay.start, 'HH:mm').format(timeFormat).toLowerCase()
+ moment(workingDay.start, 'HH:mm').format(timeFormat).toLowerCase(),
);
$('#' + index + '-end').val(moment(workingDay.end, 'HH:mm').format(timeFormat).toLowerCase());
@@ -120,15 +120,15 @@ App.Utils.WorkingPlan = (function () {
'html': [
$('
| ', {
'class': 'break-day editable',
- 'text': dayDisplayName
+ 'text': dayDisplayName,
}),
$('
| ', {
'class': 'break-start editable',
- 'text': moment(workingDayBreak.start, 'HH:mm').format(timeFormat).toLowerCase()
+ 'text': moment(workingDayBreak.start, 'HH:mm').format(timeFormat).toLowerCase(),
}),
$('
| ', {
'class': 'break-end editable',
- 'text': moment(workingDayBreak.end, 'HH:mm').format(timeFormat).toLowerCase()
+ 'text': moment(workingDayBreak.end, 'HH:mm').format(timeFormat).toLowerCase(),
}),
$('
| ', {
'html': [
@@ -138,9 +138,9 @@ App.Utils.WorkingPlan = (function () {
'title': lang('edit'),
'html': [
$('
', {
- 'class': 'fas fa-edit'
- })
- ]
+ 'class': 'fas fa-edit',
+ }),
+ ],
}),
$('
', {
'type': 'button',
@@ -148,9 +148,9 @@ App.Utils.WorkingPlan = (function () {
'title': lang('delete'),
'html': [
$('
', {
- 'class': 'fas fa-trash-alt'
- })
- ]
+ 'class': 'fas fa-trash-alt',
+ }),
+ ],
}),
$('
', {
'type': 'button',
@@ -158,9 +158,9 @@ App.Utils.WorkingPlan = (function () {
'title': lang('save'),
'html': [
$('
', {
- 'class': 'fas fa-check-circle'
- })
- ]
+ 'class': 'fas fa-check-circle',
+ }),
+ ],
}),
$('
', {
'type': 'button',
@@ -168,13 +168,13 @@ App.Utils.WorkingPlan = (function () {
'title': lang('cancel'),
'html': [
$('
', {
- 'class': 'fas fa-ban'
- })
- ]
- })
- ]
- })
- ]
+ 'class': 'fas fa-ban',
+ }),
+ ],
+ }),
+ ],
+ }),
+ ],
}).appendTo('.breaks tbody');
});
} else {
@@ -182,7 +182,7 @@ App.Utils.WorkingPlan = (function () {
$('#' + index + '-start').prop('disabled', true);
$('#' + index + '-end').prop('disabled', true);
}
- }.bind(this)
+ }.bind(this),
);
// Make break cells editable.
@@ -200,7 +200,7 @@ App.Utils.WorkingPlan = (function () {
const workingPlanException = workingPlanExceptions[date];
this.renderWorkingPlanExceptionRow(date, workingPlanException).appendTo(
- '.working-plan-exceptions tbody'
+ '.working-plan-exceptions tbody',
);
}
}
@@ -244,8 +244,8 @@ App.Utils.WorkingPlan = (function () {
if (!this.enableSubmit) {
return false; // disable Enter button
}
- }.bind(this)
- }
+ }.bind(this),
+ },
);
}
@@ -269,12 +269,12 @@ App.Utils.WorkingPlan = (function () {
submit: $('
', {
'type': 'button',
'class': 'd-none submit-editable',
- 'text': lang('save')
+ 'text': lang('save'),
}).get(0).outerHTML,
cancel: $('
', {
'type': 'button',
'class': 'd-none cancel-editable',
- 'text': lang('cancel')
+ 'text': lang('cancel'),
}).get(0).outerHTML,
onblur: 'ignore',
onreset: function () {
@@ -286,8 +286,8 @@ App.Utils.WorkingPlan = (function () {
if (!this.enableSubmit) {
return false; // disable Enter button
}
- }.bind(this)
- }
+ }.bind(this),
+ },
);
}
@@ -301,27 +301,27 @@ App.Utils.WorkingPlan = (function () {
*/
renderWorkingPlanExceptionRow(date, workingPlanException) {
const timeFormat = vars('time_format') === 'regular' ? 'h:mm a' : 'HH:mm';
-
- const start = workingPlanException?.start;
- const end = workingPlanException?.end;
+
+ const start = workingPlanException?.start;
+ const end = workingPlanException?.end;
return $('
|
', {
'data': {
'date': date,
- 'workingPlanException': workingPlanException
+ 'workingPlanException': workingPlanException,
},
'html': [
$('
| ', {
'class': 'working-plan-exception-date',
- 'text': App.Utils.Date.format(date, vars('date_format'), vars('time_format'), false)
+ 'text': App.Utils.Date.format(date, vars('date_format'), vars('time_format'), false),
}),
$('
| ', {
'class': 'working-plan-exception--start',
- 'text': start ? moment(start, 'HH:mm').format(timeFormat).toLowerCase() : '-'
+ 'text': start ? moment(start, 'HH:mm').format(timeFormat).toLowerCase() : '-',
}),
$('
| ', {
'class': 'working-plan-exception--end',
- 'text': end ? moment(end, 'HH:mm').format(timeFormat).toLowerCase() : '-'
+ 'text': end ? moment(end, 'HH:mm').format(timeFormat).toLowerCase() : '-',
}),
$('
| ', {
'html': [
@@ -331,9 +331,9 @@ App.Utils.WorkingPlan = (function () {
'title': lang('edit'),
'html': [
$('
', {
- 'class': 'fas fa-edit'
- })
- ]
+ 'class': 'fas fa-edit',
+ }),
+ ],
}),
$('
', {
'type': 'button',
@@ -341,13 +341,13 @@ App.Utils.WorkingPlan = (function () {
'title': lang('delete'),
'html': [
$('
', {
- 'class': 'fas fa-trash-alt'
- })
- ]
- })
- ]
- })
- ]
+ 'class': 'fas fa-trash-alt',
+ }),
+ ],
+ }),
+ ],
+ }),
+ ],
});
}
@@ -359,7 +359,7 @@ App.Utils.WorkingPlan = (function () {
* Event: Day Checkbox "Click"
*
* Enable or disable the time selection for each day.
- *
+ *
* @param {jQuery.Event} event
*/
$('.working-plan tbody').on('click', 'input:checkbox', (event) => {
@@ -388,78 +388,75 @@ App.Utils.WorkingPlan = (function () {
* A new row is added on the table and the user can enter the new break
* data. After that he can either press the save or cancel button.
*/
- $('.add-break').on(
- 'click',
- () => {
- const timeFormat = vars('time_format') === 'regular' ? 'h:mm a' : 'HH:mm';
+ $('.add-break').on('click', () => {
+ const timeFormat = vars('time_format') === 'regular' ? 'h:mm a' : 'HH:mm';
- const $newBreak = $('
|
', {
- 'html': [
- $('
| ', {
- 'class': 'break-day editable',
- 'text': lang('sunday')
- }),
- $('
| ', {
- 'class': 'break-start editable',
- 'text': moment('12:00', 'HH:mm').format(timeFormat).toLowerCase()
- }),
- $('
| ', {
- 'class': 'break-end editable',
- 'text': moment('14:00', 'HH:mm').format(timeFormat).toLowerCase()
- }),
- $('
| ', {
- 'html': [
- $('
', {
- 'type': 'button',
- 'class': 'btn btn-outline-secondary btn-sm edit-break',
- 'title': lang('edit'),
- 'html': [
- $('
', {
- 'class': 'fas fa-edit'
- })
- ]
- }),
- $('
', {
- 'type': 'button',
- 'class': 'btn btn-outline-secondary btn-sm delete-break',
- 'title': lang('delete'),
- 'html': [
- $('
', {
- 'class': 'fas fa-trash-alt'
- })
- ]
- }),
- $('
', {
- 'type': 'button',
- 'class': 'btn btn-outline-secondary btn-sm save-break d-none',
- 'title': lang('save'),
- 'html': [
- $('
', {
- 'class': 'fas fa-check-circle'
- })
- ]
- }),
- $('
', {
- 'type': 'button',
- 'class': 'btn btn-outline-secondary btn-sm cancel-break d-none',
- 'title': lang('cancel'),
- 'html': [
- $('
', {
- 'class': 'fas fa-ban'
- })
- ]
- })
- ]
- })
- ]
- }).appendTo('.breaks tbody');
+ const $newBreak = $('
|
', {
+ 'html': [
+ $('
| ', {
+ 'class': 'break-day editable',
+ 'text': lang('sunday'),
+ }),
+ $('
| ', {
+ 'class': 'break-start editable',
+ 'text': moment('12:00', 'HH:mm').format(timeFormat).toLowerCase(),
+ }),
+ $('
| ', {
+ 'class': 'break-end editable',
+ 'text': moment('14:00', 'HH:mm').format(timeFormat).toLowerCase(),
+ }),
+ $('
| ', {
+ 'html': [
+ $('
', {
+ 'type': 'button',
+ 'class': 'btn btn-outline-secondary btn-sm edit-break',
+ 'title': lang('edit'),
+ 'html': [
+ $('
', {
+ 'class': 'fas fa-edit',
+ }),
+ ],
+ }),
+ $('
', {
+ 'type': 'button',
+ 'class': 'btn btn-outline-secondary btn-sm delete-break',
+ 'title': lang('delete'),
+ 'html': [
+ $('
', {
+ 'class': 'fas fa-trash-alt',
+ }),
+ ],
+ }),
+ $('
', {
+ 'type': 'button',
+ 'class': 'btn btn-outline-secondary btn-sm save-break d-none',
+ 'title': lang('save'),
+ 'html': [
+ $('
', {
+ 'class': 'fas fa-check-circle',
+ }),
+ ],
+ }),
+ $('
', {
+ 'type': 'button',
+ 'class': 'btn btn-outline-secondary btn-sm cancel-break d-none',
+ 'title': lang('cancel'),
+ 'html': [
+ $('
', {
+ 'class': 'fas fa-ban',
+ }),
+ ],
+ }),
+ ],
+ }),
+ ],
+ }).appendTo('.breaks tbody');
- // Bind editable and event handlers.
- this.editableDayCell($newBreak.find('.break-day'));
- this.editableTimeCell($newBreak.find('.break-start, .break-end'));
- $newBreak.find('.edit-break').trigger('click');
- }
- );
+ // Bind editable and event handlers.
+ this.editableDayCell($newBreak.find('.break-day'));
+ this.editableTimeCell($newBreak.find('.break-start, .break-end'));
+ $newBreak.find('.edit-break').trigger('click');
+ });
/**
* Event: Edit Break Button "Click"
@@ -483,10 +480,7 @@ App.Utils.WorkingPlan = (function () {
$tr.children().trigger('edit');
- App.Utils.UI.initializeTimepicker(
- $tr
- .find('.break-start input, .break-end input')
- );
+ App.Utils.UI.initializeTimepicker($tr.find('.break-start input, .break-end input'));
$tr.find('.break-day select').focus();
@@ -514,20 +508,16 @@ App.Utils.WorkingPlan = (function () {
*
* @param {jQuery.Event} event
*/
- $(document).on(
- 'click',
- '.cancel-break',
- (event) => {
- const element = event.target;
- const $modifiedRow = $(element).closest('tr');
- this.enableCancel = true;
- $modifiedRow.find('.cancel-editable').trigger('click');
- this.enableCancel = false;
+ $(document).on('click', '.cancel-break', (event) => {
+ const element = event.target;
+ const $modifiedRow = $(element).closest('tr');
+ this.enableCancel = true;
+ $modifiedRow.find('.cancel-editable').trigger('click');
+ this.enableCancel = false;
- $modifiedRow.find('.edit-break, .delete-break').removeClass('d-none');
- $modifiedRow.find('.save-break, .cancel-break').addClass('d-none');
- }
- );
+ $modifiedRow.find('.edit-break, .delete-break').removeClass('d-none');
+ $modifiedRow.find('.save-break, .cancel-break').addClass('d-none');
+ });
/**
* Event: Save Break Button "Click"
@@ -536,68 +526,58 @@ App.Utils.WorkingPlan = (function () {
*
* @param {jQuery.Event} event
*/
- $(document).on(
- 'click',
- '.save-break',
- (event) => {
- // Break's start time must always be prior to break's end.
- const element = event.target;
+ $(document).on('click', '.save-break', (event) => {
+ // Break's start time must always be prior to break's end.
+ const element = event.target;
- const $modifiedRow = $(element).closest('tr');
+ const $modifiedRow = $(element).closest('tr');
- const startMoment = moment($modifiedRow.find('.break-start input').val(), 'HH:mm');
+ const startMoment = moment($modifiedRow.find('.break-start input').val(), 'HH:mm');
- const endMoment = moment($modifiedRow.find('.break-end input').val(), 'HH:mm');
+ const endMoment = moment($modifiedRow.find('.break-end input').val(), 'HH:mm');
- if (startMoment.isAfter(endMoment)) {
- $modifiedRow.find('.break-end input').val(
- startMoment
- .add(1, 'hour')
- .format(vars('time_format') === 'regular' ? 'h:mm a' : 'HH:mm')
- .toLowerCase()
- );
- }
-
- this.enableSubmit = true;
- $modifiedRow.find('.editable .submit-editable').trigger('click');
- this.enableSubmit = false;
-
- $modifiedRow.find('.save-break, .cancel-break').addClass('d-none');
- $modifiedRow.find('.edit-break, .delete-break').removeClass('d-none');
+ if (startMoment.isAfter(endMoment)) {
+ $modifiedRow.find('.break-end input').val(
+ startMoment
+ .add(1, 'hour')
+ .format(vars('time_format') === 'regular' ? 'h:mm a' : 'HH:mm')
+ .toLowerCase(),
+ );
}
- );
+
+ this.enableSubmit = true;
+ $modifiedRow.find('.editable .submit-editable').trigger('click');
+ this.enableSubmit = false;
+
+ $modifiedRow.find('.save-break, .cancel-break').addClass('d-none');
+ $modifiedRow.find('.edit-break, .delete-break').removeClass('d-none');
+ });
/**
* Event: Add Working Plan Exception Button "Click"
*
* A new row is added on the table and the user can enter the new working plan exception.
*/
- $(document).on(
- 'click',
- '.add-working-plan-exception',
- () =>{
- App.Components.WorkingPlanExceptionsModal.add().done(
- (date, workingPlanException) => {
- let $tr = null;
+ $(document).on('click', '.add-working-plan-exception', () => {
+ App.Components.WorkingPlanExceptionsModal.add().done((date, workingPlanException) => {
+ let $tr = null;
- $('.working-plan-exceptions tbody tr').each((index, tr) => {
- if (date === $(tr).data('date')) {
- $tr = $(tr);
- return false;
- }
- });
-
- let $newTr = this.renderWorkingPlanExceptionRow(date, workingPlanException);
-
- if ($tr) {
- $tr.replaceWith($newTr);
- } else {
- $newTr.appendTo('.working-plan-exceptions tbody');
- }
+ $('.working-plan-exceptions tbody tr').each((index, tr) => {
+ if (date === $(tr).data('date')) {
+ $tr = $(tr);
+ return false;
}
- );
- }
- );
+ });
+
+ let $newTr = this.renderWorkingPlanExceptionRow(date, workingPlanException);
+
+ if ($tr) {
+ $tr.replaceWith($newTr);
+ } else {
+ $newTr.appendTo('.working-plan-exceptions tbody');
+ }
+ });
+ });
/**
* Event: Edit working plan exception Button "Click"
@@ -606,21 +586,17 @@ App.Utils.WorkingPlan = (function () {
*
* @param {jQuery.Event} event
*/
- $(document).on(
- 'click',
- '.edit-working-plan-exception',
- (event) => {
- const $tr = $(event.target).closest('tr');
- const date = $tr.data('date');
- const workingPlanException = $tr.data('workingPlanException');
+ $(document).on('click', '.edit-working-plan-exception', (event) => {
+ const $tr = $(event.target).closest('tr');
+ const date = $tr.data('date');
+ const workingPlanException = $tr.data('workingPlanException');
- App.Components.WorkingPlanExceptionsModal.edit(date, workingPlanException).done(
- (date, workingPlanException) => {
- $tr.replaceWith(this.renderWorkingPlanExceptionRow(date, workingPlanException));
- }
- );
- }
- );
+ App.Components.WorkingPlanExceptionsModal.edit(date, workingPlanException).done(
+ (date, workingPlanException) => {
+ $tr.replaceWith(this.renderWorkingPlanExceptionRow(date, workingPlanException));
+ },
+ );
+ });
/**
* Event: Delete working plan exception Button "Click"
@@ -644,47 +620,42 @@ App.Utils.WorkingPlan = (function () {
const timeFormat = vars('time_format') === 'regular' ? 'h:mm a' : 'HH:mm';
- $('.working-plan input:checkbox').each(
- (index, checkbox) => {
- const id = $(checkbox).attr('id');
- if ($(checkbox).prop('checked') === true) {
- workingPlan[id] = {
- start: moment($('#' + id + '-start').val(), timeFormat).format('HH:mm'),
- end: moment($('#' + id + '-end').val(), timeFormat).format('HH:mm'),
- breaks: []
- };
+ $('.working-plan input:checkbox').each((index, checkbox) => {
+ const id = $(checkbox).attr('id');
+ if ($(checkbox).prop('checked') === true) {
+ workingPlan[id] = {
+ start: moment($('#' + id + '-start').val(), timeFormat).format('HH:mm'),
+ end: moment($('#' + id + '-end').val(), timeFormat).format('HH:mm'),
+ breaks: [],
+ };
- $('.breaks tr').each(
- (index, tr) => {
- const day = this.convertDayToValue($(tr).find('.break-day').text());
+ $('.breaks tr').each((index, tr) => {
+ const day = this.convertDayToValue($(tr).find('.break-day').text());
- if (day === id) {
- const start = $(tr).find('.break-start').text();
- const end = $(tr).find('.break-end').text();
+ if (day === id) {
+ const start = $(tr).find('.break-start').text();
+ const end = $(tr).find('.break-end').text();
- workingPlan[id].breaks.push({
- start: moment(
- start,
- vars('time_format') === 'regular' ? 'h:mm a' : 'HH:mm'
- ).format('HH:mm'),
- end: moment(end, vars('time_format') === 'regular' ? 'h:mm a' : 'HH:mm').format(
- 'HH:mm'
- )
- });
- }
- }
- );
+ workingPlan[id].breaks.push({
+ start: moment(start, vars('time_format') === 'regular' ? 'h:mm a' : 'HH:mm').format(
+ 'HH:mm',
+ ),
+ end: moment(end, vars('time_format') === 'regular' ? 'h:mm a' : 'HH:mm').format(
+ 'HH:mm',
+ ),
+ });
+ }
+ });
- // Sort breaks increasingly by hour within day
- workingPlan[id].breaks.sort((break1, break2) => {
- // We can do a direct string comparison since we have time based on 24 hours clock.
- return break1.start.localeCompare(break2.start);
- });
- } else {
- workingPlan[id] = null;
- }
+ // Sort breaks increasingly by hour within day
+ workingPlan[id].breaks.sort((break1, break2) => {
+ // We can do a direct string comparison since we have time based on 24 hours clock.
+ return break1.start.localeCompare(break2.start);
+ });
+ } else {
+ workingPlan[id] = null;
}
- );
+ });
return workingPlan;
}
@@ -715,30 +686,26 @@ App.Utils.WorkingPlan = (function () {
disabled = disabled || false;
if (disabled === false) {
- App.Utils.UI.initializeTimepicker(
- $('.working-plan input:text'),
- {
- onChange: (selectedDates, dateStr, instance) => {
- const startMoment = moment(selectedDates[0]);
+ App.Utils.UI.initializeTimepicker($('.working-plan input:text'), {
+ onChange: (selectedDates, dateStr, instance) => {
+ const startMoment = moment(selectedDates[0]);
- const $workEnd = $(instance.input).closest('tr').find('.work-end');
+ const $workEnd = $(instance.input).closest('tr').find('.work-end');
- const endMoment = moment($workEnd[0]._flatpickr.selectedDates[0])
+ const endMoment = moment($workEnd[0]._flatpickr.selectedDates[0]);
- if (startMoment > endMoment) {
- $workEnd[0]._flatpickr.setDate(startMoment.add(1, 'hour').toDate());
- }
+ if (startMoment > endMoment) {
+ $workEnd[0]._flatpickr.setDate(startMoment.add(1, 'hour').toDate());
}
- }
- )
+ },
+ });
}
}
/**
* Reset the current plan back to the company's default working plan.
*/
- reset() {
- }
+ reset() {}
/**
* This is necessary for translated days.