feat: tables and orders in the manager on v2 (platform-v2 step 6.9)

- manager: new pages/orders/ (Tables page cards + quick actions, order page with
  lines, multi-select pay/discount/cancel/tab, staff + customer, price changes,
  history, the menu + cart beside it); a free table opens a new order on first
  Send; v1 TablesPage, OrderDetailPage, DesktopOrderingTab, ManagerOrderDrawer
  and PaymentMethodModal removed
- ordering by line id like the phones: GET /api/orders/menu (the counter's
  product shape, in-store prices); the product dialog, cart rules and quote hook
  move to packages/ordering (@xenia/ordering), shared by counter, menu tablet,
  manager
- close follows orders.close_with_unpaid (pay first, or write off after saying
  so) on the order page and the overview's quick view; paying asks cash or card
- a confirmed booking can keep its table ahead (manager, phones, counter):
  POST /api/connect/bookings/{id}/table, reservations create/PATCH; refused with
  reservation.table_kept within 2 h of another booking
- tests: test_manager_ordering.py, online bookings +2, manager orders.test.mjs,
  @xenia/ordering, e2e manager.mjs (take, change, pay-first close, RESERVED)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-18 21:58:46 +02:00
co-authored by Claude Opus 5.5
parent f4aae6abbc
commit 070c9cf625
56 changed files with 2339 additions and 3846 deletions
+13
View File
@@ -117,5 +117,18 @@
"paid": "Paid",
"reserved": "Booked soon"
}
},
"ordering": {
"dialog": {
"close": "Close",
"add": "Add to cart",
"pickOne": "choose one",
"quick": "Add-ons",
"extras": "Extras",
"without": "Without",
"note": "Note for the kitchen",
"quantity": "Quantity",
"missing": "Still to choose: {{list}}"
}
}
}
+2 -1
View File
@@ -157,7 +157,8 @@
"not_found": "Booking {{reservation_id}} not found.",
"status_changed": "This booking was changed on another screen in the meantime (it is now {{current}}).",
"table_unknown": "Table {{table_id}} not found.",
"table_busy": "That table already has an open order. Pick another table, or close that order first."
"table_busy": "That table already has an open order. Pick another table, or close that order first.",
"table_kept": "That table is already kept for {{name}} at {{time}}."
},
"display": {
"qr_url_missing": "Enter the link the QR code opens.",
+172
View File
@@ -2182,5 +2182,177 @@
"rotateRight": "Turn right 15°",
"takeOff": "Take it off the plan",
"removeThing": "Remove"
},
"orders": {
"back": "Back",
"toTables": "Tables",
"title": "Table {{table}}",
"titleNoTable": "Order #{{id}}",
"newTitle": "Table {{table}}: new order",
"newHint": "Pick what they order and send it: the order opens with the first send.",
"notFound": "This order can't be found.",
"total": "Total",
"paid": "Paid",
"due": "Still to pay",
"tabs": {
"order": "Order",
"prices": "Price changes",
"history": "History"
},
"payAll": "Pay everything",
"close": "Close",
"cancel": "Cancel order",
"closed": "Order closed",
"cancelled": "Order cancelled",
"confirmClose": "Close the order?",
"writeOffTitle": "Close with unpaid items?",
"writeOffBody_one": "{{count}} line ({{amount}}) is not paid. Closing writes it off: it counts as not paid in the reports.",
"writeOffBody_other": "{{count}} lines ({{amount}}) are not paid. Closing writes them off: they count as not paid in the reports.",
"writeOff": "Close without paying",
"payAndClose": "Take the payment and close",
"cancelTitle": "Cancel the whole order?",
"cancelBody": "Every line not paid is cancelled. Should the kitchen get a cancellation ticket?",
"printer": "Printer…",
"print": "Print",
"printing": "Sent to the printer…",
"pay": {
"title_one": "Pay {{count}} line",
"title_other": "Pay {{count}} lines",
"closeTitle": "Pay the rest and close",
"closeBody": "This venue takes the payment before an order closes (Settings: close with unpaid items).",
"cash": "Cash",
"card": "Card",
"noCard": "The venue doesn't take cards (Settings).",
"done": "Paid",
"method": {
"cash": "Cash",
"card": "Card",
"transfer": "Transfer",
"treat": "On the house",
"comp": "On the house",
"other": "Other"
}
},
"lines": {
"none": "Nothing ordered yet.",
"pick": "Pick {{name}}",
"free": "FREE",
"notPrinted": "Not printed",
"status": {
"paid": "Paid",
"cancelled": "Cancelled",
"tabbed": "On the tab",
"closed": "Written off"
},
"without": "Without {{list}}",
"added": "{{time}} · {{name}}",
"paidBy": "paid by {{name}}",
"each": "{{price}} each",
"picked_one": "{{count}} line picked · {{amount}}",
"picked_other": "{{count}} lines picked · {{amount}}",
"clear": "Clear",
"toTab": "On the tab",
"tabbed": "Put on the customer's tab",
"discount": "Discount",
"cancel": "Cancel",
"pay": "Pay",
"cancelTitle_one": "Cancel {{count}} line?",
"cancelTitle_other": "Cancel {{count}} lines?",
"cancelBody": "Should the kitchen get a cancellation ticket?",
"cancelNoPrint": "Cancel, no ticket",
"cancelPrint": "Cancel and print",
"cancelled_one": "{{count}} line cancelled",
"cancelled_other": "{{count}} lines cancelled"
},
"discount": {
"title_one": "Discount on {{count}} line",
"title_other": "Discount on {{count}} lines",
"body": "A percentage off; the new price rounds to the nearest 0.10. Your discount limits apply.",
"pct": "Discount (%)",
"about": "About {{amount}}",
"note": "Why (optional)",
"apply": "Apply",
"done": "Discount applied"
},
"people": {
"staff": "Staff",
"noStaff": "No one yet.",
"add": "Add someone…",
"remove": "Take {{name}} off",
"customer": "Customer",
"noCustomer": "No customer.",
"customerAdd": "Add a customer",
"customerSearch": "Search by name or phone…",
"customerNone": "No customers found.",
"customerRemove": "Take the customer off"
},
"history": {
"none": "Nothing recorded.",
"noPrices": "No price changes on this order.",
"duplicate": "COUNTED TWICE",
"offline": "offline",
"by": "by {{name}}",
"event": {
"ORDER_OPENED": "Opened",
"ITEMS_ADDED": "Added",
"PAYMENT": "Payment",
"PAYMENT_OFFLINE": "Payment (offline)",
"ORDER_CLOSED": "Closed",
"ORDER_CANCELLED": "Cancelled",
"ITEM_CANCELLED": "Line cancelled"
},
"price": {
"modifier_applied": "Price rule",
"deal_triggered": "Deal",
"deal_offer_shown": "Deal offered",
"deal_offer_accepted": "Deal accepted",
"deal_offer_dismissed": "Deal declined",
"waiter_discount": "Discount",
"free_item_added": "Free item"
}
},
"add": {
"search": "Search the menu…",
"all": "All",
"service": "Service",
"nothing": "Nothing here.",
"soldOut": "Sold out",
"toSend": "To send",
"empty": "Tap a product to add it.",
"less": "One less",
"more": "One more",
"note": "Note for the whole order (optional)",
"clear": "Clear",
"send": "Send",
"sent": "Sent to the kitchen",
"notPrinted": "Sent, but not printed on: {{printers}}"
},
"tables": {
"zone": "Zone",
"allZones": "All zones",
"noZone": "No zone",
"none": "No tables match.",
"open": "Table {{table}}, {{state}}",
"notPrinted": "Not printed",
"reserved": "Booked {{time}} · {{name}}",
"time": "Time",
"seats_one": "{{count}} seat",
"seats_other": "{{count}} seats",
"noWaiter": "No waiter",
"view": "Open",
"take": "Take an order"
},
"quick": {
"title": "Table {{table}}: quick actions",
"flags": "Flags",
"noFlags": "No flags yet (Settings).",
"notify": "Tell the waiters",
"message": "Or type a message…",
"toAll": "To everyone",
"toTable": "To this table's waiters",
"save": "Save",
"saved": "Flags saved",
"sent": "Flags saved and message sent"
}
}
}
+7 -12
View File
@@ -183,17 +183,6 @@
"less": "One less",
"more": "One more",
"each": "{{price}} each",
"dialog": {
"close": "Close",
"add": "Add to cart",
"pickOne": "choose one",
"quick": "Add-ons",
"extras": "Extras",
"without": "Without",
"note": "Note for the kitchen",
"quantity": "Quantity",
"missing": "Still to choose: {{list}}"
},
"gate": {
"dayClosed": "The business day isn't open",
"dayOpeners": "Ask someone who can open it: {{names}}.",
@@ -463,7 +452,10 @@
"noTable": "No table yet",
"arrive": "They're here: seat them",
"cancel": "Cancel",
"noShow": "No-show"
"noShow": "No-show",
"keep": "Keep this table for them",
"release": "Don't keep a table",
"busyNow": "busy now"
},
"call": {
"title": "Incoming call",
@@ -471,6 +463,9 @@
"takeaway": "New takeaway sale",
"visits_one": "{{count}} visit · {{spent}}",
"visits_other": "{{count}} visits · {{spent}}"
},
"dialog": {
"close": "Close"
}
},
"display": {
+4 -1
View File
@@ -841,7 +841,10 @@
"closed": "We're closed then",
"party": "Private event",
"other": "Other reason"
}
},
"keep": "Keep this table for them",
"release": "Don't keep a table",
"busyNow": "busy now"
},
"tabletOrder": {
"title": "Ordered from the tablet",