feat: add admin views, a booking horizon and confirmation modals

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
frommeandClaude Opus 5 committed 2026-09-14 09:40:17 +02:00
1 parent 8caf618950
commit 1a3640b15c
27 files changed
+1269 -62

No files matched your search

+8 -8
View File
@@ -4,7 +4,8 @@
differing from it.
Releasing lives here too rather than on the floor plan, so the SVG needs no confirm dialogs
or inline CSRF tokens -- clicking your own desk always just opens this.
or inline CSRF tokens -- clicking your own desk always just opens this. The release button
opens the shared confirmation modal over this one.
#}
{% extends 'htmx_modal.html.twig' %}
@@ -32,14 +33,13 @@
{% include 'booking/_fields.html.twig' %}
<div class="flex flex-wrap justify-between gap-2 pt-6">
{# type="button" with its own hx-post: htmx issues the release request directly, so
this never submits the surrounding edit form and no nested <form> is needed. #}
{# type="button" with its own hx-get: htmx opens the confirmation modal over this
one, so nothing submits the surrounding edit form and no nested <form> is needed.
Confirming removes both modals -- see BookingController::boardResponse(). #}
<button type="button" class="button button--small button--warning"
hx-post="{{ path('app_booking_release', { id: booking.id }) }}"
hx-vals='{{ { _token: csrf_token('release-' ~ booking.id) }|json_encode }}'
hx-confirm="{{ resource.label }} am {{ booking.date|date('d.m.Y') }} freigeben?"
hx-target="#htmx-modal"
hx-swap="outerHTML">
hx-get="{{ path('app_booking_release', { id: booking.id }) }}"
hx-target="body"
hx-swap="beforeend">
Freigeben
</button>