feat: a 57 cm ready sheet whose real width is not 57 cm opens a pop-up and is not accepted (Marcus, 2026-12-01)
Some checks failed
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Failing after 2m34s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Has been skipped
Some checks failed
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Failing after 2m34s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Has been skipped
Order #177: a 35,8 cm sheet at 300 DPI was stretched to the film's 57 cm, the v0 Site rule for a ready sheet image. Marcus: a pop-up on upload, and neither a narrower nor a wider sheet is accepted. The real width is known for a PNG whose pHYs records 200 DPI or more (the A1 threshold) and for a PDF page; tolerance 0,1 cm (6732 px at 300 DPI is 56,998 cm). Arquivo por metro and Premium only. UV, a PNG without pHYs or under 200 DPI, and every existing order and approved cart are unchanged. Site: medirFolha refuses it, the sheet leaves the list (its upload stops), and #larguraDlg lists each refused file with its width and DPI; Entendi or Escape closes it and focus returns to the upload area; the thin-stroke dialog waits while it is open. Server: sheet_width_issue refuses the same cart at checkout (POST /api/quotes, 422), so a reorder or an edited page cannot get round it. Contract: output/revisao/contrato-largura-folha.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -48,6 +48,19 @@ function recusa(lista){
|
||||
: '<b>'+exts+' não entra aqui.</b> Artes avulsas só aceitam PNG com '+
|
||||
'fundo transparente. Para CDR, AI ou PSD, exporte em PNG ou use <b>Arquivo por metro</b>.';
|
||||
}
|
||||
// Folha de 57 cm com largura real conhecida e diferente: sai da lista e o
|
||||
// diálogo junta os arquivos, um por linha, até o cliente fechar.
|
||||
function recusaLargura(nome, {cm, dpi}){
|
||||
const dlg=$('larguraDlg'); if(!dlg) return;
|
||||
const lista=$('larguraLista');
|
||||
const li=document.createElement('li');
|
||||
li.textContent=nome+': '+n1(cm)+' cm'+(dpi==null?'':' ('+dpi+' DPI)');
|
||||
lista.appendChild(li);
|
||||
const ok=$('larguraOk');
|
||||
ok.onclick=()=>dlg.close();
|
||||
dlg.onclose=()=>{ lista.textContent=''; const z=$('zona'); if(z) z.focus(); agendaAvaliacao(); };
|
||||
if(!dlg.open){ dlg.showModal(); ok.focus(); }
|
||||
}
|
||||
const Z=$('zona'), I=$('inp');
|
||||
Z.addEventListener('click',()=>I.click());
|
||||
Z.addEventListener('keydown',e=>{if(e.key==='Enter'||e.key===' '){I.click();e.preventDefault();}});
|
||||
@@ -196,6 +209,14 @@ async function sel(fs){
|
||||
if(md && md.rejected){
|
||||
x.measurementError=md.reason; x.pct=null; pintaFolha(); return;
|
||||
}
|
||||
if(md && md.larguraErrada){
|
||||
if(folhas.includes(x)){
|
||||
folhas=folhas.filter(y=>y!==x);
|
||||
pintaFolha();
|
||||
recusaLargura(x.f.name, md.larguraErrada);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(md && md.dpiFolha!=null && md.dpiFolha<DPI_RECUSA) return recusaFolha(x, md);
|
||||
x.med=md; if(md) x.m=md.alt/100; x.pct=55; pintaFolha();
|
||||
if(md && md.grande){
|
||||
|
||||
Reference in New Issue
Block a user