feat: the proof card, machine pull and print file corrections (Dropstar, 05/11)

The proof card owns its final PNG, keeps its parent locked until the seller
answers, enters the queue first, and shares one machine with the parent.
The board no longer assigns a machine at payment; the puller records it.
A stalled print file times out with a card warning and a retry, finished
orders sort by completion, and finals are stored as PNG. The original
download carries the order number (items 0.1, 0.4 to 0.7 and 0.9).
This commit is contained in:
Cauê Faleiros
2026-11-06 10:41:20 -03:00
parent 0fc01315c7
commit d69e326125
20 changed files with 584 additions and 220 deletions

View File

@@ -205,6 +205,7 @@ try{
// Open the order's panel from its card, then click the real transition
// buttons there, including the rerender after each move.
await kanban.click('[data-tab="board"]');
assert.equal(await kanban.eval(`!!document.querySelector('[data-card="${oid}"] .card-open')`),true);
await kanban.click(`[data-card="${oid}"]`);
await waitFor(()=>kanban.eval(`!!document.querySelector('[data-order="${oid}"] [data-move]')`),'order panel');
// Dropstar's flow (2026-10-23): Arte conferida is the queue, Revisão before Finalizado.
@@ -233,6 +234,13 @@ try{
await kanban.click(`[data-order="${oid}"] [data-move="${state}"]`);
await waitFor(()=>kanban.eval(`board.orders.find(o=>o.id==='${oid}').state==='${state}'`),'transition '+state);
if(state==='tra'){
// The file opens from the card itself, without first expanding the order.
await kanban.eval('closePanel()');
await kanban.click(`[data-card="${oid}"] .card-open`);
await waitFor(()=>kanban.eval(`!!document.querySelector('.viewer[open]')`),'file viewer from the card');
assert.equal(await kanban.eval(`$('drawer').hidden`),true);
await kanban.click('.viewer .vbtn.pri');
await kanban.click(`[data-card="${oid}"]`);
// Entering the queue moves its file to Arte conferida, whole and named after the order.
const prefix='DTF-'+await kanban.eval(`board.orders.find(o=>o.id==='${oid}').number`)+'-item-1';
await waitFor(async()=>(await savedFiles('2. Arte conferida')).some(n=>n.startsWith(prefix)&&!n.endsWith('.baixando')),'final file in Arte conferida',45000);