From 3e581a1de9cfcd48a360884e428b655ee2d9165f Mon Sep 17 00:00:00 2001 From: giladx Date: Wed, 18 Nov 2020 17:36:22 +0200 Subject: [PATCH 1/4] added hebrew language --- application/config/config.php | 2 + application/language/hebrew/db_lang.php | 63 ++++ application/language/hebrew/email_lang.php | 58 +++ application/language/hebrew/index.html | 10 + .../language/hebrew/migration_lang.php | 20 ++ .../language/hebrew/translations_lang.php | 329 ++++++++++++++++++ 6 files changed, 482 insertions(+) create mode 100644 application/language/hebrew/db_lang.php create mode 100644 application/language/hebrew/email_lang.php create mode 100644 application/language/hebrew/index.html create mode 100644 application/language/hebrew/migration_lang.php create mode 100644 application/language/hebrew/translations_lang.php diff --git a/application/config/config.php b/application/config/config.php index 96df7658..a6a841bb 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -94,6 +94,7 @@ $config['language'] = isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? 'fr' => 'french', 'de' => 'german', 'el' => 'greek', + 'he' => 'hebrew', 'hi' => 'hindi', 'hu' => 'hungarian', 'it' => 'italian', @@ -132,6 +133,7 @@ $config['available_languages'] = [ 'french', 'german', 'greek', + 'hebrew', 'hindi', 'hungarian', 'italian', diff --git a/application/language/hebrew/db_lang.php b/application/language/hebrew/db_lang.php new file mode 100644 index 00000000..b9da89b1 --- /dev/null +++ b/application/language/hebrew/db_lang.php @@ -0,0 +1,63 @@ + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + diff --git a/application/language/hebrew/migration_lang.php b/application/language/hebrew/migration_lang.php new file mode 100644 index 00000000..a77dfc84 --- /dev/null +++ b/application/language/hebrew/migration_lang.php @@ -0,0 +1,20 @@ + Date: Wed, 18 Nov 2020 17:43:55 +0200 Subject: [PATCH 2/4] added hebrew language --- application/config/config.php | 2 - application/language/hebrew/db_lang.php | 63 ---- application/language/hebrew/email_lang.php | 58 --- application/language/hebrew/index.html | 10 - .../language/hebrew/migration_lang.php | 20 -- .../language/hebrew/translations_lang.php | 329 ------------------ 6 files changed, 482 deletions(-) delete mode 100644 application/language/hebrew/db_lang.php delete mode 100644 application/language/hebrew/email_lang.php delete mode 100644 application/language/hebrew/index.html delete mode 100644 application/language/hebrew/migration_lang.php delete mode 100644 application/language/hebrew/translations_lang.php diff --git a/application/config/config.php b/application/config/config.php index a6a841bb..96df7658 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -94,7 +94,6 @@ $config['language'] = isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? 'fr' => 'french', 'de' => 'german', 'el' => 'greek', - 'he' => 'hebrew', 'hi' => 'hindi', 'hu' => 'hungarian', 'it' => 'italian', @@ -133,7 +132,6 @@ $config['available_languages'] = [ 'french', 'german', 'greek', - 'hebrew', 'hindi', 'hungarian', 'italian', diff --git a/application/language/hebrew/db_lang.php b/application/language/hebrew/db_lang.php deleted file mode 100644 index b9da89b1..00000000 --- a/application/language/hebrew/db_lang.php +++ /dev/null @@ -1,63 +0,0 @@ - - - 403 Forbidden - - - -

Directory access is forbidden.

- - - diff --git a/application/language/hebrew/migration_lang.php b/application/language/hebrew/migration_lang.php deleted file mode 100644 index a77dfc84..00000000 --- a/application/language/hebrew/migration_lang.php +++ /dev/null @@ -1,20 +0,0 @@ - Date: Wed, 18 Nov 2020 18:35:06 +0200 Subject: [PATCH 3/4] hebrew language translation --- application/config/config.php | 2 + application/language/hebrew/db_lang.php | 63 ++++ application/language/hebrew/email_lang.php | 59 ++++ application/language/hebrew/index.html | 10 + .../language/hebrew/migration_lang.php | 20 ++ .../language/hebrew/translations_lang.php | 329 ++++++++++++++++++ 6 files changed, 483 insertions(+) create mode 100644 application/language/hebrew/db_lang.php create mode 100644 application/language/hebrew/email_lang.php create mode 100644 application/language/hebrew/index.html create mode 100644 application/language/hebrew/migration_lang.php create mode 100644 application/language/hebrew/translations_lang.php diff --git a/application/config/config.php b/application/config/config.php index 96df7658..a6a841bb 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -94,6 +94,7 @@ $config['language'] = isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? 'fr' => 'french', 'de' => 'german', 'el' => 'greek', + 'he' => 'hebrew', 'hi' => 'hindi', 'hu' => 'hungarian', 'it' => 'italian', @@ -132,6 +133,7 @@ $config['available_languages'] = [ 'french', 'german', 'greek', + 'hebrew', 'hindi', 'hungarian', 'italian', diff --git a/application/language/hebrew/db_lang.php b/application/language/hebrew/db_lang.php new file mode 100644 index 00000000..45be434d --- /dev/null +++ b/application/language/hebrew/db_lang.php @@ -0,0 +1,63 @@ + + + 403 Forbidden + + + +

Directory access is forbidden.

+ + + diff --git a/application/language/hebrew/migration_lang.php b/application/language/hebrew/migration_lang.php new file mode 100644 index 00000000..932e15e3 --- /dev/null +++ b/application/language/hebrew/migration_lang.php @@ -0,0 +1,20 @@ + Date: Sat, 21 Nov 2020 22:16:53 +0200 Subject: [PATCH 4/4] Multiple attendant number generation must take into consideration the working plan exceptions --- application/libraries/Availability.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/application/libraries/Availability.php b/application/libraries/Availability.php index 4a4e2b96..744a36bb 100644 --- a/application/libraries/Availability.php +++ b/application/libraries/Availability.php @@ -342,22 +342,29 @@ class Availability { ]); $working_plan = json_decode($provider['settings']['working_plan'], TRUE); + $working_plan_exceptions = json_decode($provider['settings']['working_plan_exceptions'], TRUE); $working_day = strtolower(date('l', strtotime($date))); - $working_hours = $working_plan[$working_day]; + $date_working_plan = $working_plan[$working_day]; - if ( ! $working_hours) + // Search if the $date is an custom availability period added outside the normal working plan. + if (isset($working_plan_exceptions[$date])) + { + $date_working_plan = $working_plan_exceptions[$date]; + } + + if ( ! $date_working_plan) { return []; } $periods = [ [ - 'start' => new DateTime($date . ' ' . $working_hours['start']), - 'end' => new DateTime($date . ' ' . $working_hours['end']) + 'start' => new DateTime($date . ' ' . $date_working_plan['start']), + 'end' => new DateTime($date . ' ' . $date_working_plan['end']) ] ]; - $periods = $this->remove_breaks($date, $periods, $working_hours['breaks']); + $periods = $this->remove_breaks($date, $periods, $date_working_plan['breaks']); $periods = $this->remove_unavailability_events($periods, $unavailability_events); $hours = [];