diff --git a/CHANGELOG.md b/CHANGELOG.md index 93dd100a..18f56fe2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ developers to maintain and readjust their custom modifications on the main proje The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [1.3.2] - Unreleased +## [1.3.2] ## Fixed @@ -14,7 +14,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - #485: Make REST API search check with "q" parameter case insensitive. - #489: REST API response headers must use the Content-Type application/json value. - #500: Performance optimization in backend calendar page, after the user clicks the insert appointment button. - +- #510: Providers should not be able to create appointments for other providers in the backend calendar page. +- #512: Only show appointments of the currently logged in provider. + ## [1.3.1] ### Added diff --git a/doc/docker.md b/doc/docker.md index c003cab0..7f8dd398 100644 --- a/doc/docker.md +++ b/doc/docker.md @@ -39,6 +39,6 @@ class Config { } ``` -*This document applies to Easy!Appointments v1.3.1.* +*This document applies to Easy!Appointments v1.3.2.* [Back](readme.md) diff --git a/doc/faq.md b/doc/faq.md index 80e80ff1..82ebfa96 100644 --- a/doc/faq.md +++ b/doc/faq.md @@ -54,6 +54,6 @@ You get this warning because PHP is not configured with a timezone setting. This `date_default_timezone_set('America/Los_Angeles'); // Use your own timezone string.` -*This document applies to Easy!Appointments v1.3.1.* +*This document applies to Easy!Appointments v1.3.2.* [Back](readme.md) diff --git a/doc/get-involved.md b/doc/get-involved.md index fd59790d..aaf48e80 100644 --- a/doc/get-involved.md +++ b/doc/get-involved.md @@ -20,6 +20,6 @@ You are more than welcome to help with the translation progress of the user inte It would be much appreciated if you would take 5 minutes of your time to fill this small form on your experience with Easy!Appointments. User feedback is very important and will help with the future planning of the project. Fill the [E!A Feedback Form](https://docs.google.com/forms/d/15dw1jl7lUgw4q-XXMn13Gx_e8zJxAiyWYMOdqtZqIHU/viewform). -*This document applies to Easy!Appointments v1.3.1.* +*This document applies to Easy!Appointments v1.3.2.* [Back](readme.md) diff --git a/doc/google-calendar-sync.md b/doc/google-calendar-sync.md index 8e2ccb55..214a1856 100644 --- a/doc/google-calendar-sync.md +++ b/doc/google-calendar-sync.md @@ -49,6 +49,6 @@ Google Developers – https://developers.google.com/google-apps/calendar E!A Support Group – https://groups.google.com/forum/#!forum/easy-appointments -*This document applies to Easy!Appointments v1.3.1.* +*This document applies to Easy!Appointments v1.3.2.* [Back](readme.md) diff --git a/doc/installation-guide.md b/doc/installation-guide.md index 468fbef9..0f25c405 100644 --- a/doc/installation-guide.md +++ b/doc/installation-guide.md @@ -8,7 +8,7 @@ Easy!Appointments is a web appointment scheduler that can be installed and run i ### Installation There are 6 steps you must follow during the installation process. - 1. **Make sure that your server has at least the following applications/tools installed: Apache(v2.4), PHP(v5.6) and MySQL(v5.5).** Easy!Appointments needs these programs to run. Most of the web hosting companies provide these tools within their Linux hosting plans. If you want to install Easy!Appointments on your local server use one of the pre-made bundles available on the web (XAMPP, MAMP, WAMP ...), all of which are free to use. If you plan to use the Google Calendar synchronization you will need the **php_curl** extension installed and enabled as well. + 1. **Make sure that your server has at least the following applications/tools installed: Apache(v2.4), PHP(v5.6) and MySQL(v5.7).** Easy!Appointments needs these programs to run. Most of the web hosting companies provide these tools within their Linux hosting plans. If you want to install Easy!Appointments on your local server use one of the pre-made bundles available on the web (XAMPP, MAMP, WAMP ...), all of which are free to use. If you plan to use the Google Calendar synchronization you will need the **php_curl** extension installed and enabled as well. 2. **Create a new database (or use an existing one).** The database is necessary for storing the system data. Therefore your hosting plan must include at least one MySQL database. You must also get the database administration credentials because they will be needed later on. 3. **Upload the Easy!Appointments source files to your server.** You can place the files into a directory with named "easyappointments" or "appointments" or "book" etc. Make sure that you mark the Easy!Appointments folder URL because it will be needed in the following step. For example if the system files are placed in the this directory ".../httpdocs/easyappointments/" then the URL to this folder will be "http://your-domain.com/easyappointments". This URL will be needed in the following steps. 4. **Ensure that the "storage" directory is writable.** Session information, logs and any other kind of files will land into the "storage" directory so make sure that it has the correct permissions and that is writable. @@ -29,6 +29,6 @@ Finally just add a link in your website that points to your Easy!Appointments in Happy Bookin'! -*This document applies to Easy!Appointments v1.3.1.* +*This document applies to Easy!Appointments v1.3.2.* [Back](readme.md) diff --git a/doc/manage-translations.md b/doc/manage-translations.md index 7a9e4269..62569b2c 100644 --- a/doc/manage-translations.md +++ b/doc/manage-translations.md @@ -14,6 +14,6 @@ Easy!Appointments is based upon CodeIgniter (PHP Framework) and it uses its buil Follow these steps in order to add or adjust your translations and modify the message of the user interface of Easy!Appointments. If you want contribute to the translation process of Easy!Appointments please read the [Get Involved](https://github.com/alextselegidis/easyappointments/wiki/Get-Involved!) wiki page for more information. Please share your translations with the user community. -*This document applies to Easy!Appointments v1.3.1.* +*This document applies to Easy!Appointments v1.3.2.* [Back](readme.md) diff --git a/doc/readme.md b/doc/readme.md index 7e38ac41..2bd9b6d1 100644 --- a/doc/readme.md +++ b/doc/readme.md @@ -10,4 +10,4 @@ Welcome to the documentation pages of Easy!Appointments. Navigate through the av - [Docker](docker.md) - [FAQ](faq.md) -*This document applies to Easy!Appointments v1.3.1.* +*This document applies to Easy!Appointments v1.3.2.* diff --git a/doc/rest-api.md b/doc/rest-api.md index 07ff031a..45cb04fe 100644 --- a/doc/rest-api.md +++ b/doc/rest-api.md @@ -443,6 +443,6 @@ fastcgi_param PHP_AUTH_PW $http_authorization; [[Source]](http://serverfault.com/a/520943) -*This document applies to Easy!Appointments v1.3.1.* +*This document applies to Easy!Appointments v1.3.2.* [Back](readme.md) diff --git a/doc/update-guide.md b/doc/update-guide.md index 4e698035..ca24db11 100644 --- a/doc/update-guide.md +++ b/doc/update-guide.md @@ -16,6 +16,6 @@ Version v1.2 introduces two new folders in the root directory of the project, th Many core files were changed in v1.1 and it would be better if you replace all the Easy!Appointments files of version 1.0 with the new ones. Use the data of the old `configuration.php` file in the new `config.php` and open the `http://url-to-ea-installation/index.php/backend/update` as already mentioned. Your new version should work just fine! -*This document applies to Easy!Appointments v1.3.1.* +*This document applies to Easy!Appointments v1.3.2.* [Back](readme.md) diff --git a/src/application/config/config.php b/src/application/config/config.php index 61ffc8b4..17936c94 100644 --- a/src/application/config/config.php +++ b/src/application/config/config.php @@ -9,7 +9,7 @@ | */ $config['version'] = '1.3.2'; // This must be changed manually. -$config['release_label'] = 'Beta 1'; // Leave empty for no title or add Alpha, Beta etc ... +$config['release_label'] = ''; // Leave empty for no title or add Alpha, Beta etc ... $config['google_sync_feature'] = Config::GOOGLE_SYNC_FEATURE; /* @@ -273,7 +273,7 @@ $config['cache_path'] = __DIR__ . '/../../storage/cache/'; | new release. | */ -$config['cache_busting_token'] = '93GT3'; +$config['cache_busting_token'] = '52FX8'; /* |-------------------------------------------------------------------------- diff --git a/src/application/controllers/Backend.php b/src/application/controllers/Backend.php index fc0c33a2..71ee1319 100755 --- a/src/application/controllers/Backend.php +++ b/src/application/controllers/Backend.php @@ -122,6 +122,7 @@ class Backend extends CI_Controller { $this->load->model('providers_model'); $this->load->model('customers_model'); + $this->load->model('secretaries_model'); $this->load->model('services_model'); $this->load->model('settings_model'); $this->load->model('user_model'); @@ -135,6 +136,17 @@ class Backend extends CI_Controller { $view['customers'] = $this->customers_model->get_batch(); $view['available_providers'] = $this->providers_model->get_available_providers(); $view['available_services'] = $this->services_model->get_available_services(); + + if ($this->session->userdata('role_slug') === DB_SLUG_SECRETARY) + { + $secretary = $this->secretaries_model->get_row($this->session->userdata('user_id')); + $view['secretary_providers'] = $secretary['providers']; + } + else + { + $view['secretary_providers'] = []; + } + $this->set_user_data($view); $this->load->view('backend/header', $view); diff --git a/src/application/language/arabic/db_lang.php b/src/application/language/arabic/db_lang.php index b9da89b1..94044736 100644 --- a/src/application/language/arabic/db_lang.php +++ b/src/application/language/arabic/db_lang.php @@ -1,63 +1,35 @@ + * @copyright Copyright (c) 2014-2018, British Columbia Institute of Technology (http://bcit.ca/) + * @license http://opensource.org/licenses/MIT MIT License + * @link https://codeigniter.com */ defined('BASEPATH') OR exit('No direct script access allowed'); -$lang['db_invalid_connection_str'] = 'Unable to determine the database settings based on the connection string you submitted.'; -$lang['db_unable_to_connect'] = 'Unable to connect to your database server using the provided settings.'; -$lang['db_unable_to_select'] = 'Unable to select the specified database: %s'; -$lang['db_unable_to_create'] = 'Unable to create the specified database: %s'; -$lang['db_invalid_query'] = 'The query you submitted is not valid.'; -$lang['db_must_set_table'] = 'You must set the database table to be used with your query.'; -$lang['db_must_use_set'] = 'You must use the "set" method to update an entry.'; -$lang['db_must_use_index'] = 'You must specify an index to match on for batch updates.'; -$lang['db_batch_missing_index'] = 'One or more rows submitted for batch updating is missing the specified index.'; -$lang['db_must_use_where'] = 'Updates are not allowed unless they contain a "where" clause.'; -$lang['db_del_must_use_where'] = 'Deletes are not allowed unless they contain a "where" or "like" clause.'; -$lang['db_field_param_missing'] = 'To fetch fields requires the name of the table as a parameter.'; -$lang['db_unsupported_function'] = 'This feature is not available for the database you are using.'; -$lang['db_transaction_failure'] = 'Transaction failure: Rollback performed.'; -$lang['db_unable_to_drop'] = 'Unable to drop the specified database.'; -$lang['db_unsupported_feature'] = 'Unsupported feature of the database platform you are using.'; -$lang['db_unsupported_compression'] = 'The file compression format you chose is not supported by your server.'; -$lang['db_filepath_error'] = 'Unable to write data to the file path you have submitted.'; -$lang['db_invalid_cache_path'] = 'The cache path you submitted is not valid or writable.'; -$lang['db_table_name_required'] = 'A table name is required for that operation.'; -$lang['db_column_name_required'] = 'A column name is required for that operation.'; -$lang['db_column_definition_required'] = 'A column definition is required for that operation.'; -$lang['db_unable_to_set_charset'] = 'Unable to set client connection character set: %s'; -$lang['db_error_heading'] = 'A Database Error Occurred'; +$lang['db_invalid_connection_str'] = 'Nebolo možné zistiť databázové nastavenie podľa vloženého reťazca'; +$lang['db_unable_to_connect'] = 'Nepodarilo sa pripojiť k databáze s daným nastavením'; +$lang['db_unable_to_select'] = 'Nepodarilo sa vybrať (select) databázu: %s'; +$lang['db_unable_to_create'] = 'Nepodarilo sa vytvoriť danú databázu: %s'; +$lang['db_invalid_query'] = 'Odoslaná požiadavka nie je platná.'; +$lang['db_must_set_table'] = 'Musíte určiť databázovú tabuľku, ktorej sa požiadavka týka.'; +$lang['db_must_use_set'] = 'Musíte nastaviť metódu "set" pre úpravu záznamu.'; +$lang['db_must_use_index'] = 'Je nutné určiť párový index pre dávkový update).'; +$lang['db_batch_missing_index'] = 'Pre jeden alebo viac daných riadkov určených k dávkovému updatu chýba špecifikovaný index.'; +$lang['db_must_use_where'] = 'Nie je možné upravovať záznamy bez podmienky "where".'; +$lang['db_del_must_use_where'] = 'Nie je možné mazať záznamy bez podmienky "where".'; +$lang['db_field_param_missing'] = 'Spracovanie polí vyžaduje ako parameter názov tabuľky.'; +$lang['db_unsupported_function'] = 'Táto funkcia nie je dostupná v tomto type databázy.'; +$lang['db_transaction_failure'] = 'Chyba transakcie: aplikovaný Rollback'; +$lang['db_unable_to_drop'] = 'Nie je možné odstrániť požadovanú databázu.'; +$lang['db_unsupported_feature'] = 'Táto vlastnosť nie je dostupná pri aktuálnej platforme.'; +$lang['db_unsupported_compression'] = 'Zvolená kompresia súborov nie je podporovaná serverom.'; +$lang['db_filepath_error'] = 'Nepodarilo sa zapísať dáta do zadanej cesty.'; +$lang['db_invalid_cache_path'] = 'Zadaná cesta pre kešovanie nie je platná alebo do nej nemožno zapisovať.'; +$lang['db_table_name_required'] = 'Táto operácia potrebuje názov tabuľky.'; +$lang['db_column_name_required'] = 'Táto operácia potrebuje názov stĺpca.'; +$lang['db_column_definition_required'] = 'Táto operácia potrebuje definíciu stĺpca.'; +$lang['db_unable_to_set_charset'] = 'Nie je možné nastaviť znakovú sadu pripojenia: %s'; +$lang['db_error_heading'] = 'Nastala chyba databázy'; \ No newline at end of file diff --git a/src/application/language/slovak/email_lang.php b/src/application/language/slovak/email_lang.php index e104db52..3f113e43 100644 --- a/src/application/language/slovak/email_lang.php +++ b/src/application/language/slovak/email_lang.php @@ -1,58 +1,31 @@ + * @copyright Copyright (c) 2014-2018, British Columbia Institute of Technology (http://bcit.ca/) + * @license http://opensource.org/licenses/MIT MIT License + * @link https://codeigniter.com */ defined('BASEPATH') OR exit('No direct script access allowed'); -$lang['email_must_be_array'] = 'The email validation method must be passed an array.'; -$lang['email_invalid_address'] = 'Invalid email address: %s'; -$lang['email_attachment_missing'] = 'Unable to locate the following email attachment: %s'; -$lang['email_attachment_unreadable'] = 'Unable to open this attachment: %s'; -$lang['email_no_from'] = 'Cannot send mail with no "From" header.'; -$lang['email_no_recipients'] = 'You must include recipients: To, Cc, or Bcc'; -$lang['email_send_failure_phpmail'] = 'Unable to send email using PHP mail(). Your server might not be configured to send mail using this method.'; -$lang['email_send_failure_sendmail'] = 'Unable to send email using PHP Sendmail. Your server might not be configured to send mail using this method.'; -$lang['email_send_failure_smtp'] = 'Unable to send email using PHP SMTP. Your server might not be configured to send mail using this method.'; -$lang['email_sent'] = 'Your message has been successfully sent using the following protocol: %s'; -$lang['email_no_socket'] = 'Unable to open a socket to Sendmail. Please check settings.'; -$lang['email_no_hostname'] = 'You did not specify a SMTP hostname.'; -$lang['email_smtp_error'] = 'The following SMTP error was encountered: %s'; -$lang['email_no_smtp_unpw'] = 'Error: You must assign a SMTP username and password.'; -$lang['email_failed_smtp_login'] = 'Failed to send AUTH LOGIN command. Error: %s'; -$lang['email_smtp_auth_un'] = 'Failed to authenticate username. Error: %s'; -$lang['email_smtp_auth_pw'] = 'Failed to authenticate password. Error: %s'; -$lang['email_smtp_data_failure'] = 'Unable to send data: %s'; -$lang['email_exit_status'] = 'Exit status code: %s'; +$lang['email_must_be_array'] = 'Metóde na kontrolu e-mailu musí byť poslané pole.'; +$lang['email_invalid_address'] = 'Neplatná e-mailová adresa: %s'; +$lang['email_attachment_missing'] = 'Nie je možné nájsť prílohu e-mailu: %s'; +$lang['email_attachment_unreadable'] = 'Nepodarilo sa otvoriť prílohu: %s'; +$lang['email_no_from'] = 'Nie je možné odoslať e-mail bez odosielateľa.'; +$lang['email_no_recipients'] = 'Musíte uviesť príjemcu: Komu, Cc, alebo Bcc'; +$lang['email_send_failure_phpmail'] = 'Nie je možné poslať e-mail pomocou PHP funkcie mail(). Server nemusí byť nastavený pre posielanie e-mailov touto metódou.'; +$lang['email_send_failure_sendmail'] = 'Nie je možné poslať e-mail pomocou programu Sendmail. Server nemusí byť nastavený pre posielanie e-mailov touto metódou.'; +$lang['email_send_failure_smtp'] = 'Nie je možné poslať e-mail pomocou PHP funkcie pre SMTP. Server nemusí byť nastavený pre posielanie e-mailov touto metódou.'; +$lang['email_sent'] = 'Správa bola úspešne odoslaná pomocou protokolu: %s'; +$lang['email_no_socket'] = 'Nie je možné otvoriť prístup k programu Sendmail. Skontrolujte nastavenia.'; +$lang['email_no_hostname'] = 'Nie je nastavené meno SMTP servera'; +$lang['email_smtp_error'] = 'Bola zaznamenaná chyba SMTP: %s'; +$lang['email_no_smtp_unpw'] = 'Chyba: Musíte nastaviť užívateľské meno a heslo pre SMTP.'; +$lang['email_failed_smtp_login'] = 'Zlyhalo odoslanie príkazu AUTH LOGIN. Chyba: %s'; +$lang['email_smtp_auth_un'] = 'Zlyhalo overenie užívateľského mena. Chyba: %s'; +$lang['email_smtp_auth_pw'] = 'Zlyhalo overenie hesla. Chyba: %s'; +$lang['email_smtp_data_failure'] = 'Nie je možné odoslať dáta: %s'; +$lang['email_exit_status'] = 'Stav pri ukončení: %s'; diff --git a/src/application/language/slovak/migration_lang.php b/src/application/language/slovak/migration_lang.php index 887ec0ff..899619b5 100644 --- a/src/application/language/slovak/migration_lang.php +++ b/src/application/language/slovak/migration_lang.php @@ -1,13 +1,20 @@ - + * @copyright Copyright (c) 2014-2018, British Columbia Institute of Technology (http://bcit.ca/) + * @license http://opensource.org/licenses/MIT MIT License + * @link https://codeigniter.com + */ +defined('BASEPATH') OR exit('No direct script access allowed'); -$lang['migration_none_found'] = "No migrations were found."; -$lang['migration_not_found'] = "This migration could not be found."; -$lang['migration_multiple_version'] = "This are multiple migrations with the same version number: %d."; -$lang['migration_class_doesnt_exist'] = "The migration class \"%s\" could not be found."; -$lang['migration_missing_up_method'] = "The migration class \"%s\" is missing an 'up' method."; -$lang['migration_missing_down_method'] = "The migration class \"%s\" is missing an 'down' method."; -$lang['migration_invalid_filename'] = "Migration \"%s\" has an invalid filename."; - - -/* End of file migration_lang.php */ -/* Location: ./system/language/slovak/migration_lang.php */ +$lang['migration_none_found'] = 'Žiadne migrácie neboli nájdené.'; +$lang['migration_not_found'] = 'Migrácia s číslom tejto verzie nebola nájdená: %s.'; +$lang['migration_sequence_gap'] = 'Chýbajúca migrácia v sekvencii blízko: %s.'; +$lang['migration_multiple_version'] = 'Existuje viacej migracií s rovnakým číslom verzie: %s.'; +$lang['migration_class_doesnt_exist'] = 'Trieda pre migráciu "%s" nebola nájdená.'; +$lang['migration_missing_up_method'] = 'V migračnej triede "%s" chýba "up" metoda.'; +$lang['migration_missing_down_method'] = 'V migračnej triede "%s" chýba "down" metoda.'; +$lang['migration_invalid_filename'] = 'Migrácia "%s" má chybné meno.'; diff --git a/src/application/language/slovak/translations_lang.php b/src/application/language/slovak/translations_lang.php index 17e0b90b..3881b6bb 100755 --- a/src/application/language/slovak/translations_lang.php +++ b/src/application/language/slovak/translations_lang.php @@ -88,7 +88,6 @@ $lang['reload_appointments_hint'] = 'Obnoviť rezervácie v kalendári.'; $lang['trigger_google_sync_hint'] = 'Trigger proces synchronizácie kalendára Google.'; $lang['appointment_updated'] = 'Rezervácia úspešne aktualizovaná!'; $lang['undo'] = 'Odvolať akciu'; -$lang['cancel'] = 'Zrušiť'; $lang['appointment_details_changed'] = 'Podrobnosti rezervácie boli zmenené'; $lang['appointment_changes_saved'] = 'Zmeny rezervácie boli úspešne uložené!'; $lang['save'] = 'Uložiť'; diff --git a/src/application/language/spanish/db_lang.php b/src/application/language/spanish/db_lang.php index b9da89b1..bcef282a 100644 --- a/src/application/language/spanish/db_lang.php +++ b/src/application/language/spanish/db_lang.php @@ -1,63 +1,36 @@ security->get_csrf_hash()) ?>, availableProviders : , availableServices : , + secretaryProviders : , dateFormat : , timeFormat : , baseUrl : , diff --git a/src/assets/js/backend_calendar_appointments_modal.js b/src/assets/js/backend_calendar_appointments_modal.js index d3021b7c..a1d18a4d 100755 --- a/src/assets/js/backend_calendar_appointments_modal.js +++ b/src/assets/js/backend_calendar_appointments_modal.js @@ -299,6 +299,14 @@ window.BackendCalendarAppointmentsModal = window.BackendCalendarAppointmentsModa // Update the providers select box. $.each(GlobalVariables.availableProviders, function (indexProvider, provider) { $.each(provider.services, function (indexService, serviceId) { + if (GlobalVariables.user.role_slug === Backend.DB_SLUG_PROVIDER && parseInt(provider.id) !== GlobalVariables.user.id) { + return true; // continue + } + + if (GlobalVariables.user.role_slug === Backend.DB_SLUG_SECRETARY && GlobalVariables.secretaryProviders.indexOf(provider.id) === -1) { + return true; // continue + } + // If the current provider is able to provide the selected service, add him to the listbox. if (serviceId == sid) { var optionHtml = '