fix: a reprint keeps an all-items choice, an undone pass to Revisão prints nothing again, and Prova OK tells Tiny (#105)
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 7m56s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m26s
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 7m56s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m26s
- Every item ticked was saved as NULL, which also means "not chosen", so the pass to the queue replaced it with the suggestion and only the changed item went to the machine; the panel showed the suggestion again. The choice is now the whole list. - Undoing a pass to Revisão (back to Imprimindo) started a new round with every file, so FlexiPRINT printed the order again. It now writes back only what Flexi had not taken, and the reprint choice of that pass returns. A pass undone this way no longer counts its film twice in the machine's metres (machine log and Números). - An order entering the queue by Prova OK never sent Tiny's "Preparando envio". The stage's Tiny event is now one function, used by the move and by the Prova OK. Integration test follows the real moves: suggestion, all items kept, pull onto a machine, two undone passes to Revisão, metres counted once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -427,7 +427,8 @@ function cardFlags(order){
|
||||
const dots=s.items.reduce((t,i)=>t+(i.residue_accepted||0),0);
|
||||
if(live&&dots)out.push(['warn','Resíduo','O cliente aceitou imprimir com '+residueNote({residue_accepted:dots})]);
|
||||
// A reprint: only some items go to the machine again (#105).
|
||||
if(live&&order.print_items?.length)out.push(['warn','Reimpressão','Vão para a máquina só: '+order.print_items.map(i=>'item '+(i+1)).join(', ')]);
|
||||
// Every item ticked is a choice too, but no reprint of some: no flag.
|
||||
if(live&&order.print_items?.length&&order.print_items.length<s.items.length)out.push(['warn','Reimpressão','Vão para a máquina só: '+order.print_items.map(i=>'item '+(i+1)).join(', ')]);
|
||||
// A ready sheet with pieces closer than 5 mm (Marcus, 2026-11-26, #81).
|
||||
const close=s.items.reduce((t,i)=>t+(i.close_pieces||0),0);
|
||||
if(live&&close)out.push(['warn','Peças coladas',closeNote(close)]);
|
||||
|
||||
@@ -1144,7 +1144,10 @@ function reprintChoice(order){
|
||||
const input=node('input');input.checked=chosen.has(index);input.disabled=!may('produce');
|
||||
box.append(checkbox('Item '+(index+1)+', '+productName(item),input));return input;
|
||||
});
|
||||
box.append(node('small',order.print_items?'Só os itens marcados vão para a máquina.'
|
||||
// A saved choice is the whole list when every item goes (never NULL, which
|
||||
// is "not chosen yet" and would show the suggestion again).
|
||||
const all=order.print_items?.length===order.snapshot.items.length;
|
||||
box.append(node('small',order.print_items?(all?'Todos os itens vão para a máquina.':'Só os itens marcados vão para a máquina.')
|
||||
:order.print_suggested?'Marcados os itens cujo arquivo mudou desde a última impressão.'
|
||||
:'O pedido já foi impresso: marque só os itens que precisam sair de novo.'));
|
||||
if(may('produce')){
|
||||
|
||||
Reference in New Issue
Block a user