feat(terminal): kitchen display on paired screens, live without polling (platform-v2 3.2b)

Port of the manager's KdsPage.jsx into terminal/src/apps/kds, split into pure logic
(layout packing, age, buckets, rounds, totals, status cycle, settings; unit-tested) and
components (card, item, action bars, dialogs, item totals, rails, settings panel).
- Settings are the device's config; the settings panel saves them (managers only),
  zoom changes the size for the session.
- Orders reload on live events and every reconnect; polling only while the live
  connection is down (DeviceProvider exposes liveUp; useLiveEvents helper).
- "Tap to start" unlocks sound; venue clock via useFormat; English-first texts.
- Undo of an item recomputes the order status at once; undo/redo clear the selection.
- Tests: terminal unit +15, terminal.mjs +12 KDS checks (no polling, live order + chime,
  item/undo/prepare/decline, settings permission, change made elsewhere), backend
  regression for an item back to pending.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-14 19:27:11 +02:00
co-authored by Claude Opus 5.5
parent d5c4400fde
commit 5f6d4ab428
24 changed files with 2550 additions and 12 deletions
+121
View File
@@ -33,5 +33,126 @@
"placeholder": "Αυτή η οθόνη τρέχει: {{app}}. Οι οθόνες της ετοιμάζονται.",
"unknownTitle": "Άγνωστη εφαρμογή",
"unknown": "Αυτή η οθόνη έχει οριστεί να τρέχει «{{app}}», που αυτό το τερματικό δεν έχει ακόμη. Ενημερώστε τον διακομιστή του καταστήματος."
},
"kds": {
"loading": "Φόρτωση…",
"empty": "Δεν υπάρχουν παραγγελίες για τα επιλεγμένα φίλτρα",
"cancel": "Ακύρωση",
"close": "Κλείσιμο",
"age": {
"new": "νέα",
"minutes": "{{m}}m",
"hours": "{{h}}h {{m}}m",
"ago": "πριν {{time}}"
},
"card": {
"items_one": "{{count}} είδος",
"items_other": "{{count}} είδη",
"status": {
"pending": "Αναμονή",
"preparing": "▶ Προετοιμασία",
"done": "✓ Έτοιμη"
},
"batch": "Παρτίδα {{n}}",
"noCourse": "Χωρίς πιάτο"
},
"channel": {
"here": "Εδώ",
"takeaway": "Takeaway",
"delivery": "Delivery"
},
"tabs": {
"all": "Όλα"
},
"actions": {
"prepare": "Σε εκτέλεση",
"complete": "Ολοκλήρωση",
"reset": "Επαναφορά",
"print": "Εκτύπωση",
"callWaiter": "Κάλεσε σερβιτόρο"
},
"quick": {
"prep": "Εκτέλεση",
"ready": "Έτοιμη",
"undo": "Αναίρεση",
"decline": "Απόρριψη",
"close": "Κλείσιμο"
},
"decline": {
"order": "Απόρριψη παραγγελίας",
"item": "Απόρριψη αντικειμένου",
"reasons": {
"out_of_stock": "Εξαντλήθηκε",
"too_many_orders": "Υπερβολικά πολλές παραγγελίες",
"other": "Άλλος λόγος"
},
"notePlaceholder": "Προσθέστε σημείωση (προαιρετικό)…"
},
"summary": {
"title": "Σύνοψη αντικειμένων",
"subtitle": "Αναμονή + προετοιμασία · {{count}} είδη",
"empty": "Κανένα αντικείμενο",
"button": "Σύνοψη"
},
"rail": {
"future": "Αργότερα",
"pending": "Αναμονή",
"preparing": "Εκτέλεση",
"done": "Έτοιμες",
"undo": "Αναίρεση",
"redo": "Επανάληψη",
"call": "Κλήση",
"sound": "Ήχος",
"muted": "Σίγαση",
"settings": "Ρυθμίσεις"
},
"zoom": {
"smaller": "Μικρότερο",
"larger": "Μεγαλύτερο"
},
"call": {
"title": "Κάλεσε σερβιτόρο",
"needsHelp": "Η {{zone}} θέλει βοήθεια",
"none": "Κανένας σερβιτόρος σε βάρδια",
"all": "Όλοι οι σερβιτόροι",
"send": "Κάλεσε",
"sendCount": "Κάλεσε ({{count}})",
"sending": "Αποστολή…"
},
"start": {
"title": "Πατήστε για έναρξη",
"body": "Η οθόνη χρειάζεται ένα πάτημα για να μπορεί να παίζει τον ήχο των νέων παραγγελιών."
},
"settings": {
"title": "Ρυθμίσεις οθόνης",
"save": "Αποθήκευση",
"seconds": "{{s}}δ",
"noPermission": "Μόνο ένας διαχειριστής μπορεί να αλλάξει τις ρυθμίσεις αυτής της οθόνης. Ζητήστε του να συνδεθεί εδώ.",
"tabs": {
"zone": "Ζώνη",
"behaviour": "Λειτουργία",
"board": "Εμφάνιση",
"age": "Χρόνος αναμονής",
"notifications": "Ειδοποιήσεις"
}
},
"toast": {
"newOrders_one": "{{count}} νέα παραγγελία",
"newOrders_other": "{{count}} νέες παραγγελίες",
"done": "✓ Ολοκληρώθηκε",
"preparing": "▶ Σε εκτέλεση",
"pending": "↩ Επαναφορά",
"waiterCalled": "Ειδοποίηση σερβιτόρου στάλθηκε",
"called": "Ειδοποίηση στάλθηκε",
"sendFailed": "Αποτυχία αποστολής",
"itemDeclined": "Αντικείμενο απορρίφθηκε",
"orderDeclined": "Παραγγελία απορρίφθηκε",
"declineFailed": "Σφάλμα απόρριψης",
"printSent": "Εκτύπωση εστάλη",
"printFailed": "Σφάλμα εκτύπωσης",
"undone": "Αναίρεση",
"redone": "Επανάληψη",
"settingsSaved": "Οι ρυθμίσεις αποθηκεύτηκαν"
}
}
}
+121
View File
@@ -33,5 +33,126 @@
"placeholder": "This screen runs {{app}}. Its screens are being built.",
"unknownTitle": "Unknown app",
"unknown": "This screen is set to run \"{{app}}\", which this terminal doesn't have yet. Update the venue server."
},
"kds": {
"loading": "Loading…",
"empty": "No orders for the selected filters",
"cancel": "Cancel",
"close": "Close",
"age": {
"new": "new",
"minutes": "{{m}}m",
"hours": "{{h}}h {{m}}m",
"ago": "{{time}} ago"
},
"card": {
"items_one": "{{count}} item",
"items_other": "{{count}} items",
"status": {
"pending": "To do",
"preparing": "▶ Prep",
"done": "✓ Done"
},
"batch": "Round {{n}}",
"noCourse": "No course"
},
"channel": {
"here": "Here",
"takeaway": "Takeaway",
"delivery": "Delivery"
},
"tabs": {
"all": "All"
},
"actions": {
"prepare": "In progress",
"complete": "Done",
"reset": "Back",
"print": "Print",
"callWaiter": "Call waiter"
},
"quick": {
"prep": "Prep",
"ready": "Ready",
"undo": "Undo",
"decline": "Decline",
"close": "Close"
},
"decline": {
"order": "Decline order",
"item": "Decline item",
"reasons": {
"out_of_stock": "Out of stock",
"too_many_orders": "Too many orders",
"other": "Other reason"
},
"notePlaceholder": "Add a note (optional)…"
},
"summary": {
"title": "Item totals",
"subtitle": "To do + in progress · {{count}} kinds",
"empty": "No items",
"button": "Totals"
},
"rail": {
"future": "Later",
"pending": "To do",
"preparing": "Prep",
"done": "Done",
"undo": "Undo",
"redo": "Redo",
"call": "Call",
"sound": "Sound",
"muted": "Muted",
"settings": "Settings"
},
"zoom": {
"smaller": "Smaller text",
"larger": "Larger text"
},
"call": {
"title": "Call a waiter",
"needsHelp": "{{zone}} needs help",
"none": "No waiter is on shift",
"all": "All waiters",
"send": "Call",
"sendCount": "Call ({{count}})",
"sending": "Sending…"
},
"start": {
"title": "Tap to start",
"body": "The screen needs one tap before it can play the sound for new orders."
},
"settings": {
"title": "Screen settings",
"save": "Save",
"seconds": "{{s}}s",
"noPermission": "Only a manager can change this screen's settings. Ask one to sign in here.",
"tabs": {
"zone": "Prep zone",
"behaviour": "Behaviour",
"board": "Board",
"age": "Waiting time",
"notifications": "Notifications"
}
},
"toast": {
"newOrders_one": "{{count}} new order",
"newOrders_other": "{{count}} new orders",
"done": "✓ Done",
"preparing": "▶ In progress",
"pending": "↩ Back to to do",
"waiterCalled": "Waiter notified",
"called": "Sent",
"sendFailed": "Couldn't send it",
"itemDeclined": "Item declined",
"orderDeclined": "Order declined",
"declineFailed": "Couldn't decline it",
"printSent": "Sent to the printer",
"printFailed": "Couldn't print",
"undone": "Undone",
"redone": "Redone",
"settingsSaved": "Settings saved"
}
}
}