2021-11-10 10:32:46 +03:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @var array $available_providers
|
|
|
|
* @var array $available_services
|
|
|
|
* @var string $base_url
|
|
|
|
* @var string $date_format
|
|
|
|
* @var string $time_format
|
|
|
|
* @var string $first_weekday
|
|
|
|
* @var array $edit_appointment
|
|
|
|
* @var array $customers
|
|
|
|
* @var array $secretary_providers
|
|
|
|
* @var string $calendar_view
|
|
|
|
* @var string $timezones
|
|
|
|
* @var string $user_id
|
|
|
|
* @var string $user_email
|
|
|
|
* @var string $timezone
|
|
|
|
* @var string $role_slug
|
|
|
|
* @var array $privileges
|
2022-01-12 13:22:54 +03:00
|
|
|
* @var array $available_services
|
|
|
|
* @var array $timezones
|
|
|
|
* @var array $require_first_name
|
|
|
|
* @var array $require_last_name
|
|
|
|
* @var array $require_email
|
|
|
|
* @var array $require_phone_number
|
|
|
|
* @var array $require_address
|
|
|
|
* @var array $require_city
|
|
|
|
* @var array $require_zip_code
|
2021-11-10 10:32:46 +03:00
|
|
|
*/
|
|
|
|
?>
|
|
|
|
|
2021-12-06 11:00:02 +03:00
|
|
|
<?php extend('layouts/backend_layout') ?>
|
2021-11-16 12:40:54 +03:00
|
|
|
|
|
|
|
<?php section('styles') ?>
|
|
|
|
|
2021-11-08 12:57:03 +03:00
|
|
|
<link rel="stylesheet" type="text/css" href="<?= asset_url('/assets/vendor/fullcalendar/fullcalendar.min.css') ?>">
|
2017-09-14 16:18:20 +03:00
|
|
|
|
2021-11-16 12:40:54 +03:00
|
|
|
<?php section('styles') ?>
|
|
|
|
|
|
|
|
<?php section('scripts') ?>
|
|
|
|
|
2021-11-08 12:57:03 +03:00
|
|
|
<script src="<?= asset_url('assets/vendor/fullcalendar/fullcalendar.min.js') ?>"></script>
|
|
|
|
<script src="<?= asset_url('assets/vendor/jquery-jeditable/jquery.jeditable.min.js') ?>"></script>
|
|
|
|
<script src="<?= asset_url('assets/vendor/jquery-ui-timepicker-addon/jquery-ui-timepicker-addon.min.js') ?>"></script>
|
2021-11-29 10:55:29 +03:00
|
|
|
<script src="<?= asset_url('assets/js/components/working_plan_exceptions_modal.js') ?>"></script>
|
2022-01-12 13:22:54 +03:00
|
|
|
<script src="<?= asset_url('assets/js/utils/date.js') ?>"></script>
|
|
|
|
<script src="<?= asset_url('assets/js/utils/message.js') ?>"></script>
|
|
|
|
<script src="<?= asset_url('assets/js/utils/validation.js') ?>"></script>
|
|
|
|
<script src="<?= asset_url('assets/js/utils/url.js') ?>"></script>
|
|
|
|
<script src="<?= asset_url('assets/js/utils/calendar_default_view.js') ?>"></script>
|
|
|
|
<script src="<?= asset_url('assets/js/utils/calendar_table_view.js') ?>"></script>
|
|
|
|
<script src="<?= asset_url('assets/js/utils/calendar_google_sync.js') ?>"></script>
|
|
|
|
<script src="<?= asset_url('assets/js/utils/calendar_event_popover.js') ?>"></script>
|
|
|
|
<script src="<?= asset_url('assets/js/http/calendar_http_client.js') ?>"></script>
|
|
|
|
<script src="<?= asset_url('assets/js/http/customers_http_client.js') ?>"></script>
|
|
|
|
<script src="<?= asset_url('assets/js/pages/calendar.js') ?>"></script>
|
2015-11-28 12:52:42 +02:00
|
|
|
|
2021-11-16 12:40:54 +03:00
|
|
|
<?php section('scripts') ?>
|
|
|
|
|
|
|
|
<?php section('content') ?>
|
|
|
|
|
2020-09-03 14:35:58 +03:00
|
|
|
<div class="container-fluid backend-page" id="calendar-page">
|
2020-08-31 20:11:02 +03:00
|
|
|
<div class="row" id="calendar-toolbar">
|
|
|
|
<div id="calendar-filter" class="col-12 col-sm-5">
|
2021-11-25 11:13:27 +03:00
|
|
|
<div class="calendar-filter-items">
|
2020-08-31 20:11:02 +03:00
|
|
|
<select id="select-filter-item" class="form-control col"
|
2020-10-22 12:29:09 +03:00
|
|
|
data-tippy-content="<?= lang('select_filter_item_hint') ?>">
|
2016-07-12 23:02:59 +03:00
|
|
|
</select>
|
|
|
|
</div>
|
2015-11-28 12:52:42 +02:00
|
|
|
</div>
|
|
|
|
|
2020-08-31 20:11:02 +03:00
|
|
|
<div id="calendar-actions" class="col-12 col-sm-7">
|
2021-11-25 11:13:27 +03:00
|
|
|
<?php if ((session('role_slug') == DB_SLUG_ADMIN || session('role_slug') == DB_SLUG_PROVIDER)
|
2020-08-31 13:23:10 +03:00
|
|
|
&& config('google_sync_feature') == TRUE): ?>
|
|
|
|
<button id="google-sync" class="btn btn-primary"
|
2020-10-22 12:29:09 +03:00
|
|
|
data-tippy-content="<?= lang('trigger_google_sync_hint') ?>">
|
2020-05-05 20:35:33 +03:00
|
|
|
<i class="fas fa-sync-alt"></i>
|
2017-09-14 16:18:20 +03:00
|
|
|
<span><?= lang('synchronize') ?></span>
|
2016-07-13 23:56:05 +03:00
|
|
|
</button>
|
2015-11-28 12:52:42 +02:00
|
|
|
|
2021-11-23 10:37:41 +03:00
|
|
|
<button id="enable-sync" class="btn btn-light" data-bs-toggle="button"
|
2020-10-22 12:29:09 +03:00
|
|
|
data-tippy-content="<?= lang('enable_appointment_sync_hint') ?>">
|
2021-11-23 10:41:37 +03:00
|
|
|
<i class="fas fa-calendar-alt me-2"></i>
|
2017-09-14 16:18:20 +03:00
|
|
|
<span><?= lang('enable_sync') ?></span>
|
2015-11-28 12:52:42 +02:00
|
|
|
</button>
|
2016-07-13 23:56:05 +03:00
|
|
|
<?php endif ?>
|
2015-11-28 12:52:42 +02:00
|
|
|
|
2021-11-25 11:13:27 +03:00
|
|
|
<?php if (can('add', PRIV_APPOINTMENTS)): ?>
|
2020-12-09 15:17:45 +03:00
|
|
|
<div class="btn-group">
|
|
|
|
<button class="btn btn-light" id="insert-appointment">
|
2021-11-23 10:41:37 +03:00
|
|
|
<i class="fas fa-plus-square me-2"></i>
|
2020-12-09 15:17:45 +03:00
|
|
|
<?= lang('appointment') ?>
|
|
|
|
</button>
|
|
|
|
|
2021-11-23 10:37:41 +03:00
|
|
|
<button class="btn btn-light dropdown-toggle" id="insert-dropdown" data-bs-toggle="dropdown">
|
2020-12-09 15:17:45 +03:00
|
|
|
<span class="caret"></span>
|
|
|
|
<span class="sr-only">Toggle Dropdown</span>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<div class="dropdown-menu">
|
|
|
|
<a class="dropdown-item" href="#" id="insert-unavailable">
|
2021-11-23 10:41:37 +03:00
|
|
|
<i class="fas fa-plus-square me-2"></i>
|
2020-12-09 15:17:45 +03:00
|
|
|
<?= lang('unavailable') ?>
|
|
|
|
</a>
|
|
|
|
<a class="dropdown-item" href="#" id="insert-working-plan-exception"
|
2021-11-25 11:13:27 +03:00
|
|
|
<?= session('role_slug') !== DB_SLUG_ADMIN ? 'hidden' : '' ?>>
|
2021-11-23 10:41:37 +03:00
|
|
|
<i class="fas fa-plus-square me-2"></i>
|
2020-12-09 15:17:45 +03:00
|
|
|
<?= lang('working_plan_exception') ?>
|
|
|
|
</a>
|
|
|
|
</div>
|
2020-05-04 14:56:23 +03:00
|
|
|
</div>
|
2016-07-12 23:02:59 +03:00
|
|
|
<?php endif ?>
|
2016-07-13 23:56:05 +03:00
|
|
|
|
2020-12-09 15:17:45 +03:00
|
|
|
<button id="reload-appointments" class="btn btn-light"
|
|
|
|
data-tippy-content="<?= lang('reload_appointments_hint') ?>">
|
2020-09-07 12:21:16 +03:00
|
|
|
<i class="fas fa-sync-alt"></i>
|
2016-07-13 23:56:05 +03:00
|
|
|
</button>
|
2016-07-24 14:26:20 +03:00
|
|
|
|
2020-12-09 15:17:45 +03:00
|
|
|
<?php if ($calendar_view === 'default'): ?>
|
2020-05-05 20:35:33 +03:00
|
|
|
<a class="btn btn-light" href="<?= site_url('backend?view=table') ?>"
|
2020-10-22 12:29:09 +03:00
|
|
|
data-tippy-content="<?= lang('table') ?>">
|
2020-09-07 12:21:16 +03:00
|
|
|
<i class="fas fa-table"></i>
|
2020-05-04 14:38:28 +03:00
|
|
|
</a>
|
|
|
|
<?php endif ?>
|
|
|
|
|
2020-12-09 15:17:45 +03:00
|
|
|
<?php if ($calendar_view === 'table'): ?>
|
2020-06-09 17:36:54 +03:00
|
|
|
<a class="btn btn-light" href="<?= site_url('backend?view=default') ?>"
|
2020-10-22 12:29:09 +03:00
|
|
|
data-tippy-content="<?= lang('default') ?>">
|
2020-06-18 21:23:16 +03:00
|
|
|
<i class="fas fa-calendar-alt"></i>
|
2020-05-04 14:38:28 +03:00
|
|
|
</a>
|
|
|
|
<?php endif ?>
|
2015-11-28 12:52:42 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-11-12 10:25:27 +03:00
|
|
|
<div id="calendar">
|
|
|
|
<!-- Dynamically Generated Content -->
|
|
|
|
</div>
|
2015-11-28 12:52:42 +02:00
|
|
|
</div>
|
|
|
|
|
2021-11-12 10:25:27 +03:00
|
|
|
<!-- Page Components -->
|
2020-08-31 13:23:10 +03:00
|
|
|
|
2022-01-12 13:22:54 +03:00
|
|
|
<?php
|
|
|
|
component(
|
2022-01-14 10:39:11 +03:00
|
|
|
'appointments_modal',
|
2022-01-12 13:22:54 +03:00
|
|
|
'',
|
|
|
|
[
|
|
|
|
'available_services' => $available_services,
|
|
|
|
'timezones' => $timezones,
|
|
|
|
'require_first_name' => $require_first_name,
|
|
|
|
'require_last_name' => $require_last_name,
|
|
|
|
'require_email' => $require_email,
|
|
|
|
'require_phone_number' => $require_phone_number,
|
|
|
|
'require_address' => $require_address,
|
|
|
|
'require_city' => $require_city,
|
|
|
|
'require_zip_code' => $require_zip_code
|
|
|
|
]
|
|
|
|
)
|
|
|
|
?>
|
2021-11-25 11:13:27 +03:00
|
|
|
|
2022-01-12 13:22:54 +03:00
|
|
|
<?php
|
|
|
|
component(
|
2022-01-14 10:43:53 +03:00
|
|
|
'unavailabilities_modal',
|
2022-01-12 13:22:54 +03:00
|
|
|
'',
|
|
|
|
[
|
|
|
|
'timezones' => $timezones,
|
|
|
|
'timezone' => $timezone
|
|
|
|
]
|
|
|
|
)
|
|
|
|
?>
|
2021-11-25 11:13:27 +03:00
|
|
|
|
2021-11-16 12:40:54 +03:00
|
|
|
<?php component('select_google_calendar_modal') ?>
|
2021-11-25 11:13:27 +03:00
|
|
|
|
2021-11-16 12:40:54 +03:00
|
|
|
<?php component('working_plan_exceptions_modal') ?>
|
|
|
|
|
|
|
|
<?php section('content') ?>
|
2020-10-20 16:03:48 +03:00
|
|
|
|