Rezervasyon (/rezervasyon)

Reservation book: create/update/cancel bookings, prep carts, warn settings, and seat/activate onto tables. Internal tab id: rezervasyon.

Also surfaces on Masalar as overlays and auto-activate behavior.

Who can open it

Barkasa and patron when reservation.manage is true (default for those roles). Garson never gets this tab.

Purpose

  • CRUD reservations (guest, phone, party size, time, table intent)
  • Build prep items before the guest is seated
  • Configure open-table warn minutes (/restaurant-settings/warn/)
  • Activate / seat a reservation onto the live floor
  • Search and group by day

Key files

Area Paths
Manager src/components/pos/ReservationManager.tsx
Form / prep ReservationForm.tsx, ReservationPrepPanel.tsx, ReservationPrepMenu.tsx, ReservationGuestPhone.tsx
Lib src/lib/reservation.functions.ts, src/lib/reservations/*
Auto seat useReservationAutoActivate (and related timers)
Floor preview ReservationPreviewDialog.tsx on Masalar

Data & APIs

Call Role
/api/reservations/ (+ update / cancel / prep-items / activate) Lifecycle
/api/restaurant-settings/warn/ Warn minutes
Shared confirmed list Fed into AdminPage / floor

Timers: ~10s clock ticks in manager UI; auto-activate cadence ~15s on the floor side.

State

  • Shared confirmed reservations list from host queries
  • Local form / prep panel state
  • Overlap and prep helpers in src/lib/reservations

UX details

  • Search
  • Day grouping
  • Warn when target table is already open
  • Prep menu before seating so kitchen/bar can start early
  • Floor cards show reservation state and can wake/activate

Development notes

  • Overlap rules belong in src/lib/reservations — keep UI free of ad-hoc time math
  • Activating must stay consistent with table-group and active-order APIs used on Masalar
  • Changing warn settings should invalidate restaurant-settings queries
  • Do not grant reservation.manage to garson without an explicit product decision (nav + permissions)