feat(connect): table bookings from the online ordering app; food fired to the kitchen before arrival

Plan phase 3S, step S.6.
- Pull: "reservation" / "preorder" orders become Reservations waiting for an answer
  (status "requested"; services/online_reservations.py), with the food ordered ahead kept on
  the booking (items_json at the cloud's prices, the site's price check) — no order yet.
  Migration 0020 (reservations: online_order_cloud_id, online_ref, items_json, total,
  online_price_diff, fire_at, order_id, response_note).
- Confirm → the food's fire time = booking time − fire minutes (setting); the fire worker
  (connect_orders, every 20 s) turns the food into an order at that time (needs an open
  business day; waits otherwise): kitchen tickets, KDS (reference and time). Early arrival
  fires at once. Seating moves the order to the table (refused if the table has an open
  order). Decline / cancel / no-show with a reason. Every step mirrored to the cloud.
- Found: the KDS filter dropped every online order without an online status (SQL NULL in
  NOT(a AND b)) — made NULL-safe.
- Counter: Online → Bookings (requests first, then upcoming), BookingPanel (confirm,
  decline with reasons, food and when it goes to the kitchen, seat at a free table, cancel,
  no-show); the Online badge and chime count booking requests.
- Manager: Online ordering → Table bookings settings (on, food ahead, hours, slot, notice,
  days ahead, party size, fire minutes); the dashboard's reservations card confirms /
  declines online requests; the reservations router delegates online bookings' status steps.
- Tests: tests/test_online_bookings.py (8), unit tests (terminal, manager), e2e: order app
  (book with food → the venue confirms), terminal (request → confirm → the two dishes reach
  the KDS at the fire time, not before → seated), manager (booking settings).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 19:31:44 +02:00
co-authored by Claude Opus 5.5
parent 0ca700279a
commit 70c8f2bb57
33 changed files with 1402 additions and 105 deletions
+38 -1
View File
@@ -300,7 +300,8 @@
"lists": {
"incoming": "New",
"in_progress": "In progress",
"finished": "Finished"
"finished": "Finished",
"bookings": "Bookings"
},
"empty": {
"incoming": "No new online orders",
@@ -427,6 +428,42 @@
"card": "The refund of {{amount}} (card) is recorded. The system can't send credit notes to this fiscal machine yet: issue it on the machine now."
},
"fiscalManualOk": "Done"
},
"bookings": {
"arrived_one": "New table booking request",
"arrived_other": "{{count}} new table booking requests",
"empty": "No bookings",
"emptyBody": "Table bookings from the online ordering app show here, with a sound.",
"pick": "Pick a booking to see it",
"withFood": "Food ordered ahead",
"people_one": "{{count}} person",
"people_other": "{{count}} people",
"today": "Today {{time}}",
"status": {
"requested": "Waiting for an answer",
"pending": "Confirmed",
"arrived": "Seated",
"declined": "Declined",
"cancelled": "Cancelled",
"no_show": "No-show"
},
"foodSent": "The food has gone to the kitchen",
"foodAt": "The food goes to the kitchen: {{time}}",
"foodOnConfirm": "The food goes to the kitchen before they arrive, once confirmed",
"confirm": "Confirm booking",
"decline": "Decline",
"declineTitle": "Decline this booking?",
"reasons": {
"full": "We're fully booked then",
"closed": "We're closed then",
"party": "We can't seat a party this size",
"other": "Other reason…"
},
"table": "Table",
"noTable": "No table yet",
"arrive": "They're here: seat them",
"cancel": "Cancel",
"noShow": "No-show"
}
}
}