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 d070c933..1a7106e5 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 = ''; } @@ -136,7 +137,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; /* |-------------------------------------------------------------------------- @@ -196,8 +197,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 @@ -290,9 +291,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; /* |-------------------------------------------------------------------------- @@ -308,7 +309,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; /* |-------------------------------------------------------------------------- @@ -322,7 +323,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; @@ -345,7 +346,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; /* |-------------------------------------------------------------------------- @@ -370,7 +371,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; /* |-------------------------------------------------------------------------- @@ -394,7 +395,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..10cba132 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'); @@ -290,6 +290,12 @@ class Booking extends EA_Controller public function register() { try { + $disable_booking = setting('disable_booking'); + + if ($disable_booking) { + abort(403); + } + $post_data = request('post_data'); $captcha = request('captcha'); $appointment = $post_data['appointment']; @@ -335,7 +341,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 +353,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 +376,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 +405,7 @@ class Booking extends EA_Controller 'state', 'zip_code', 'timezone', - 'language' + 'language', ]); $customer_id = $this->customers_model->save($customer); @@ -424,7 +430,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 +441,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 +452,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 +510,7 @@ class Booking extends EA_Controller $date, $service, $provider, - $exclude_appointment_id + $exclude_appointment_id, ); $is_still_available = false; @@ -574,6 +580,12 @@ class Booking extends EA_Controller public function get_available_hours() { try { + $disable_booking = setting('disable_booking'); + + if ($disable_booking) { + abort(403); + } + $provider_id = request('provider_id'); $service_id = request('service_id'); $selected_date = request('selected_date'); @@ -610,7 +622,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 +640,7 @@ class Booking extends EA_Controller $selected_date, $service, $provider, - $exclude_appointment_id + $exclude_appointment_id, ); } @@ -650,6 +662,12 @@ class Booking extends EA_Controller public function get_unavailable_dates() { try { + $disable_booking = setting('disable_booking'); + + if ($disable_booking) { + abort(403); + } + $provider_id = request('provider_id'); $service_id = request('service_id'); $appointment_id = request('appointment_id'); @@ -684,7 +702,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 +718,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..950ac461 100755 --- a/application/controllers/Booking_cancellation.php +++ b/application/controllers/Booking_cancellation.php @@ -49,6 +49,12 @@ class Booking_cancellation extends EA_Controller public function of(string $appointment_hash) { try { + $disable_booking = setting('disable_booking'); + + if ($disable_booking) { + abort(403); + } + $cancellation_reason = request('cancellation_reason'); if ($this->input->method() !== 'post' || empty($cancellation_reason)) { @@ -65,7 +71,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 +92,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 +105,7 @@ class Booking_cancellation extends EA_Controller $provider, $customer, $settings, - $cancellation_reason + $cancellation_reason, ); $this->webhooks_client->trigger(WEBHOOK_APPOINTMENT_DELETE, $appointment); @@ -111,7 +117,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 32cd9014..b2462ba7 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', ]); } @@ -135,7 +135,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(), ]); } @@ -150,7 +150,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 e442f625..8d0386e0 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 @@You can now use the latest = branding("software", "name") ?> version.
- + = lang('backend_section') ?> 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': [ $('@@ -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, + }), + ], + }), + ], }), $('