chore: code cleanup
This commit is contained in:
1 parent
1a3640b15c
commit
5a01054b0e
65 files changed
+1046
-795
No files matched your search
@@ -12,7 +12,7 @@
|
||||
<div class="mt-8 grid gap-8 xl:grid-cols-3">
|
||||
<div class="xl:col-span-1">
|
||||
{#
|
||||
The two blocks below are what BoardController::day and BookingController swap out
|
||||
The two blocks below are what Board\DayController and the booking controllers swap out
|
||||
of band. Each one owns a stable id and emits hx-swap-oob only when rendered
|
||||
through htmxOobResponse -- rendered normally they are plain markup.
|
||||
#}
|
||||
@@ -34,7 +34,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{#
|
||||
Removes whatever modal is open, out of band. Only BookingController::boardResponse() renders
|
||||
Removes whatever modal is open, out of band. Only Booking\ReleaseController renders
|
||||
it, and only for a confirmation that was opened over another modal -- the confirmation swaps
|
||||
itself away by targeting its own element, which leaves the one underneath behind.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
The shared shape a plan is drawn from. Imported by each board/plan/_<type>.html.twig, so the
|
||||
per-type partials carry geometry only and the states look identical everywhere.
|
||||
|
||||
The state comes from App\Booking\Spot, not from counting bookings here. That distinction is
|
||||
The state comes from App\Model\Spot, not from counting bookings here. That distinction is
|
||||
the fix for a real bug: a desk booked 09:00-13:00 used to render exactly like one booked all
|
||||
day on an all-day board, and carried no hx-get either -- so a second person could not book the
|
||||
afternoon at all unless they happened to narrow the span by hand first.
|
||||
@@ -94,7 +94,7 @@
|
||||
hx-swap="beforeend"
|
||||
{%- elseif interactive %}
|
||||
{# The modal is appended to the end of <body>; closing it is Stimulus, not htmx.
|
||||
It prefills the free window itself -- see BookingController::create. #}
|
||||
It prefills the free window itself -- see Booking\CreateController. #}
|
||||
hx-get="{{ path('app_booking_new', { id: spot.resource.id, date: selected_date|date('Y-m-d') }|merge(time_params)) }}"
|
||||
hx-target="body"
|
||||
hx-swap="beforeend"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<div class="flex flex-wrap justify-between gap-2 pt-6">
|
||||
{# 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(). #}
|
||||
Confirming removes both modals -- see Booking\ReleaseController. #}
|
||||
<button type="button" class="button button--small button--warning"
|
||||
hx-get="{{ path('app_booking_release', { id: booking.id }) }}"
|
||||
hx-target="body"
|
||||
|
||||
Reference in new issue
Block a user