mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-14 03:52:21 +03:00
138 lines
5.5 KiB
PHP
Executable file
138 lines
5.5 KiB
PHP
Executable file
<?php
|
|
/**
|
|
* @var array $system_settings
|
|
* @var array $user_settings
|
|
* @var string $timezones
|
|
* @var array $privileges
|
|
*/
|
|
?>
|
|
|
|
<?php extend('layouts/backend_layout') ?>
|
|
|
|
<?php section('content') ?>
|
|
|
|
<div id="business-logic-page" class="container-fluid backend-page">
|
|
<div id="business-logic">
|
|
<form>
|
|
<fieldset>
|
|
<legend class="border-bottom mb-4">
|
|
<?= lang('Business_settings') ?>
|
|
<?php if ($privileges[PRIV_SYSTEM_SETTINGS]['edit'] == TRUE): ?>
|
|
<button type="button" class="save-settings btn btn-primary btn-sm mb-2"
|
|
data-tippy-content="<?= lang('save') ?>">
|
|
<i class="fas fa-check-square me-2"></i>
|
|
<?= lang('save') ?>
|
|
</button>
|
|
<?php endif ?>
|
|
</legend>
|
|
|
|
<div class="row">
|
|
<div class="col-12 col-sm-7 working-plan-wrapper">
|
|
<h4><?= lang('working_plan') ?></h4>
|
|
|
|
<div class="form-text text-muted mb-4">
|
|
<?= lang('edit_working_plan_hint') ?>
|
|
</div>
|
|
|
|
<table class="working-plan table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th><?= lang('day') ?></th>
|
|
<th><?= lang('start') ?></th>
|
|
<th><?= lang('end') ?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><!-- Dynamic Content --></tbody>
|
|
</table>
|
|
|
|
<div class="text-end">
|
|
<button class="btn btn-outline-secondary" id="apply-global-working-plan" type="button">
|
|
<i class="fas fa-check"></i>
|
|
<?= lang('apply_to_all_providers') ?>
|
|
</button>
|
|
</div>
|
|
|
|
<br>
|
|
|
|
<h4><?= lang('book_advance_timeout') ?></h4>
|
|
<div class="mb-3">
|
|
<label for="book-advance-timeout" class="form-label">
|
|
<?= lang('timeout_minutes') ?>
|
|
</label>
|
|
<input id="book-advance-timeout" data-field="book_advance_timeout" class="form-control"
|
|
type="number" min="15">
|
|
<div class="form-text text-muted">
|
|
<?= lang('book_advance_timeout_hint') ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-12 col-sm-5 breaks-wrapper">
|
|
<h4><?= lang('breaks') ?></h4>
|
|
|
|
<span class="form-text text-muted">
|
|
<?= lang('edit_breaks_hint') ?>
|
|
</span>
|
|
|
|
<div class="mt-2">
|
|
<button type="button" class="add-break btn btn-primary">
|
|
<i class="fas fa-plus-square"></i>
|
|
<?= lang('add_break'); ?>
|
|
</button>
|
|
</div>
|
|
|
|
<br>
|
|
|
|
<table class="breaks table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th><?= lang('day') ?></th>
|
|
<th><?= lang('start') ?></th>
|
|
<th><?= lang('end') ?></th>
|
|
<th><?= lang('actions') ?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><!-- Dynamic Content --></tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<?php section('content') ?>
|
|
|
|
<?php section('scripts') ?>
|
|
|
|
<script src="<?= asset_url('assets/js/pages/backend_settings_business_logic_helper.js') ?>"></script>
|
|
<script src="<?= asset_url('assets/js/pages/backend_settings_business_logic.js') ?>"></script>
|
|
<script src="<?= asset_url('assets/js/utils/working_plan.js') ?>"></script>
|
|
<script src="<?= asset_url('assets/vendor/jquery-ui-timepicker-addon/jquery-ui-timepicker-addon.min.js') ?>"></script>
|
|
<script src="<?= asset_url('assets/vendor/jquery-jeditable/jquery.jeditable.min.js') ?>"></script>
|
|
<script>
|
|
var GlobalVariables = {
|
|
csrfToken: <?= json_encode($this->security->get_csrf_hash()) ?>,
|
|
baseUrl: <?= json_encode(config('base_url')) ?>,
|
|
dateFormat: <?= json_encode(setting('date_format')) ?>,
|
|
timeFormat: <?= json_encode(setting('time_format')) ?>,
|
|
firstWeekday: <?= json_encode(setting('first_weekday')) ?>,
|
|
timezones: <?= json_encode($timezones) ?>,
|
|
settings: {
|
|
system: <?= json_encode($system_settings) ?>,
|
|
},
|
|
user: {
|
|
id: <?= session('user_id') ?>,
|
|
email: <?= json_encode(session('user_email')) ?>,
|
|
timezone: <?= json_encode(session('timezone')) ?>,
|
|
role_slug: <?= json_encode(session('role_slug')) ?>,
|
|
privileges: <?= json_encode($privileges) ?>
|
|
}
|
|
};
|
|
|
|
$(function () {
|
|
BackendSettingsBusinessLogic.initialize(true);
|
|
});
|
|
</script>
|
|
|
|
<?php section('scripts') ?>
|
|
|