(#3) - templating

This commit is contained in:
Martin Slachta
2026-06-14 07:16:13 +02:00
parent 37bced77f4
commit 7b3d9f0ece
32 changed files with 870 additions and 126 deletions
@@ -37,6 +37,16 @@ class RsvReservationSelector extends HTMLElement {
this.querySelectorAll('.rsv-slots-slot-selected').forEach(s => s.classList.remove('rsv-slots-slot-selected'));
this._slots = [];
this._commit();
// _commit clears only the slots; keep the picked date selected, re-asserting
// it in case a surrounding form.reset() just unchecked the calendar radio.
this._calendar?.reselect();
}
// Reset for a new reservation: drop the local selection (keeping the date) and
// reload availability so slots booked by the previous submission show as full.
reset() {
this.clear();
this.querySelector('rsv-timeline')?.refresh();
}
// ---- Private ------------------------------------------------------------