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": "Η γραμμή {{line}} του καλαθιού δεν μπορεί να πουληθεί όπως επιλέχθηκε ({{reason}}).",
"shift_required": "Ξεκινήστε τη βάρδιά σας πριν πουλήσετε.",
"payment_invalid": "Αυτή η πληρωμή δεν βγαίνει ({{reason}}).",
"fiscal_vat_missing": "Οι φορολογικές αποδείξεις είναι ενεργές, αλλά αυτά τα προϊόντα δεν έχουν ομάδα ΦΠΑ: {{names}}."
"fiscal_vat_missing": "Οι φορολογικές αποδείξεις είναι ενεργές, αλλά αυτά τα προϊόντα δεν έχουν ομάδα ΦΠΑ: {{names}}.",
"table_not_found": "Δεν βρέθηκε το τραπέζι {{table_id}}.",
"table_not_yours": "Το {{table}} δεν είναι στις ζώνες σας. Ένας διαχειριστής μπορεί να προσθέσει τη ζώνη στον λογαριασμό σας.",
"items_changed": "Κάποια από αυτά πληρώθηκαν ή ακυρώθηκαν στο μεταξύ. Ελέγξτε την παραγγελία και δοκιμάστε ξανά.",
"order_unpaid": "Απλήρωτα είδη: {{count}}. Πάρτε την πληρωμή ή ακυρώστε τα πρώτα."
}
}
+53
View File
@@ -237,6 +237,59 @@
"again": "Τα ίδια ξανά",
"toast": "Πληρώθηκε",
"toastChange": "Πληρώθηκε. Ρέστα: {{change}}"
},
"mode": {
"label": "Λειτουργία ταμείου",
"sale": "Πώληση",
"tables": "Τραπέζια"
},
"tables": {
"none": "Δεν έχετε τραπέζια",
"noneBody": "Βλέπετε τα τραπέζια των ζωνών σας, όπως στην εφαρμογή σερβιτόρου. Ένας διαχειριστής μπορεί να προσθέσει ζώνες στον λογαριασμό σας.",
"allZones": "Όλες οι ζώνες",
"state": {
"free": "Ελεύθερο",
"mine": "Δικό σας",
"open": "Πιασμένο",
"paid": "Πληρωμένο, ανοιχτό"
},
"ofTotal": "από {{total}}",
"since": "από τις {{time}}",
"ready_one": "{{count}} έτοιμο",
"ready_other": "{{count}} έτοιμα",
"reserved": "Κράτηση {{time}} · {{name}} ({{count}})",
"noZone": "Χωρίς ζώνη"
},
"table": {
"back": "Πίσω στα τραπέζια",
"closedElsewhere": "Το {{table}} έκλεισε από άλλη συσκευή.",
"sent": "Στάλθηκε στο {{table}}",
"closed": "Το {{table}} έκλεισε",
"cancelled_one": "Ακυρώθηκε {{count}} είδος",
"cancelled_other": "Ακυρώθηκαν {{count}} είδη",
"onOrder": "Στην παραγγελία",
"new": "Νέα, δεν έχουν σταλεί",
"empty": "Δεν υπάρχει τίποτα ακόμη σε αυτό το τραπέζι",
"emptyBody": "Πατήστε προϊόντα για να τα προσθέσετε και μετά στείλτε τα στο τραπέζι.",
"newTotal": "Νέα είδη",
"send": "Αποστολή στο {{table}}",
"due": "Υπόλοιπο",
"paySelected": "Πληρωμή επιλεγμένων {{amount}}",
"payAll": "Πληρωμή όλων {{amount}}",
"cancel": "Ακύρωση επιλεγμένων",
"selectAll": "Επιλογή όλων",
"selectNone": "Καμία επιλογή",
"close": "Κλείσιμο {{table}}",
"cancelTitle_one": "Ακύρωση {{count}} είδους;",
"cancelTitle_other": "Ακύρωση {{count}} ειδών;",
"cancelBody": "Φεύγουν από τον λογαριασμό και η κουζίνα παίρνει δελτίο ακύρωσης. Αν δεν μπορείτε να ακυρώσετε σταλμένα είδη, το εγκρίνει ένας διαχειριστής με το PIN του.",
"keep": "Να μείνουν",
"cancelConfirm": "Ακύρωση ειδών",
"paidBy": {
"cash": "πληρώθηκε · μετρητά",
"card": "πληρώθηκε · κάρτα"
},
"readyItem": "έτοιμο"
}
}
}
+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"
}
}
}