feat(backend): KDS settings as device config, zone enforced for kitchen screens, KDS-only API (platform-v2 3.2a)

- KDS manifest: 23 typed settings (prep zone, board, waiting-time minutes and colours,
  behaviour) replacing the KDS page's localStorage settings.
- ConfigField: colour type, "after" ordering (warning < late < flash), groups for the
  manager's dialogs, ".none" text for an empty ref choice.
- routers/kds.py: a KDS device gets only its zone's orders, prints to its zone by default
  and signs waiter messages with its zone/name. New GET /api/kds/context and
  POST /api/kds/orders/{id}/retry-print so the screen never leaves its kds.* scope.
  Unused v1 /items and /items/{id}/status endpoints removed (D-21).
- PATCH /api/devices/me/config: a screen changes its own settings when the signed-in
  person holds core.devices.manage.
- Manager Devices dialogs: settings in sections, colour pickers, "All zones".
- Tests: test_kds_device.py, colour/ordered fields; terminal.mjs scope + zone checks;
  manager.mjs settings sections; stack.mjs detaches the non-LAN network before the
  restart check (one flaky 403).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-14 18:56:59 +02:00
co-authored by Claude Opus 5.5
parent c24cb72640
commit d5c4400fde
17 changed files with 762 additions and 140 deletions
+118
View File
@@ -127,6 +127,118 @@
"bump": "Σήμανση πιάτων ως έτοιμων"
},
"config": {
"prep_zone_id": {
"label": "Ζώνη προετοιμασίας",
"hint": "Η οθόνη δείχνει μόνο τα αντικείμενα αυτής της ζώνης.",
"none": "Όλες οι ζώνες"
},
"card_width": {
"label": "Πλάτος κάρτας",
"hint": "Πλάτος κάθε κάρτας παραγγελίας, σε pixel (200–800)."
},
"font_scale": {
"label": "Μέγεθος κειμένου",
"hint": "Σε ποσοστό: 100 είναι το κανονικό (60–200)."
},
"font_weight": {
"label": "Βάρος γραμματοσειράς",
"hint": "Πάχος γραμμάτων ονομάτων προϊόντων.",
"choices": {
"300": "Λεπτά",
"400": "Κανονικά",
"500": "Μεσαία",
"600": "Ημιέντονα",
"700": "Έντονα",
"800": "Πολύ έντονα"
}
},
"batch_mode": {
"label": "Συγκέντρωση κοινής παραγγελίας",
"hint": "Πώς εμφανίζονται οι παρτίδες όταν ένα τραπέζι παραγγέλνει πολλές φορές στην ίδια παραγγελία.",
"choices": {
"merged": "Μία κάρτα, όλα μαζί",
"grouped": "Μία κάρτα με διαχωριστικά ανά παρτίδα",
"split": "Ξεχωριστή κάρτα ανά παρτίδα"
}
},
"group_items": {
"label": "Ομαδοποίηση αντικειμένων",
"hint": "Συνολική εικόνα των ίδιων αντικειμένων όλων των παραγγελιών (σε αναμονή και σε προετοιμασία).",
"choices": {
"off": "Απενεργοποιημένο",
"floating": "Αιωρούμενο (πάντα ορατό)",
"right_sidebar": "Πλαϊνή στήλη δεξιά",
"left_sidebar": "Πλαϊνή στήλη αριστερά",
"topbar_button": "Κουμπί στη γραμμή τίτλου"
}
},
"group_by_course": {
"label": "Ομαδοποίηση ανά πιάτο σερβιρίσματος",
"hint": "Τα αντικείμενα χωρίς πιάτο εμφανίζονται τελευταία."
},
"combine_modifiers": {
"label": "Συγχώνευση αλλαγών ίδιου τύπου",
"hint": "Π.χ. «− ντομάτα · σάλτσα» σε μία γραμμή."
},
"categories_as_filters": {
"label": "Κατηγορίες ως φίλτρα",
"hint": "Ναι: πολλές κατηγορίες μαζί. Όχι: μία κατηγορία κάθε φορά."
},
"age_warning_minutes": {
"label": "Προειδοποίηση μετά από (λεπτά)",
"hint": "Η κάρτα παίρνει το χρώμα προειδοποίησης."
},
"age_late_minutes": {
"label": "Καθυστέρηση μετά από (λεπτά)",
"hint": "Η κάρτα παίρνει το χρώμα καθυστέρησης. Περισσότερα από την προειδοποίηση."
},
"age_flash_minutes": {
"label": "Αναβόσβημα μετά από (λεπτά)",
"hint": "Η κεφαλίδα της κάρτας αναβοσβήνει. Περισσότερα από την καθυστέρηση."
},
"flash_late": {
"label": "Αναβόσβημα αργοπορημένων παραγγελιών"
},
"colour_fresh": {
"label": "Χρώμα: νέα"
},
"colour_warning": {
"label": "Χρώμα: προειδοποίηση"
},
"colour_late": {
"label": "Χρώμα: καθυστέρηση"
},
"colour_done": {
"label": "Χρώμα: ολοκληρωμένη"
},
"triple_state": {
"label": "Τρία βήματα ανά παραγγελία",
"hint": "Αναμονή → Προετοιμασία → Έτοιμη. Όχι: παραλείπεται η Προετοιμασία."
},
"sound": {
"label": "Ήχος για νέες παραγγελίες"
},
"notify_order_complete": {
"label": "Ειδοποίηση σερβιτόρου όταν ολοκληρωθεί η παραγγελία"
},
"notify_item_complete": {
"label": "Ειδοποίηση σερβιτόρου όταν ολοκληρωθεί αντικείμενο",
"hint": "Πριν ολοκληρωθεί όλη η παραγγελία."
},
"refresh_seconds": {
"label": "Έλεγχος για παραγγελίες κάθε",
"hint": "Σε περίπτωση που χαθεί μια ζωντανή ενημέρωση.",
"choices": {
"10": "10 δευτερόλεπτα",
"15": "15 δευτερόλεπτα",
"20": "20 δευτερόλεπτα",
"30": "30 δευτερόλεπτα",
"45": "45 δευτερόλεπτα",
"60": "1 λεπτό",
"90": "90 δευτερόλεπτα",
"120": "2 λεπτά"
}
},
"auto_sign_out_minutes": {
"label": "Αποσύνδεση μετά από",
"hint": "Επιστροφή στην οθόνη σύνδεσης όταν κανείς δεν έχει χρησιμοποιήσει την οθόνη για τόσο χρόνο.",
@@ -139,6 +251,12 @@
"60": "1 ώρα"
}
}
},
"config_groups": {
"zone": "Ζώνη προετοιμασίας",
"board": "Πίνακας",
"age": "Χρόνος αναμονής",
"behaviour": "Συμπεριφορά"
}
},
"menu_tablet": {
+118
View File
@@ -127,6 +127,118 @@
"bump": "Mark items ready"
},
"config": {
"prep_zone_id": {
"label": "Prep zone",
"hint": "The screen shows only the items of this zone.",
"none": "All zones"
},
"card_width": {
"label": "Card width",
"hint": "Width of each order card, in pixels (200–800)."
},
"font_scale": {
"label": "Text size",
"hint": "In percent: 100 is normal (60–200)."
},
"font_weight": {
"label": "Text weight",
"hint": "How bold product names are.",
"choices": {
"300": "Light",
"400": "Regular",
"500": "Medium",
"600": "Semibold",
"700": "Bold",
"800": "Extra bold"
}
},
"batch_mode": {
"label": "Repeat orders from one table",
"hint": "How a table's later rounds on the same order are shown.",
"choices": {
"merged": "One card, everything together",
"grouped": "One card, a divider per round",
"split": "A separate card per round"
}
},
"group_items": {
"label": "Item totals",
"hint": "A summary of the same items across all orders (to do and in progress).",
"choices": {
"off": "Off",
"floating": "Floating panel",
"right_sidebar": "Panel on the right",
"left_sidebar": "Panel on the left",
"topbar_button": "Button in the top bar"
}
},
"group_by_course": {
"label": "Group items by course",
"hint": "Items without a course come last."
},
"combine_modifiers": {
"label": "Combine changes of the same kind",
"hint": "For example \"no tomato · sauce\" on one line."
},
"categories_as_filters": {
"label": "Categories as filters",
"hint": "On: several categories at once. Off: one category at a time."
},
"age_warning_minutes": {
"label": "Warning after (minutes)",
"hint": "The card turns to the warning colour."
},
"age_late_minutes": {
"label": "Late after (minutes)",
"hint": "The card turns to the late colour. More than the warning."
},
"age_flash_minutes": {
"label": "Flash after (minutes)",
"hint": "The card header flashes. More than late."
},
"flash_late": {
"label": "Flash late orders"
},
"colour_fresh": {
"label": "Colour: new"
},
"colour_warning": {
"label": "Colour: warning"
},
"colour_late": {
"label": "Colour: late"
},
"colour_done": {
"label": "Colour: done"
},
"triple_state": {
"label": "Three steps per order",
"hint": "To do → In progress → Done. Off: In progress is skipped."
},
"sound": {
"label": "Sound for new orders"
},
"notify_order_complete": {
"label": "Tell the waiter when an order is done"
},
"notify_item_complete": {
"label": "Tell the waiter when an item is done",
"hint": "Before the whole order is done."
},
"refresh_seconds": {
"label": "Check for orders every",
"hint": "In case a live update is missed.",
"choices": {
"10": "10 seconds",
"15": "15 seconds",
"20": "20 seconds",
"30": "30 seconds",
"45": "45 seconds",
"60": "1 minute",
"90": "90 seconds",
"120": "2 minutes"
}
},
"auto_sign_out_minutes": {
"label": "Sign out after",
"hint": "Back to the sign-in screen when nobody has used the screen for this long.",
@@ -139,6 +251,12 @@
"60": "1 hour"
}
}
},
"config_groups": {
"zone": "Prep zone",
"board": "Board",
"age": "Waiting time",
"behaviour": "Behaviour"
}
},
"menu_tablet": {