mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-28 10:53:40 +03:00
Pass the calendar view to both the html and script vars
This commit is contained in:
parent
0da73ab43e
commit
7ca93f5eeb
1 changed files with 7 additions and 4 deletions
|
@ -100,6 +100,8 @@ class Calendar extends EA_Controller {
|
|||
|
||||
$available_services = $this->services_model->get_available_services();
|
||||
|
||||
$calendar_view = request('view', $user['settings']['calendar_view']);
|
||||
|
||||
script_vars([
|
||||
'user_id' => $user_id,
|
||||
'role_slug' => $role_slug,
|
||||
|
@ -108,8 +110,10 @@ class Calendar extends EA_Controller {
|
|||
'first_weekday' => setting('first_weekday'),
|
||||
'timezones' => $this->timezones->to_array(),
|
||||
'privileges' => $privileges,
|
||||
'calendar_view' => $calendar_view,
|
||||
'available_providers' => $available_providers,
|
||||
'available_services' => $available_services,
|
||||
'edit_appointment' => $edit_appointment,
|
||||
'customers' => [], // TODO: Remove the use of the pre-rendered customer set and only work with asynchronously fetched customer records.
|
||||
]);
|
||||
|
||||
|
@ -120,11 +124,10 @@ class Calendar extends EA_Controller {
|
|||
'timezone' => session('timezone'),
|
||||
'timezones' => $this->timezones->to_array(),
|
||||
'privileges' => $privileges,
|
||||
'calendar_view' => request('view', $user['settings']['calendar_view']),
|
||||
'calendar_view' => $calendar_view,
|
||||
'available_providers' => $available_providers,
|
||||
'available_services' => $available_services,
|
||||
'secretary_providers' => $secretary_providers,
|
||||
'edit_appointment' => $edit_appointment,
|
||||
'require_first_name' => setting('require_first_name'),
|
||||
'require_last_name' => setting('require_last_name'),
|
||||
'require_email' => setting('require_email'),
|
||||
|
@ -476,9 +479,9 @@ class Calendar extends EA_Controller {
|
|||
{
|
||||
try
|
||||
{
|
||||
$start_date = request('startDate') . ' 00:00:00';
|
||||
$start_date = request('start_date') . ' 00:00:00';
|
||||
|
||||
$end_date = request('endDate') . ' 23:59:59';
|
||||
$end_date = request('end_date') . ' 23:59:59';
|
||||
|
||||
$response = [
|
||||
'appointments' => $this->appointments_model->get([
|
||||
|
|
Loading…
Reference in a new issue