2023-10-22 18:37:29 +02:00
|
|
|
{% extends 'layouts/app.twig' %}
|
|
|
|
{% import 'macros/base.twig' as m %}
|
|
|
|
{% import 'macros/form.twig' as f %}
|
|
|
|
|
2023-12-07 15:11:05 +01:00
|
|
|
{% block title %}{{ __('shifts.history') }}{% endblock %}
|
2023-10-22 18:37:29 +02:00
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<div class="container">
|
|
|
|
<h1>
|
|
|
|
{{ m.button(m.icon('chevron-left'), url('/admin-shifts'), null, 'sm') }}
|
2023-12-07 15:11:05 +01:00
|
|
|
{% block content_title %}{{ block('title') }}{% endblock %}
|
2023-10-22 18:37:29 +02:00
|
|
|
</h1>
|
|
|
|
|
|
|
|
{% include 'layouts/parts/messages.twig' %}
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
{% block row_content %}
|
|
|
|
<div class="col-md-12">
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="table table-striped">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>{{ __('general.id') }}</th>
|
|
|
|
<th>{{ __('title.title') }}</th>
|
|
|
|
<th>{{ __('general.count') }}</th>
|
|
|
|
<th>{{ __('shifts.start') }}</th>
|
|
|
|
<th>{{ __('shifts.end') }}</th>
|
|
|
|
<th>{{ __('general.user') }}</th>
|
|
|
|
<th>{{ __('general.created_at') }}</th>
|
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
|
|
|
|
<tbody>
|
|
|
|
{% for shift in shifts %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ shift.transaction_id }}</td>
|
|
|
|
<td>
|
|
|
|
{% if shift.schedule %}
|
|
|
|
{{ __('shifts.history.schedule', [shift.schedule.name]) }}
|
|
|
|
{% else %}
|
|
|
|
{{ shift.title }}
|
|
|
|
{% endif %}
|
|
|
|
</td>
|
|
|
|
<td>{{ shift.count }}</td>
|
2023-11-23 14:30:46 +01:00
|
|
|
<td>{{ shift.start.format(__('general.datetime')) }}</td>
|
|
|
|
<td>{{ shift.end.format(__('general.datetime')) }}</td>
|
2023-10-22 18:37:29 +02:00
|
|
|
<td>{{ m.user(shift.createdBy) }}</td>
|
2023-11-23 14:30:46 +01:00
|
|
|
<td>{{ shift.created_at.format(__('general.datetime')) }}</td>
|
2023-10-22 18:37:29 +02:00
|
|
|
<td>
|
|
|
|
<form method="post" class="ps-1">
|
|
|
|
{{ csrf() }}
|
|
|
|
{{ f.hidden('transaction_id', shift.transaction_id) }}
|
|
|
|
{{ f.delete(null, {
|
|
|
|
'size': 'sm',
|
|
|
|
'title': __('form.delete_all'),
|
|
|
|
'confirm_title': __('shifts.history.delete_all.title', [shift.count]),
|
|
|
|
'confirm_button_text': __('form.delete_all'),
|
|
|
|
}) }}
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|