Every print order passes through a defined sequence of statuses from the moment a customer submits it to the moment staff confirm the job is done. The admin dashboard exposes one action button per valid transition so staff can never accidentally skip a step or move an order backwards.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/hxmz-axfn07/qr-printing-sfw/llms.txt
Use this file to discover all available pages before exploring further.
Order Status Lifecycle
Orders move forward through the following states. A failure or cancellation can interrupt the flow at specific points.new, reviewing, ready, and printing.
Status Transitions
The table below maps each action the dashboard exposes to the status it requires and the status it produces. All transitions are enforced server-side inapp.py; the dashboard button is simply disabled when the prerequisite status is not met.
| Action | Required status | Resulting status | Dashboard button |
|---|---|---|---|
start_review | new | reviewing | Start Review |
approve | reviewing | ready | Approve |
start_print | ready | printing | Mark Printing |
complete | printing | printed | Printed |
fail | printing | failed | Failed (requires reason) |
cancel | any active status | cancelled | Cancel (requires reason) |
Walking Through a Normal Order
New order arrives
A customer submits their files through the upload page. The order lands in
the dashboard with status New and the stats counter increments
immediately (the dashboard auto-refreshes every 3 seconds).
Start Review
A staff member clicks Start Review. The order moves to Reviewing.
Staff can now open each uploaded file, check page counts, verify settings,
and confirm the estimated cost.
Approve
Once satisfied, staff click Approve. The order moves to Ready and
is queued for printing. If
PRINT_COMMAND is configured, this is the
status the server waits for before running the print job.Mark Printing
Staff click Mark Printing. The order moves to Printing. If
PRINT_COMMAND is set in .env, the server runs it automatically for each
document at this point. See Printing for details.Searching Orders
The search box at the top of the dashboard performs a live search across three fields simultaneously:- Order ID — paste the UUID the customer received on the success page
- Customer name — partial match, case-insensitive
- Phone number — partial match
Viewing Documents
Each order card lists every file the customer uploaded. Click the document name to open the file directly in a new browser tab. The link is served by the server at:?token= query parameter authenticates the file request server-side, so files are never accessible without a valid token.
Each document entry shows:
- Original filename (linked)
- File size
- Page count (auto-detected for PDFs;
?if unknown) - Color mode (
B/WorColor) - Print style (
Single sideorDouble side) - Paper size
- Number of copies
- Estimated cost per document
Cancelling an Order
Any order in an active status (new, reviewing, ready, or printing) can be cancelled by clicking the red Cancel button. A browser prompt asks for a cancellation reason before the request is sent.
The reason is stored in the cancel_reason field on the order and displayed on the order card in red. Providing a reason is strongly recommended — it helps staff understand why an order was stopped and gives context if the customer follows up.
Cancelled and failed orders remain fully visible in the dashboard and can be
searched and filtered like any other order. They cannot be re-activated or
transitioned to any further status.
Marking an Order as Failed
If a print job encounters a problem while the order is in Printing status, staff can click the red Failed button. A browser prompt asks for a failure reason before the request is sent. The reason is stored in thefailure_reason field on the order and shown on the card in red. If PRINT_COMMAND is configured and the shell command exits with a non-zero code, the server marks the order failed automatically and uses the command’s stderr output as the failure reason — no manual action is required in that case.
printing status can be marked failed. Attempting to fail an order in any other status returns a 400 Bad Request error.