feat: "Gerar de novo" also from Imprimindo, taking the file out of the hot folder (order #36)
All checks were successful
Build and deploy / Validate source (push) Successful in 9s
Build and deploy / Integration suite on a real stack (push) Successful in 7m9s
Build and deploy / Secret scan and release gate (push) Successful in 8s
Build and deploy / Publish images (push) Successful in 1m30s

#36 is already in Imprimindo. From there the order goes back to Arte
recebida like a card leaving Imprimindo: what Flexi has not taken is
withdrawn from the machine's hot folder (hotfolder.stop), and the step
back is recorded as "Arquivo gerado de novo".

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-11-17 17:38:02 -03:00
parent 27b26cd1ae
commit d76288c335
3 changed files with 16 additions and 13 deletions

View File

@@ -299,12 +299,14 @@ function nextBox(order){
}
// A ready file generated again, for the part size of now: a 15 m part is
// more than the FlexiPRINT opens (order #36, 2026-11-17). The approved
// generated final goes, so the order is back in Arte recebida.
if((st==='rec'||st==='tra')&&!order.proof_parent&&!fixed&&may('produce')&&
// generated final goes, so the order is back in Arte recebida; from
// Imprimindo its file also leaves the machine's hot folder.
if((st==='rec'||st==='tra'||st==='imp')&&!order.proof_parent&&!fixed&&may('produce')&&
(order.print_files||[]).some(r=>r.status==='ready'))
more.push(button('Gerar de novo',async()=>{
if(!await ask('Gerar o arquivo de novo?','O sistema gera o arquivo do pedido de novo, com o tamanho de parte de agora. '+
'O arquivo final aprovado sai: o pedido fica em Arte recebida e o arquivo novo precisa ser aprovado.',
'O arquivo final aprovado sai: o pedido volta para Arte recebida'+(st==='imp'?', sai da hot folder da máquina,':'')+
' e o arquivo novo precisa ser aprovado.',
'Gerar de novo',{host:$('drawer')}))return;
await api('/orders/'+order.id+'/print-files/again',{});await load();
say('Gerando o arquivo do #'+order.number+' de novo. Aprove quando ficar pronto.');