101 lines
4.3 KiB
Twig
101 lines
4.3 KiB
Twig
{% extends 'layout_admin.html.twig' %}
|
||
|
||
{% block content %}
|
||
<twig:page:heading>Buchungen & Anfragen</twig:page:heading>
|
||
<div class="data-table-wrapper">
|
||
<div class="data-table-wrapper__inner text-sm">
|
||
<table class="data-table">
|
||
<thead>
|
||
<tr>
|
||
<th>
|
||
{{ knp_pagination_sortable(pagination, 'Eingang', 'booking.createdAt') }}
|
||
</th>
|
||
<th>
|
||
{{ knp_pagination_sortable(pagination, 'Gruppenhaus', 'accommodation.name') }}
|
||
</th>
|
||
<th>
|
||
{{ knp_pagination_sortable(pagination, 'Gruppe', 'booking.groupName') }}
|
||
</th>
|
||
<th>
|
||
{{ knp_pagination_sortable(pagination, 'Anreise', 'booking.dateFrom') }}
|
||
</th>
|
||
<th>
|
||
Personen
|
||
</th>
|
||
<th>
|
||
Status
|
||
</th>
|
||
<th>
|
||
Rabatt
|
||
</th>
|
||
<th></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
{% for booking in pagination %}
|
||
<tr>
|
||
<td>
|
||
{{ booking.createdAt | date('d.m.Y, H:i') }}
|
||
</td>
|
||
<td>
|
||
{{ booking.accommodation.name }}
|
||
</td>
|
||
<td>
|
||
{{ booking.groupName }}
|
||
</td>
|
||
<td>
|
||
{{ booking.dateFrom | date('d.m.Y') }} – {{ booking.dateTo | date('d.m.Y') }}
|
||
</td>
|
||
<td>
|
||
{{ booking.paxCount }}
|
||
</td>
|
||
<td>
|
||
{{ booking.status.label }}
|
||
</td>
|
||
<td>
|
||
{% set discounts = [] %}
|
||
{% if booking.accommodationDiscount is not null %}
|
||
{% set discounts = discounts | merge(['Unterkunft ' ~ booking.accommodationDiscount ~ '%']) %}
|
||
{% endif %}
|
||
{% if booking.boardServiceDiscount is not null %}
|
||
{% set discounts = discounts | merge(['Verpflegung ' ~ booking.boardServiceDiscount ~ '%']) %}
|
||
{% endif %}
|
||
{% if booking.additionalServicesDiscount is not null %}
|
||
{% set discounts = discounts | merge(['Zusatzleistungen ' ~ booking.additionalServicesDiscount ~ '%']) %}
|
||
{% endif %}
|
||
{{ discounts | length > 0 ? (discounts | join(', ')) : '–' }}
|
||
</td>
|
||
<td class="text-right">
|
||
<twig:dropdown>
|
||
<twig:dropdown:link url="{{ path('app_admin_accommodationbooking_show', { 'id': booking.id, 'r': return_url() }) }}">
|
||
Details
|
||
</twig:dropdown:link>
|
||
<twig:dropdown:link url="{{ path('app_admin_accommodationbooking_edit', { 'id': booking.id }) }}">
|
||
bearbeiten
|
||
</twig:dropdown:link>
|
||
</twig:dropdown>
|
||
</td>
|
||
</tr>
|
||
{% else %}
|
||
<tr>
|
||
<td colspan="8">
|
||
Keine Daten...
|
||
</td>
|
||
</tr>
|
||
{% endfor %}
|
||
</tbody>
|
||
</table>
|
||
{{ knp_pagination_render(pagination) }}
|
||
</div>
|
||
</div>
|
||
<div class="flex justify-end">
|
||
<button type="button"
|
||
hx-get="{{ path('app_admin_accommodationbooking_create') }}"
|
||
hx-target="body"
|
||
hx-swap="beforeend"
|
||
class="button button--primary button--small">
|
||
neu
|
||
</button>
|
||
</div>
|
||
{% endblock %}
|