Files
myep/templates/admin/accommodation_booking/index.html.twig
T

122 lines
5.4 KiB
Twig
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends 'layout_admin.html.twig' %}
{% block content %}
<twig:page:heading>Buchungen & Anfragen</twig:page:heading>
{{ include('_partials/_list_filter_bar.html.twig', {
'filter': filter,
'form': filter_form,
'route': 'app_admin_accommodationbooking',
'modal_route': 'app_admin_accommodationbooking_filter',
}) }}
<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>
Betreuer:in
</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>
{% if booking.managedBy is not null %}
{{ booking.managedBy.displayName }}
{% else %}
keine Zuordnung
{% endif %}
</td>
<td>
{{ booking.recordLabel }} · {% include 'admin/accommodation_booking/_status_label.html.twig' %}
</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>
{% if booking.confirmed %}
<twig:dropdown:link url="{{ path('app_admin_accommodationbooking_pdf', { 'id': booking.id }) }}">
PDF herunterladen
</twig:dropdown:link>
{% endif %}
</twig:dropdown>
</td>
</tr>
{% else %}
<tr>
<td colspan="9">
{{ filter.isActive ? 'Keine Treffer für diesen Filter.' : '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 %}