fix: Abrir e conferir sends a paid Ajuste Fino order to Tratar a arte

DTF-WEB-A: closing the viewer on an order with Ajuste Fino or Redesenho
paid approved the original as the final and then tried the move, which
the server refused (the queue needs the treated PNG). The dialog now says
the treated art is missing and opens Tratar a arte, approving nothing.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-11-13 14:24:51 -03:00
parent 6be7e15f9f
commit 9ae865619e

View File

@@ -2153,6 +2153,15 @@ async function openCheck(order){
// the measure, and the art either goes on to Arte conferida, its final
// approved and its class kept, or is treated (item 8).
function isOk(order){
// Ajuste Fino or Redesenho paid: only the treated PNG goes to the queue, so
// nothing is approved here; the designer goes to "Tratar a arte" (DTF-WEB-A).
if(designerPaid(order)&&!treatmentDone(order)){
const service=order.snapshot.redesign?'O Ajuste Fino Redesenho':'O Ajuste Fino';
const m=formDialog('Falta a arte tratada',{host:$('drawer'),label:'Tratar a arte',
text:service+' foi pago. Envie o PNG ajustado de cada item antes de colocar o pedido na fila.',
onsave:async()=>{m.close();treatDialog(order);return false;}});
return;
}
const items=order.snapshot.items, ready=readyFinals(order);
const selects=items.map((item,index)=>{
const select=node('select');select.required=true;