feat: groups price calculator admin crud, booking/offer flow and api

This commit is contained in:
Björn Fromme
2026-08-03 15:25:10 +02:00
parent eabed8295a
commit 9d2aa11fdb
258 changed files with 16231 additions and 582 deletions
@@ -0,0 +1,100 @@
{% 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>
{% if booking.isInquiry %}
Anfrage
{% else %}
Buchung
{% endif %}
</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">
<a href="{{ path('app_admin_accommodationbooking_create') }}" class="button button--primary button--small">
neu
</a>
</div>
{% endblock %}