Do not add bookAdvanceTimeout delay to new appointment modal on the backend.

This commit is contained in:
Sébastien 2020-06-05 17:29:35 +02:00
parent 1821e50116
commit 8704413c0f
3 changed files with 2 additions and 4 deletions

View file

@ -99,7 +99,6 @@ class Backend extends CI_Controller {
$view['base_url'] = $this->config->item('base_url'); $view['base_url'] = $this->config->item('base_url');
$view['user_display_name'] = $this->user_model->get_user_display_name($this->session->userdata('user_id')); $view['user_display_name'] = $this->user_model->get_user_display_name($this->session->userdata('user_id'));
$view['active_menu'] = PRIV_APPOINTMENTS; $view['active_menu'] = PRIV_APPOINTMENTS;
$view['book_advance_timeout'] = $this->settings_model->get_setting('book_advance_timeout');
$view['date_format'] = $this->settings_model->get_setting('date_format'); $view['date_format'] = $this->settings_model->get_setting('date_format');
$view['time_format'] = $this->settings_model->get_setting('time_format'); $view['time_format'] = $this->settings_model->get_setting('time_format');
$view['first_weekday'] = $this->settings_model->get_setting('first_weekday'); $view['first_weekday'] = $this->settings_model->get_setting('first_weekday');

View file

@ -17,7 +17,6 @@
'availableProviders' : <?= json_encode($available_providers) ?>, 'availableProviders' : <?= json_encode($available_providers) ?>,
'availableServices' : <?= json_encode($available_services) ?>, 'availableServices' : <?= json_encode($available_services) ?>,
'baseUrl' : <?= json_encode($base_url) ?>, 'baseUrl' : <?= json_encode($base_url) ?>,
'bookAdvanceTimeout' : <?= $book_advance_timeout ?>,
'dateFormat' : <?= json_encode($date_format) ?>, 'dateFormat' : <?= json_encode($date_format) ?>,
'timeFormat' : <?= json_encode($time_format) ?>, 'timeFormat' : <?= json_encode($time_format) ?>,
'firstWeekday' : <?= json_encode($first_weekday) ?>, 'firstWeekday' : <?= json_encode($first_weekday) ?>,

View file

@ -390,8 +390,8 @@ window.BackendCalendarAppointmentsModal = window.BackendCalendarAppointmentsModa
var duration = service ? service.duration : 0; var duration = service ? service.duration : 0;
var startDatetime = new Date().addMinutes(GlobalVariables.bookAdvanceTimeout); var startDatetime = new Date();
var endDatetime = new Date().addMinutes(GlobalVariables.bookAdvanceTimeout).addMinutes(duration); var endDatetime = new Date().addMinutes(duration);
var dateFormat; var dateFormat;
switch (GlobalVariables.dateFormat) { switch (GlobalVariables.dateFormat) {