- 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>
29 lines
1010 B
Python
29 lines
1010 B
Python
"""A print job's way out besides printing (plan step 6.10): who resolved it and, when the
|
|
ticket was sent to another printer, which one. `status` gains no new value: a ticket sent
|
|
elsewhere ends as 'success' (redirected_to set), one marked as handled as 'cancelled' with
|
|
cancel_reason 'handled'.
|
|
|
|
Revision ID: 0036_print_job_resolution
|
|
Revises: 0035_floor_plans
|
|
Create Date: 2026-11-19 09:00:00
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
revision = '0036_print_job_resolution'
|
|
down_revision = '0035_floor_plans'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
with op.batch_alter_table('print_jobs', schema=None) as batch_op:
|
|
batch_op.add_column(sa.Column('resolved_by', sa.Integer(), nullable=True))
|
|
batch_op.add_column(sa.Column('redirected_to', sa.Integer(), nullable=True))
|
|
|
|
|
|
def downgrade() -> None:
|
|
with op.batch_alter_table('print_jobs', schema=None) as batch_op:
|
|
batch_op.drop_column('redirected_to')
|
|
batch_op.drop_column('resolved_by')
|