2021-11-10 10:32:46 +03:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @var string $timezones
|
|
|
|
* @var array $privileges
|
|
|
|
*/
|
|
|
|
?>
|
2021-11-15 11:49:08 +03:00
|
|
|
|
|
|
|
<?php extend('layouts/backend/backend_layout') ?>
|
|
|
|
|
|
|
|
<?php section('content') ?>
|
|
|
|
|
2017-11-14 16:01:49 +03:00
|
|
|
<script src="<?= asset_url('assets/js/backend_services_helper.js') ?>"></script>
|
|
|
|
<script src="<?= asset_url('assets/js/backend_categories_helper.js') ?>"></script>
|
|
|
|
<script src="<?= asset_url('assets/js/backend_services.js') ?>"></script>
|
2017-09-05 15:58:34 +03:00
|
|
|
<script>
|
2015-10-05 01:31:06 +03:00
|
|
|
var GlobalVariables = {
|
2020-09-07 13:34:52 +03:00
|
|
|
csrfToken: <?= json_encode($this->security->get_csrf_hash()) ?>,
|
2021-11-18 07:13:13 +03:00
|
|
|
baseUrl: <?= json_encode(config('base_url')) ?>,
|
|
|
|
dateFormat: <?= json_encode(setting('date_format')) ?>,
|
|
|
|
timeFormat: <?= json_encode(setting('time_format')) ?>,
|
2020-09-07 13:34:52 +03:00
|
|
|
timezones: <?= json_encode($timezones) ?>,
|
|
|
|
user: {
|
2021-11-18 07:13:13 +03:00
|
|
|
id: <?= session('user_id') ?>,
|
|
|
|
email: <?= json_encode(session('user_email')) ?>,
|
|
|
|
timezone: <?= json_encode(session('timezone')) ?>,
|
|
|
|
role_slug: <?= json_encode(session('role_slug')) ?>,
|
2017-09-23 04:42:14 +03:00
|
|
|
privileges: <?= json_encode($privileges) ?>
|
2015-10-05 01:31:06 +03:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2020-12-09 15:17:45 +03:00
|
|
|
$(function () {
|
2015-10-05 01:31:06 +03:00
|
|
|
BackendServices.initialize(true);
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2020-09-03 14:35:58 +03:00
|
|
|
<div class="container-fluid backend-page" id="services-page">
|
2020-09-03 14:48:58 +03:00
|
|
|
<ul class="nav nav-pills">
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link active" href="#services" data-toggle="tab">
|
|
|
|
<?= lang('services') ?>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link" href="#categories" data-toggle="tab">
|
|
|
|
<?= lang('categories') ?>
|
|
|
|
</a>
|
|
|
|
</li>
|
2015-10-05 01:31:06 +03:00
|
|
|
</ul>
|
|
|
|
|
2017-09-22 15:53:41 +03:00
|
|
|
<div class="tab-content">
|
2017-09-23 04:42:14 +03:00
|
|
|
|
2017-09-22 15:53:41 +03:00
|
|
|
<!-- SERVICES TAB -->
|
|
|
|
|
2020-09-03 14:48:58 +03:00
|
|
|
<div class="tab-pane active" id="services">
|
2017-09-22 15:53:41 +03:00
|
|
|
<div class="row">
|
2020-08-31 17:02:54 +03:00
|
|
|
<div id="filter-services" class="filter-records col col-12 col-md-5">
|
2020-05-05 20:35:33 +03:00
|
|
|
<form class="mb-4">
|
2017-10-31 13:52:25 +03:00
|
|
|
<div class="input-group">
|
|
|
|
<input type="text" class="key form-control">
|
2017-09-23 04:42:14 +03:00
|
|
|
|
2020-09-30 14:32:42 +03:00
|
|
|
<div class="input-group-addon">
|
|
|
|
<div>
|
2020-12-09 15:17:45 +03:00
|
|
|
<button class="filter btn btn-outline-secondary" type="submit"
|
|
|
|
data-tippy-content="<?= lang('filter') ?>">
|
2020-09-30 14:32:42 +03:00
|
|
|
<i class="fas fa-search"></i>
|
|
|
|
</button>
|
2020-12-09 15:17:45 +03:00
|
|
|
<button class="clear btn btn-outline-secondary" type="button"
|
|
|
|
data-tippy-content="<?= lang('clear') ?>">
|
2020-12-08 14:23:37 +03:00
|
|
|
<i class="fas fa-redo-alt"></i>
|
2020-09-30 14:32:42 +03:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-10-31 13:52:25 +03:00
|
|
|
</div>
|
2017-09-22 15:53:41 +03:00
|
|
|
</form>
|
|
|
|
|
|
|
|
<h3><?= lang('services') ?></h3>
|
|
|
|
<div class="results"></div>
|
|
|
|
</div>
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2020-08-31 17:02:54 +03:00
|
|
|
<div class="record-details column col-12 col-md-5">
|
2020-05-05 20:35:33 +03:00
|
|
|
<div class="btn-toolbar mb-4">
|
2017-09-22 15:53:41 +03:00
|
|
|
<div class="add-edit-delete-group btn-group">
|
2020-08-31 13:23:10 +03:00
|
|
|
<button id="add-service" class="btn btn-primary">
|
2020-12-08 01:10:49 +03:00
|
|
|
<i class="fas fa-plus-square mr-2"></i>
|
2017-09-22 15:53:41 +03:00
|
|
|
<?= lang('add') ?>
|
|
|
|
</button>
|
2020-09-28 15:24:29 +03:00
|
|
|
<button id="edit-service" class="btn btn-outline-secondary" disabled="disabled">
|
2020-12-08 01:10:49 +03:00
|
|
|
<i class="fas fa-edit mr-2"></i>
|
2017-09-22 15:53:41 +03:00
|
|
|
<?= lang('edit') ?>
|
|
|
|
</button>
|
2020-09-28 15:24:29 +03:00
|
|
|
<button id="delete-service" class="btn btn-outline-secondary" disabled="disabled">
|
2020-12-08 01:10:49 +03:00
|
|
|
<i class="fas fa-trash-alt mr-2"></i>
|
2017-09-22 15:53:41 +03:00
|
|
|
<?= lang('delete') ?>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="save-cancel-group btn-group" style="display:none;">
|
2020-08-31 13:23:10 +03:00
|
|
|
<button id="save-service" class="btn btn-primary">
|
2020-12-08 01:10:49 +03:00
|
|
|
<i class="fas fa-check-square mr-2"></i>
|
2017-09-22 15:53:41 +03:00
|
|
|
<?= lang('save') ?>
|
|
|
|
</button>
|
2020-09-28 15:24:29 +03:00
|
|
|
<button id="cancel-service" class="btn btn-outline-secondary">
|
2020-09-07 12:21:16 +03:00
|
|
|
<i class="fas fa-ban mr-2"></i>
|
2017-09-22 15:53:41 +03:00
|
|
|
<?= lang('cancel') ?>
|
|
|
|
</button>
|
|
|
|
</div>
|
2015-10-05 01:31:06 +03:00
|
|
|
</div>
|
|
|
|
|
2017-09-22 15:53:41 +03:00
|
|
|
<h3><?= lang('details') ?></h3>
|
2017-09-23 04:42:14 +03:00
|
|
|
|
2017-09-22 15:53:41 +03:00
|
|
|
<div class="form-message alert" style="display:none;"></div>
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2017-09-23 04:42:14 +03:00
|
|
|
<input type="hidden" id="service-id">
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2017-09-22 15:53:41 +03:00
|
|
|
<div class="form-group">
|
2020-09-30 14:32:42 +03:00
|
|
|
<label for="service-name">
|
|
|
|
<?= lang('name') ?>
|
|
|
|
<span class="text-danger">*</span>
|
|
|
|
</label>
|
2018-01-23 12:10:33 +03:00
|
|
|
<input id="service-name" class="form-control required" maxlength="128">
|
2017-09-22 15:53:41 +03:00
|
|
|
</div>
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2017-09-22 15:53:41 +03:00
|
|
|
<div class="form-group">
|
2020-09-30 14:32:42 +03:00
|
|
|
<label for="service-duration">
|
|
|
|
<?= lang('duration_minutes') ?>
|
|
|
|
<span class="text-danger">*</span>
|
|
|
|
</label>
|
2021-07-19 16:59:21 +03:00
|
|
|
<input id="service-duration" class="form-control required" type="number" min="<?= EVENT_MINIMUM_DURATION ?>">
|
2017-09-22 15:53:41 +03:00
|
|
|
</div>
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2017-09-22 15:53:41 +03:00
|
|
|
<div class="form-group">
|
2020-09-30 14:32:42 +03:00
|
|
|
<label for="service-price">
|
|
|
|
<?= lang('price') ?>
|
|
|
|
<span class="text-danger">*</span>
|
|
|
|
</label>
|
2017-09-23 04:42:14 +03:00
|
|
|
<input id="service-price" class="form-control required">
|
2017-09-22 15:53:41 +03:00
|
|
|
</div>
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2017-09-22 15:53:41 +03:00
|
|
|
<div class="form-group">
|
2020-09-30 14:32:42 +03:00
|
|
|
<label for="service-currency">
|
|
|
|
<?= lang('currency') ?>
|
|
|
|
|
|
|
|
</label>
|
2018-01-23 12:10:33 +03:00
|
|
|
<input id="service-currency" class="form-control" maxlength="32">
|
2017-09-22 15:53:41 +03:00
|
|
|
</div>
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2017-09-22 15:53:41 +03:00
|
|
|
<div class="form-group">
|
2020-09-30 14:32:42 +03:00
|
|
|
<label for="service-category">
|
|
|
|
<?= lang('category') ?>
|
|
|
|
</label>
|
2017-09-22 15:53:41 +03:00
|
|
|
<select id="service-category" class="form-control"></select>
|
|
|
|
</div>
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2017-09-22 15:53:41 +03:00
|
|
|
<div class="form-group">
|
2020-09-30 14:32:42 +03:00
|
|
|
<label for="service-availabilities-type">
|
|
|
|
<?= lang('availabilities_type') ?>
|
|
|
|
|
|
|
|
</label>
|
2017-09-22 15:53:41 +03:00
|
|
|
<select id="service-availabilities-type" class="form-control">
|
|
|
|
<option value="<?= AVAILABILITIES_TYPE_FLEXIBLE ?>">
|
|
|
|
<?= lang('flexible') ?>
|
|
|
|
</option>
|
|
|
|
<option value="<?= AVAILABILITIES_TYPE_FIXED ?>">
|
|
|
|
<?= lang('fixed') ?>
|
|
|
|
</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2017-09-22 15:53:41 +03:00
|
|
|
<div class="form-group">
|
2020-09-30 14:32:42 +03:00
|
|
|
<label for="service-attendants-number">
|
|
|
|
<?= lang('attendants_number') ?>
|
|
|
|
<span class="text-danger">*</span>
|
|
|
|
</label>
|
2017-11-28 17:42:12 +03:00
|
|
|
<input id="service-attendants-number" class="form-control required" type="number" min="1">
|
2017-09-22 15:53:41 +03:00
|
|
|
</div>
|
2016-07-20 22:19:52 +03:00
|
|
|
|
2019-06-08 18:03:32 +03:00
|
|
|
<div class="form-group">
|
2020-09-30 14:32:42 +03:00
|
|
|
<label for="service-location">
|
|
|
|
<?= lang('location') ?>
|
|
|
|
|
|
|
|
</label>
|
2019-06-08 18:03:32 +03:00
|
|
|
<input id="service-location" class="form-control">
|
|
|
|
</div>
|
|
|
|
|
2017-09-22 15:53:41 +03:00
|
|
|
<div class="form-group">
|
2020-09-30 14:32:42 +03:00
|
|
|
<label for="service-description">
|
|
|
|
<?= lang('description') ?>
|
|
|
|
</label>
|
2017-09-22 15:53:41 +03:00
|
|
|
<textarea id="service-description" rows="4" class="form-control"></textarea>
|
|
|
|
</div>
|
2015-10-05 01:31:06 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2017-09-22 15:53:41 +03:00
|
|
|
<!-- CATEGORIES TAB -->
|
|
|
|
|
2020-09-03 14:48:58 +03:00
|
|
|
<div class="tab-pane" id="categories">
|
2017-09-22 15:53:41 +03:00
|
|
|
<div class="row">
|
2020-08-31 17:02:54 +03:00
|
|
|
<div id="filter-categories" class="filter-records column col-12 col-md-5">
|
2020-05-05 20:35:33 +03:00
|
|
|
<form class="input-append mb-4">
|
2017-10-31 13:52:25 +03:00
|
|
|
<div class="input-group">
|
|
|
|
<input type="text" class="key form-control">
|
|
|
|
|
2020-09-30 14:32:42 +03:00
|
|
|
<div class="input-group-addon">
|
|
|
|
<div>
|
2020-12-09 15:17:45 +03:00
|
|
|
<button class="filter btn btn-outline-secondary" type="submit"
|
|
|
|
data-tippy-content="<?= lang('filter') ?>">
|
2020-09-30 14:32:42 +03:00
|
|
|
<i class="fas fa-search"></i>
|
|
|
|
</button>
|
2020-12-09 15:17:45 +03:00
|
|
|
<button class="clear btn btn-outline-secondary" type="button"
|
|
|
|
data-tippy-content="<?= lang('clear') ?>">
|
2020-09-30 14:32:42 +03:00
|
|
|
<i class="fas fa-redo-alt"></i>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-10-31 13:52:25 +03:00
|
|
|
</div>
|
2017-09-22 15:53:41 +03:00
|
|
|
</form>
|
|
|
|
|
|
|
|
<h3><?= lang('categories') ?></h3>
|
|
|
|
<div class="results"></div>
|
|
|
|
</div>
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2020-08-31 17:02:54 +03:00
|
|
|
<div class="record-details col-12 col-md-5">
|
2020-05-05 20:35:33 +03:00
|
|
|
<div class="btn-toolbar mb-4">
|
2017-09-22 15:53:41 +03:00
|
|
|
<div class="add-edit-delete-group btn-group">
|
2020-08-31 13:23:10 +03:00
|
|
|
<button id="add-category" class="btn btn-primary">
|
2020-12-08 01:10:49 +03:00
|
|
|
<i class="fas fa-plus-square mr-2"></i>
|
2017-09-22 15:53:41 +03:00
|
|
|
<?= lang('add') ?>
|
|
|
|
</button>
|
2020-09-28 15:24:29 +03:00
|
|
|
<button id="edit-category" class="btn btn-outline-secondary" disabled="disabled">
|
2020-12-08 01:10:49 +03:00
|
|
|
<i class="fas fa-edit mr-2"></i>
|
2017-09-22 15:53:41 +03:00
|
|
|
<?= lang('edit') ?>
|
|
|
|
</button>
|
2020-09-28 15:24:29 +03:00
|
|
|
<button id="delete-category" class="btn btn-outline-secondary" disabled="disabled">
|
2020-12-08 01:10:49 +03:00
|
|
|
<i class="fas fa-trash-alt mr-2"></i>
|
2017-09-22 15:53:41 +03:00
|
|
|
<?= lang('delete') ?>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="save-cancel-group btn-group" style="display:none;">
|
2020-08-31 13:23:10 +03:00
|
|
|
<button id="save-category" class="btn btn-primary">
|
2020-12-08 01:10:49 +03:00
|
|
|
<i class="fas fa-check-square mr-2"></i>
|
2017-09-22 15:53:41 +03:00
|
|
|
<?= lang('save') ?>
|
|
|
|
</button>
|
2020-09-28 15:24:29 +03:00
|
|
|
<button id="cancel-category" class="btn btn-outline-secondary">
|
2020-09-07 12:21:16 +03:00
|
|
|
<i class="fas fa-ban mr-2"></i>
|
2017-09-22 15:53:41 +03:00
|
|
|
<?= lang('cancel') ?>
|
|
|
|
</button>
|
|
|
|
</div>
|
2015-12-14 00:24:00 +02:00
|
|
|
</div>
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2017-09-22 15:53:41 +03:00
|
|
|
<h3><?= lang('details') ?></h3>
|
2017-09-23 04:42:14 +03:00
|
|
|
|
2017-09-22 15:53:41 +03:00
|
|
|
<div class="form-message alert" style="display:none;"></div>
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2017-09-23 04:42:14 +03:00
|
|
|
<input type="hidden" id="category-id">
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2017-09-22 15:53:41 +03:00
|
|
|
<div class="form-group">
|
2020-09-30 14:32:42 +03:00
|
|
|
<label for="category-name">
|
|
|
|
<?= lang('name') ?>
|
|
|
|
<span class="text-danger">*</span>
|
|
|
|
</label>
|
2017-09-23 04:42:14 +03:00
|
|
|
<input id="category-name" class="form-control required">
|
2017-09-22 15:53:41 +03:00
|
|
|
</div>
|
2015-10-05 01:31:06 +03:00
|
|
|
|
2017-09-22 15:53:41 +03:00
|
|
|
<div class="form-group">
|
2020-09-30 14:32:42 +03:00
|
|
|
<label for="category-description">
|
|
|
|
<?= lang('description') ?>
|
|
|
|
|
|
|
|
</label>
|
2017-09-22 15:53:41 +03:00
|
|
|
<textarea id="category-description" rows="4" class="form-control"></textarea>
|
|
|
|
</div>
|
2015-12-14 00:24:00 +02:00
|
|
|
</div>
|
2015-10-05 01:31:06 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-11-15 11:49:08 +03:00
|
|
|
|
|
|
|
<?php section('content') ?>
|