feat(chatelet): stay calendar, room gallery + house rules, My bookings #156

Merged
padreug merged 4 commits from feat/chatelet-my-bookings into dev 2026-09-21 09:12:07 +00:00
Owner

Four commits on top of #154/#155:

  • shadcn range-calendar primitive over reka-ui RangeCalendarRoot.
  • Availability calendar: one range picker fed by the extension's keyless
    unavailable-ranges feed replaces the two date inputs and the manual
    check. Occupied nights are struck through, a stay can't straddle one,
    check-out may land on another guest's arrival morning, min_nights
    enforced. A complete stay quotes itself.
  • Room page: shared ImageViewer gallery and a 'Things to know' card fed by
    the owner's operator settings (renders only when the extension sends them).
  • /my-bookings (auth-required, mirrors events' /my-tickets) from
    GET /bookings/mine, plus the standalone's first bottom tabs.

Needs chatelet ≥ v0.5.0 for the unavailable feed; the house rules and
My bookings need the operator-settings / bookings-mine slices
(aiolabs/chatelet#22), so those two cards stay empty on an instance
running only v0.5.0.

Four commits on top of #154/#155: - shadcn range-calendar primitive over reka-ui RangeCalendarRoot. - Availability calendar: one range picker fed by the extension's keyless unavailable-ranges feed replaces the two date inputs and the manual check. Occupied nights are struck through, a stay can't straddle one, check-out may land on another guest's arrival morning, min_nights enforced. A complete stay quotes itself. - Room page: shared ImageViewer gallery and a 'Things to know' card fed by the owner's operator settings (renders only when the extension sends them). - /my-bookings (auth-required, mirrors events' /my-tickets) from GET /bookings/mine, plus the standalone's first bottom tabs. Needs chatelet ≥ v0.5.0 for the unavailable feed; the house rules and My bookings need the operator-settings / bookings-mine slices (aiolabs/chatelet#22), so those two cards stay empty on an instance running only v0.5.0.
Port of ui/calendar onto reka-ui's RangeCalendar* parts, same slot shape.
The cell trigger gains range states — accent tint for the nights inside
the range, primary pills on the two ends — and a real unavailable look
(struck through, muted, not a pointer target).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Replace the two date pickers and the manual 'Check availability' button
with one range calendar fed by the extension's keyless unavailable-ranges
endpoint (chatelet ≥ v0.5.0): occupied nights are struck through, a stay
can never straddle one, and check-out may land on the morning another
guest arrives (half-open nights). Two months on sm+, one on phones.

reka-ui only guards clicks with isDateDisabled and hides selected
styling on isDateUnavailable days, so the matchers are selection-aware:
once a check-in is chosen the first occupied night after it stops being
unavailable (it is the last legal check-out) and every later day is
disabled; min_nights is enforced the same way. Both matchers close over
refs because reka reads them once at setup.

Picking a complete stay quotes it automatically; the quote card shows
rate × nights and the total. A quote that contradicts the local calendar
refreshes it (someone else's hold appeared), as does a confirmed booking.
The /login?redirect round-trip of dates is unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Swap the single hero image for the shared ImageViewer (thumbnails,
lightbox and cycle controls when a room has more than one photo, as the
marketplace product page does) and add a 'Things to know' card: check-in
from / check-out by, guest cap, minimum stay and the cancellation policy.
The rules come from the room owner's operator settings (chatelet ≥ v0.5.0)
so the card only renders when the extension sends them.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
/my-bookings (auth-required, mirrors events' /my-tickets) lists the
signed-in guest's stays from the extension's new GET /bookings/mine
(chatelet ≥ v0.5.0): upcoming and past, room title and photo joined from
the public room list, dates and nights, guest count, amount, and a status
badge — unpaid holds show until when the hold lasts. The standalone app
gains its first bottom tabs, Rooms and My bookings, the latter ghosted
with a log-in toast when signed out; the booking confirmation links there.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
padreug deleted branch feat/chatelet-my-bookings 2026-09-21 09:12:07 +00:00
Sign in to join this conversation.
No description provided.