Hoppa till huvudinnehåll
Petanque Life

F&B Menu & Meal Orders (PL-T188)

F22.06 11 features

I korthet

Food and drink menu management plus per-booking meal orders that flow straight into the kitchen station printers. Multi-language items with EU-14 allergens and dietary flags, bundled MenuPackages with min-party-size enforcement, time-window availability for lunch specials, allergen acknowledgement gating, ESC/POS thermal-printer routing with PDF-by-email and manual fallbacks, idempotent reprint, and a kitchen display fed by SSE for live preparation status.

Så fungerar det

MenuItem stores multi-language names and descriptions, the EU-14 allergen list, dietary flags (vegetarian, vegan, gluten-free, halal, kosher), the kitchen station that should prepare it (cold, grill, fryer, bar), and the course (starter, main, dessert, drink). MenuPackage bundles items at a price strictly less than original_total, with min_party_size enforcement so a "sharing platter for four" can't be added to a booking of two. MealOrder is attached to a Booking; its subtotal/total rolls into Booking.total_amount, so a single payment captures both lane and food.

Time-window availability (available_from / available_until HH:MM strings on each item) means lunch specials disappear from the menu after 14:00. When a customer has declared allergens on their profile, the wizard surfaces an allergen acknowledgement gate before submit — they must explicitly confirm conflicts. On submit, the order writes with status = ordered, the kitchen-printout pipeline serializes an ESC/POS payload over raw TCP to the configured station printer, with PDF-by-email and a manual print-from-screen mode as fallbacks.

Reprint is idempotent — the first-print timestamp is stamped once and reprints are recorded on the audit trail without double-firing the printer. The status lifecycle (draft → ordered → preparing → ready → delivered → cancelled) drives a kitchen display screen that polls GET /chain/kitchen/queue filtered by station and broadcasts on chain.kitchen.{tenant}.{location} via SSE so any updates appear instantly. A second SSE channel chain.bookings.{tenant}.{location} keeps the front-of-house calendar in sync.

The customer CMS picks the right language via Accept-Language.

Centrala funktioner

  • Multi-language menu items with EU-14 allergens + dietary flags
  • MenuPackage bundles with min-party-size enforcement
  • MealOrder rolled into Booking.total_amount + time-window availability
  • Allergen acknowledgement gate when customer has declared conflicts
  • ESC/POS thermal-printer over raw TCP with PDF + manual fallback + idempotent reprint
  • Kitchen display via SSE on chain.kitchen.{tenant}.{location}
  • Status lifecycle: draft → ordered → preparing → ready → delivered

I praktiken

A party of four books lane and dinner via the customer CMS. After picking a 19:00 lane they're prompted with three menu packages — the wizard hides the "Sharing platter for six" because party_size = 4 < 6. They pick the "Boule night for four" bundle, two beers, and a vegan starter.

One person has flagged peanut allergy; the wizard renders the allergen ack and they confirm the kitchen has been notified. On submit, the order prints to the cold station for the starter and the bar printer for drinks — the chef sees "Booking #4521 — Lane 7" on the kitchen display. As the chef marks each course preparing → ready, the operator's tablet pings via SSE and a runner brings the food.

Total payment captures lane + food in one Stripe charge.

Features i detta subsystem

11
ID Status Funktioner
F22.06.01 Levererad MenuItem with multi-language name/description, EU-14 allergens, dietary flags, kitchen station, course
F22.06.02 Levererad MenuPackage with bundle pricing (price < original_total) and min_party_size enforcement
F22.06.03 Levererad MealOrder attached to Booking; subtotal/total rolls into Booking.total_amount
F22.06.04 Levererad Kitchen printout — ESC/POS thermal-printer payload over raw TCP, PDF-by-email fallback, manual mode
F22.06.05 Levererad Time-window availability (available_from / available_until HH:MM)
F22.06.06 Levererad Allergen acknowledgement gate when customer has declared allergens
F22.06.07 Levererad Status lifecycle (draft/ordered/preparing/ready/delivered/cancelled) with audit trail
F22.06.08 Levererad Reprint with idempotent first-print timestamp + audit trail
F22.06.09 Levererad SSE broadcast on chain.kitchen.{tenant}.{location} and chain.bookings.{tenant}.{location}
F22.06.10 Levererad GET /chain/kitchen/queue filtered by status with per-tenant + per-location isolation
F22.06.11 Levererad Multi-language menu listing via Accept-Language header