feat: the customer may accept printing a ready sheet's residue dots (Dropstar's third round, item 5)
All checks were successful
Build and deploy / Validate source (push) Successful in 8s
Build and deploy / Integration suite on a real stack (push) Successful in 3m53s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m8s
All checks were successful
Build and deploy / Validate source (push) Successful in 8s
Build and deploy / Integration suite on a real stack (push) Successful in 3m53s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m8s
A sheet with dots under 2 mm still stops the order, now with a box under the warning: "Esta arte tem N pontos menores que 2 mm. Estou ciente e aceito imprimir assim — eles podem se perder no recorte." Ticked, the sheet goes on, and the item carries how many dots were accepted (residue_accepted), kept through the review and shown on the Kanban card, order panel and quote. A solid background still stops it, with no box. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -593,6 +593,10 @@ const TREATED_NOTE='O arquivo final foi preparado pela equipe, não é a arte qu
|
||||
// Mirrored by the customer (UV only, web/site-pdf.js): the room checks it before printing.
|
||||
const mirroredItem=item=>!!item.production?.sources?.some(source=>source.mirrored);
|
||||
const MIRROR_NOTE='O cliente espelhou a arte: confira antes de imprimir';
|
||||
// Residue dots under 2 mm the customer accepted printing (Dropstar, 2026-10-29).
|
||||
const residueNote=item=>{const many=item.residue_accepted>1;
|
||||
return item.residue_accepted+(many?' pontos menores':' ponto menor')+' que 2 mm, que '+(many?'podem':'pode')+' se perder no recorte';};
|
||||
const residueBadge=item=>badge('! Resíduo aceito','warn','O cliente aceitou imprimir com '+residueNote(item));
|
||||
// Two places per machine in Imprimindo (app/machines.py): the first to come
|
||||
// in is printing, the next is being ripped meanwhile.
|
||||
const PRINTING={imprimindo:['Imprimindo','ok','Já ripou, está rodando'],
|
||||
@@ -771,6 +775,8 @@ function card(order){
|
||||
if(order.printing)flags.append(badge(...PRINTING[order.printing]));
|
||||
if(s.items.some(i=>i.quality_status==='warning'))flags.append(badge('! Ressalva','warn','O cliente aceitou a ressalva de resolução'));
|
||||
if(s.items.some(mirroredItem))flags.append(badge('Espelhado','bad',MIRROR_NOTE));
|
||||
const dots=s.items.reduce((t,i)=>t+(i.residue_accepted||0),0);
|
||||
if(dots)flags.append(residueBadge({residue_accepted:dots}));
|
||||
if(stalled(order))flags.append(badge('⏱ Parado '+hoursSince(order.updated_at)+' h','bad','Sem mudar de etapa desde '+when(order.updated_at)));
|
||||
if(waitingContact(order))flags.append(badge('☎ Aguardando contato','warn',order.contact_note+' · '+contactWho(order)));
|
||||
if(needsProof(order))flags.append(order.proof_ok_at
|
||||
@@ -1154,6 +1160,7 @@ function itemCard(order,item,index){
|
||||
body.append(title,facts([['Folha',sheetSize(spec)],['Peças',spec?String(spec.placements.length):null],
|
||||
['Metro',item.unit_cents?money(item.unit_cents)+manualExtra(item):null],['Arquivos',spec&&spec.sources.length>1?String(spec.sources.length):null]]));
|
||||
if(item.quality_status==='warning')body.append(badge('! Ressalva de resolução aceita','warn'));
|
||||
if(item.residue_accepted){const r=node('div',undefined,'file');r.append(icon(ICON_WARN),node('span','Resíduo aceito pelo cliente: '+residueNote(item)+'.','warn'));body.append(r);}
|
||||
// After a customer correction, that file is the artwork: the generated
|
||||
// print file, or the reason it could not be made, no longer applies.
|
||||
const fix=(order.corrections||[]).find(f=>f.item_index===index);
|
||||
@@ -1766,6 +1773,7 @@ function quoteItem(item,fields,priced){
|
||||
const chips=node('div',undefined,'flags');
|
||||
chips.append(item.quality_status==='ok'?badge('✓ Qualidade conferida','ok'):item.quality_status==='warning'?
|
||||
badge(item.quality_acknowledged?'! Ressalva aceita pelo cliente':'! Ressalva não aceita','warn'):badge('Qualidade não conferida',''));
|
||||
if(item.residue_accepted)chips.append(residueBadge(item));
|
||||
body.append(chips);
|
||||
if(fields){
|
||||
const grid=node('div',undefined,'fields');
|
||||
|
||||
Reference in New Issue
Block a user