feat: printing problems shown and handled; printing set-up on v2 (platform-v2 step 6.10)

- a ticket that doesn't print is a problem for whoever sent it and the managers:
  GET /api/print-problems (the order, table, dishes, printer, since when, tries,
  last error, who sent it) and three ways out: print again, send to another
  printer, handled (services/print_problems.py; print_jobs.resolved_by /
  redirected_to, Alembic 0036); live event print.problems from the print paths
- phone: the red printer button opens the problems sheet, the table page warns
  (usePrintProblems replaces the 8 s poll); counter POS: a red button under the
  modes with the shared panel (@xenia/ordering PrintProblemsPanel + pure rules);
  manager: a card on the overview (top), the Tables page and the order page
- manager: Settings -> Printing (printers with reachability, test print, network
  scan; ticket layout + test ticket, beep, fonts with previews, dot leader,
  dividers) and Management -> Prep zones (cards + zone dialog with the ticket
  language, printers, copies, sorting, category order, kitchen screen) rebuilt in
  src/pages/printing; v1 PrintFontsTab, PrepZonesConfigPage, PendingPrints and
  /api/orders/pending-prints removed
- access: printer add/edit/delete/scan need core.settings.manage, prep zone
  changes catalog.menu.manage (were any dashboard user)
- tests: test_print_problems.py, @xenia/ordering printProblems, manager
  printing.test.mjs, e2e print_problems.mjs (done-when) + manager.mjs printing

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-19 01:40:07 +02:00
co-authored by Claude Opus 5.5
parent 070c9cf625
commit f31bdf42aa
57 changed files with 2557 additions and 2221 deletions
+25
View File
@@ -130,5 +130,30 @@
"quantity": "Quantity",
"missing": "Still to choose: {{list}}"
}
},
"printProblems": {
"title": "Tickets that didn't print",
"count_one": "{{count}} ticket didn't print",
"count_other": "{{count}} tickets didn't print",
"none": "Everything printed.",
"close": "Close",
"notOn": "Not printed on {{printer}}",
"since": "since {{time}}",
"tries_one": "{{count}} try",
"tries_other": "{{count}} tries",
"sentBy": "sent by {{names}}",
"retry": "Print again",
"sendTo": "Send to another printer",
"send": "Send there",
"handled": "Handled",
"handledHint": "Told the kitchen another way: stop trying and stop warning.",
"stillNot": "Still not printing on {{printer}}.",
"failed": "That didn't work.",
"whatNow": "What to do",
"done": {
"retry": "Printed on {{printer}}",
"redirect": "Printed on {{printer}}",
"handled": "Marked as handled"
}
}
}
+6 -1
View File
@@ -260,7 +260,8 @@
},
"print_job": {
"not_found": "That print job isn't there any more.",
"not_pending": "Only tickets still waiting to print can be cancelled."
"not_pending": "Only tickets still waiting to print can be cancelled.",
"done": "That ticket isn't waiting any more: it was printed or dealt with on another screen."
},
"table": {
"not_found": "Table not found.",
@@ -337,5 +338,9 @@
"bad_zone": "That zone no longer exists.",
"bad_background": "The background must be a picture from the media library.",
"bad_layout": "The layout has a table twice or a place that is not a number."
},
"print": {
"printer_off": "The printer {{printer}} is turned off in the settings.",
"redirect_failed": "{{printer}} didn't print it either ({{error}}). The ticket is still waiting."
}
}
+226 -14
View File
@@ -1337,20 +1337,6 @@
"closed": "Closed",
"cancelled": "Cancelled"
},
"prints": {
"title": "Waiting to print",
"count_one": "{{count}} order hasn't printed",
"count_other": "{{count}} orders haven't printed",
"all": "Print all",
"retries_one": "{{count}} retry",
"retries_other": "{{count}} retries",
"lines_one": "{{count}} line waiting",
"lines_other": "{{count}} lines waiting",
"open": "Details",
"print": "Print",
"done": "Printed",
"failed": "Didn't print: {{printers}}"
},
"notes": {
"title": "Notes & to-dos",
"counts": "{{notes}} notes · {{todos}} open to-dos"
@@ -2353,6 +2339,232 @@
"save": "Save",
"saved": "Flags saved",
"sent": "Flags saved and message sent"
},
"printHelp": "Tickets are tried again every 8 seconds until they print. If a printer is off or out of paper, send them to another one, or mark them handled once the kitchen knows."
},
"printing": {
"back": "Back",
"save": "Save",
"close": "Close",
"up": "Move up",
"down": "Move down",
"zones": {
"title": "Prep zones",
"intro": "Where each dish's ticket prints, and how the kitchen screen treats it. Dishes are put in zones in the product editor.",
"new": "New zone",
"none": "No prep zones yet",
"noneHint": "Make one for the kitchen and one for the bar, then put the dishes in them.",
"edit": "Edit {{name}}",
"delete": "Delete {{name}}",
"deleteTitle": "Delete {{name}}?",
"deleteBody": "Its dishes stop printing anywhere until they are put in another zone.",
"deleteYes": "Delete",
"deleted": "Zone deleted",
"main": "Main",
"also": "Also",
"noPrinter": "No printer",
"noPrinters": "There are no printers yet: add them in Settings → Printing.",
"newTitle": "New prep zone",
"editTitle": "{{name}}",
"created": "Zone made",
"saved": "Zone saved",
"about": "The zone",
"name": "Name",
"namePh": "e.g. Kitchen, Grill, Bar",
"nameNeeded": "Give the zone a name.",
"shown": "Name in messages",
"shownHint": "What staff see when this zone has something ready (e.g. \"Kitchen\").",
"description": "Description",
"language": "Ticket language",
"languageHint": "The language its tickets print in.",
"venueLanguage": "The venue's language",
"printers": "Printing",
"auto": "What prints",
"autoShort": {
"none": "Doesn't print",
"master": "Main printer",
"all": "All its printers"
},
"autoHint": {
"none": "The dishes only show on the kitchen screen.",
"master": "One ticket on the main printer.",
"all": "The main printer and every other one ticked."
},
"mainPrinter": "Main printer",
"mainHint": "Where the ticket prints.",
"printerNeeded": "Pick the printer the tickets go to.",
"secondPrinters": "Other printers",
"secondTip": "Used when \"All its printers\" is chosen, e.g. a copy for the pass.",
"mainCopies": "Copies on the main printer",
"secondCopies": "Copies on the others",
"ticket": "The ticket",
"sort": "Order of the dishes",
"sortShort": {
"order_time": "As ordered",
"item_count": "Most first",
"alpha": "A to Z"
},
"sortHint": {
"order_time": "In the order they were added.",
"item_count": "The largest quantities first.",
"alpha": "By name."
},
"byCategory": "Grouped by category",
"byCategoryTip": "Dishes of the same category print together, under its name.",
"categoryOrder": "Order of the categories",
"categoryOrderHint": "The categories print in this order; the rest follow.",
"categoryOrderReset": "Back to the menu's order",
"checkboxes": "Boxes to tick",
"checkboxesTip": "Prints [ ] before each dish, for the cooks to tick off.",
"kds": "The kitchen screen",
"startReady": "Start as ready",
"startReadyTip": "Dishes skip \"waiting\" and \"preparing\" and show as ready at once (drinks, beers).",
"skipKds": "Skip the kitchen screen",
"skipKdsTip": "Dishes go straight to served and never show on the kitchen screen. Turns on \"Start as ready\" too.",
"readyServed": "Ready means served",
"readyServedTip": "When the cook marks a dish ready on the kitchen screen, it counts as served too."
},
"printers": {
"title": "Printers",
"intro": "The kitchen and bar printers on the venue's network.",
"add": "Add a printer",
"find": "Find printers",
"none": "No printers yet.",
"on": "{{name}} on",
"codepage": "Code page {{n}}",
"chars_one": "{{count}} character a line",
"chars_other": "{{count}} characters a line",
"checking": "Checking…",
"answers": "Answers",
"noAnswer": "Doesn't answer",
"test": "Test print",
"testSent": "Test print sent",
"testFailed": "It didn't print: {{error}}",
"edit": "Edit {{name}}",
"remove": "Remove {{name}}",
"removeTitle": "Remove {{name}}?",
"removeBody": "Zones that print on it will need another printer.",
"removeYes": "Remove",
"removed": "Printer removed",
"addTitle": "Add a printer",
"editTitle": "{{name}}",
"added": "Printer added",
"saved": "Printer saved",
"name": "Name",
"namePh": "e.g. Kitchen",
"address": "Address (IP)",
"addressHint": "Printed on the printer's self-test page.",
"port": "Port",
"model": "Model",
"modelHint": "Sets the Greek letters the printer understands.",
"width": "Characters a line",
"widthHint": "48 for 80 mm paper, 32 for 58 mm.",
"wrong": {
"name": "Give the printer a name.",
"ip_address": "An address like 192.168.1.50.",
"port": "A port from 1 to 65535 (usually 9100).",
"line_width": "Between 20 and 80."
},
"findTitle": "Find printers",
"findBody": "Looks for devices on the network that answer on the printing port.",
"subnet": "Network",
"scan": "Search",
"stop": "Stop",
"scanned": "{{done}} of {{total}} addresses checked",
"scanStart": "Press Search to look.",
"foundNone": "No printers found.",
"scanFailed": "The search didn't work.",
"use": "Use"
},
"ticket": {
"layout": "Ticket layout",
"mode": "Layout",
"modeTip": "Detailed: each choice on its own line, easiest to read. Compact: choices of one kind on one line, less paper.",
"modes": {
"detailed": "Detailed",
"compact": "Compact"
},
"testHint": "Print a made-up order with every kind of choice, to see the settings on paper.",
"testOn": "Printer for the test",
"testOrder": "Print a test ticket",
"testSent": "Sent to the printer",
"fonts": "Letters",
"fontsHint": "Each part of the ticket's size, bold and capitals. Changes apply from the next ticket.",
"groups": {
"header": "The top",
"items": "The dishes",
"notes": "Notes"
},
"parts": {
"order_number": "Order number",
"meta": "Table · waiter · time",
"item_name": "Dish name",
"quick": "Quick add-ons (*)",
"pref": "Preferences (>)",
"extra": "Extras (+)",
"ingredient": "Left out (-)",
"item_note": "A dish's note",
"order_note": "The order's note"
},
"partsHint": {
"order_number": "The ticket's heading: \"Order #42\".",
"meta": "The lines under the number.",
"item_name": "Each dish, with the dot leader to its quantity.",
"quick": "Add-ons picked with one tap.",
"pref": "Cooking, sides and other choices.",
"extra": "Extras added to a dish.",
"ingredient": "\"WITHOUT\" lines.",
"item_note": "Free text written for one dish.",
"order_note": "The note for the whole order."
},
"sizes": {
"0": "Normal",
"16": "Tall",
"32": "Wide",
"48": "Tall and wide"
},
"bold": "Bold",
"caps": "CAPITALS",
"wideNote": "Wide letters fit about half as many characters on a line: keep it for short texts.",
"dots": "Dot leader",
"dotsHint": "The characters between a dish and its quantity.",
"dotsSize": "Dot leader size",
"dotsSample": "Steak {{dots}} x2",
"dotStyles": {
"dot_space": "Dots with spaces",
"dot": "Dots",
"dash_space": "Dashes with spaces",
"underscore": "Underscores"
},
"divider": "Dividers",
"dividerHint": "The line between the ticket's parts.",
"emptyLine": "(an empty line)",
"dividers": {
"dash": "Dashes ( - )",
"equals": "Equals ( = )",
"star": "Stars ( * )",
"empty": "An empty line"
}
},
"beep": {
"title": "Beep",
"intro": "The printer beeps to tell the kitchen a ticket came in.",
"presets": {
"off": "No beep",
"single": "Once",
"double": "Twice",
"triple": "Three times",
"long": "One long",
"custom": "Custom"
},
"n1": "On (× 100 ms)",
"n1Hint": "e.g. 3 = 300 ms",
"n2": "Off (× 100 ms)",
"n2Hint": "The pause between beeps",
"n3": "Times",
"n3Hint": "How many beeps",
"testHint": "Hear it on a printer.",
"test": "Test the beep"
}
}
}