feat(backend,terminal): tables at the counter, shared live with the waiter phones (platform-v2 3.3c)

- POS: GET /api/pos/tables (the cashier's zones as in the waiter app, each open order's
  totals, people, ready items, flags, reservation), POST /api/pos/tables/{id}/items (into
  the table's order or a new one via orders.open_order + add_items), POST
  /api/pos/orders/{id}/pay (chosen items, cash/card/split, drawer on cash), POST
  /api/pos/orders/{id}/close (only when nothing is unpaid). Quote takes order_id so the
  order's items count for cart conditions (shared pos_cart.order_cart, used by add_items).
- New codes pos.table_not_found, pos.table_not_yours, pos.items_changed, pos.order_unpaid.
- Fix: item cancels (DELETE item, cancel-items) now broadcast order_updated, so phones and
  kitchen screens see them at once.
- Terminal: Sale | Tables switch, zone list, table cards by zone, TablePanel (order lines,
  new lines, send, pay selected/all, cancel with approval, close), generic PaymentDialog.
- Tests: test_pos_tables.py (8), terminal unit, terminal.mjs +17 with a live phone socket.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 02:15:54 +02:00
co-authored by Claude Opus 5.5
parent bff82a332a
commit 988d413d8e
19 changed files with 1452 additions and 218 deletions
+5 -1
View File
@@ -82,6 +82,10 @@
"line_invalid": "Cart line {{line}} can't be sold as chosen ({{reason}}).",
"shift_required": "Start your shift before selling.",
"payment_invalid": "This payment doesn't add up ({{reason}}).",
"fiscal_vat_missing": "Fiscal receipts are on, but these products have no VAT group: {{names}}."
"fiscal_vat_missing": "Fiscal receipts are on, but these products have no VAT group: {{names}}.",
"table_not_found": "Table {{table_id}} not found.",
"table_not_yours": "{{table}} isn't in your zones. A manager can add the zone to your account.",
"items_changed": "Some of these items were paid or cancelled in the meantime. Check the order and try again.",
"order_unpaid": "Items still unpaid: {{count}}. Take the payment or cancel them first."
}
}
+53
View File
@@ -237,6 +237,59 @@
"again": "Same again",
"toast": "Paid",
"toastChange": "Paid. Change: {{change}}"
},
"mode": {
"label": "Counter mode",
"sale": "Sale",
"tables": "Tables"
},
"tables": {
"none": "No tables for you",
"noneBody": "You see the tables of your zones, as in the waiter app. A manager can add zones to your account.",
"allZones": "All zones",
"state": {
"free": "Free",
"mine": "Yours",
"open": "Taken",
"paid": "Paid, not closed"
},
"ofTotal": "of {{total}}",
"since": "since {{time}}",
"ready_one": "{{count}} ready",
"ready_other": "{{count}} ready",
"reserved": "Reserved {{time}} · {{name}} ({{count}})",
"noZone": "No zone"
},
"table": {
"back": "Back to the tables",
"closedElsewhere": "{{table}} was closed on another device.",
"sent": "Sent to {{table}}",
"closed": "{{table}} is closed",
"cancelled_one": "{{count}} item cancelled",
"cancelled_other": "{{count}} items cancelled",
"onOrder": "On the order",
"new": "New, not sent yet",
"empty": "Nothing on this table yet",
"emptyBody": "Tap products to add them, then send them to the table.",
"newTotal": "New items",
"send": "Send to {{table}}",
"due": "Still due",
"paySelected": "Pay selected {{amount}}",
"payAll": "Pay everything {{amount}}",
"cancel": "Cancel selected",
"selectAll": "Select all",
"selectNone": "Select none",
"close": "Close {{table}}",
"cancelTitle_one": "Cancel {{count}} item?",
"cancelTitle_other": "Cancel {{count}} items?",
"cancelBody": "They come off the bill and the kitchen gets a cancellation ticket. If you can't cancel sent items, a manager approves it with their PIN.",
"keep": "Keep them",
"cancelConfirm": "Cancel items",
"paidBy": {
"cash": "paid · cash",
"card": "paid · card"
},
"readyItem": "ready"
}
}
}