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": "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"
}
}
}