mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-10 10:02:33 +03:00
Display appointments from all providers in one view.
This commit is contained in:
parent
0bbbff47c8
commit
4f5fbb8262
29 changed files with 37 additions and 3 deletions
|
@ -584,9 +584,11 @@ class Calendar extends EA_Controller {
|
|||
throw new Exception('You do not have the required permissions for this task.');
|
||||
}
|
||||
|
||||
$record_id = request('record_id');
|
||||
|
||||
$filter_type = request('filter_type');
|
||||
|
||||
if ( ! $filter_type)
|
||||
if ( ! $filter_type && $record_id !== 'all')
|
||||
{
|
||||
json_response([
|
||||
'appointments' => [],
|
||||
|
@ -596,17 +598,20 @@ class Calendar extends EA_Controller {
|
|||
return;
|
||||
}
|
||||
|
||||
$record_id = $this->db->escape($record_id);
|
||||
|
||||
if ($filter_type == FILTER_TYPE_PROVIDER)
|
||||
{
|
||||
$where_id = 'id_users_provider';
|
||||
}
|
||||
else
|
||||
elseif ($filter_type === FILTER_TYPE_SERVICE)
|
||||
{
|
||||
$where_id = 'id_services';
|
||||
} else {
|
||||
$where_id = $record_id;
|
||||
}
|
||||
|
||||
// Get appointments
|
||||
$record_id = $this->db->escape(request('record_id'));
|
||||
$start_date = $this->db->escape(request('start_date'));
|
||||
$end_date = $this->db->escape(date('Y-m-d', strtotime(request('end_date') . ' +1 day')));
|
||||
|
||||
|
|
|
@ -360,4 +360,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -360,4 +360,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -360,4 +360,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -360,4 +360,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -360,4 +360,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -360,4 +360,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -360,4 +360,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -360,4 +360,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -360,4 +360,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -360,4 +360,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -360,4 +360,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -360,4 +360,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -360,4 +360,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -360,4 +360,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -360,4 +360,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -360,4 +360,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -360,4 +360,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -360,4 +360,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -360,4 +360,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -359,4 +359,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -360,4 +360,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -360,4 +360,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -360,4 +360,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -360,4 +360,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -360,4 +360,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -360,4 +360,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -360,4 +360,5 @@ $lang['display_login_button_hint'] = 'Defines whether the login button is being
|
|||
$lang['private'] = 'Private';
|
||||
$lang['private_hint'] = 'Private records will not be displayed or processed in public pages such as the booking page.';
|
||||
$lang['reset'] = 'Reset';
|
||||
$lang['all'] = 'All';
|
||||
// End
|
||||
|
|
|
@ -1542,6 +1542,8 @@ App.Utils.CalendarDefaultView = (function () {
|
|||
// Trigger once to set the proper footer position after calendar initialization.
|
||||
onWindowResize();
|
||||
|
||||
$selectFilterItem.append(new Option(lang('all'), 'all', true, true));
|
||||
|
||||
// Fill the select list boxes of the page.
|
||||
if (vars('available_providers').length > 0) {
|
||||
$('<optgroup/>', {
|
||||
|
|
Loading…
Reference in a new issue