feat: copies from the file name, the proof in the summaries, the grade off the customer's screen (Rodada 5, B3, B6, D6)
Some checks failed
Build and deploy / Validate source (push) Successful in 4s
Build and deploy / Integration suite on a real stack (push) Failing after 1m17s
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 4s
Build and deploy / Integration suite on a real stack (push) Failing after 1m17s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Has been skipped
B6: "12x nome.png" enters with 12 copies, art or ready sheet (up to 200; "1920x1080.png" is not read as copies). B3: the DPI refusal speaks per art, the cart and payment summaries list "Prova antes de imprimir" when chosen, and below 10 m the proof box stays, closed, saying the rule. D6: the Ajuste Fino refusal no longer shows the grade number (Site and server); the unused motivoNota helper is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -214,6 +214,7 @@
|
||||
rows.push(linha('Ajuste Fino Redesenho'+(arts?' · '+arts+(arts===1?' arte':' artes'):'')+' · +48 h',
|
||||
rs(quote.redesign.cents/100)));
|
||||
}
|
||||
if(approved.proof) rows.push(linha('Prova antes de imprimir','Grátis'));
|
||||
if(approved.coupon)
|
||||
rows.push(linha('Cupom '+approved.coupon.code, '− '+rs(approved.coupon.discount_cents/100)));
|
||||
rows.push(linha('Total', rs(approved.total_cents/100), 'tot'));
|
||||
|
||||
@@ -1124,6 +1124,7 @@ h2 em{font-style:normal;color:var(--laranja)}
|
||||
<span><b>Quero aprovar uma prova antes de imprimir</b>
|
||||
Imprimimos uma prova de até 30 cm e mandamos a foto pelo WhatsApp. O resto sai depois
|
||||
que você aprovar. Até 3 provas por pedido, sem custo.</span></label>
|
||||
<p class="provaMin" id="provaMin" hidden>A prova é para pedidos acima de 10 m.</p>
|
||||
</div>
|
||||
|
||||
<div class="cxE" id="tratamentoBox" hidden>
|
||||
|
||||
@@ -185,7 +185,7 @@ function aplicaTratamento(aPagar){
|
||||
document.querySelectorAll('[data-ajuste],[data-ajustea]').forEach(el=>{el.checked=true;});
|
||||
}
|
||||
check.checked=ajusteTudo;check.disabled=true;
|
||||
mostraAvisoTratamento('Sua arte tem nota '+worst+', então o Ajuste Fino é obrigatório neste pedido.');
|
||||
mostraAvisoTratamento('Sua arte está abaixo da resolução mínima, então o Ajuste Fino é obrigatório neste pedido.');
|
||||
}else{
|
||||
check.checked=ajusteTudo;check.disabled=false;mostraAvisoTratamento('');
|
||||
}
|
||||
@@ -257,6 +257,8 @@ function pintaPedido(){
|
||||
' · +24 h</span><b>'+rs(tratamento)+'</b></div>':'')+
|
||||
(redesenho?'<div class="l"><span>Ajuste Fino Redesenho · '+artesRedesenho+
|
||||
(artesRedesenho===1?' arte':' artes')+' · +48 h</span><b>'+rs(redesenho)+'</b></div>':'')+
|
||||
($('fProva')?.checked?'<div class="l"><span>Prova antes de imprimir</span>'+
|
||||
'<b><span style="color:var(--verde-ml)">Grátis</span></b></div>':'')+
|
||||
'<div class="l"><span>Revisão e reencaixe</span>'+
|
||||
'<b><span style="color:var(--verde-ml)">Grátis</span></b></div>';
|
||||
$('carrTot').textContent=rs(soma);
|
||||
@@ -268,9 +270,12 @@ function pintaPedido(){
|
||||
: n>1
|
||||
? 'Pagar os '+n+' itens de uma vez'
|
||||
: 'Ir para o pagamento';
|
||||
// The proof is only for orders above 10 m (Dropstar, 2026-10-28): below it the box is gone.
|
||||
// The proof is only for orders above 10 m (Dropstar, 2026-10-28; the server's
|
||||
// PROOF_ABOVE_METRES). Below it the box stays, closed, and says the rule
|
||||
// (Rodada 5, B3).
|
||||
const prova=$('fProva');
|
||||
if(prova){ const longo=aPagar.reduce((t,it)=>t+(it.cob||0),0)>10; prova.closest('.cxE').hidden=!longo; if(!longo) prova.checked=false; }
|
||||
if(prova){ const longo=aPagar.reduce((t,it)=>t+(it.cob||0),0)>10;
|
||||
prova.disabled=!longo; if(!longo) prova.checked=false; $('provaMin').hidden=longo; }
|
||||
$('bPagar').disabled = !cartPodeEnviar() || !entrega.cotado || !clienteOk() || !enderecoOk() || falta>0;
|
||||
if(pedido.length || itemAtual) $('carr').classList.add('on');
|
||||
if($('cartN')){ $('cartN').textContent=noCarrinho>99?'99+':noCarrinho; $('cartN').hidden=!noCarrinho;
|
||||
@@ -374,6 +379,7 @@ function avisaDesfazer(texto,acao){
|
||||
function fechaDesfazer(){ clearTimeout(desfazerTimer); desfazerAcao=null; $('desfazer').hidden=true; }
|
||||
addEventListener('dtf-page-changed',fechaDesfazer);
|
||||
$('desfazerBtn').addEventListener('click',()=>{ const acao=desfazerAcao; fechaDesfazer(); if(acao) acao(); });
|
||||
$('fProva')?.addEventListener('change',()=>pintaPedido());
|
||||
$('fTratamento')?.addEventListener('change',()=>{
|
||||
if($('fTratamento').checked){ ajusteTudo=true; limpaRedesenho(); }
|
||||
else limpaAjuste();
|
||||
|
||||
@@ -223,3 +223,7 @@ const dpiDe=a=>a.cm>0? (a.giro?a.py:a.px)/(a.cm/2.54) : 0;
|
||||
// girar 90° inverte a proporção · espelhar não muda medida, só o desenho
|
||||
const propDe=a=>{ const p=a.prop||1; return a.giro? 1/p : p; };
|
||||
const TAMANHOS={57:[10,15,20,25,28.2], 27:[5,8,10,13,26.7]};
|
||||
// "12x nome.png" já entra com 12 cópias (Rodada 5, B6; a BinnFlow faz assim):
|
||||
// até 3 dígitos, um x e um separador, para "1920x1080.png" não virar cópias.
|
||||
const copiasDoNome=nome=>{ const m=/^(\d{1,3})\s*[xX×][\s_-]+\S/.exec(nome||'');
|
||||
return m? Math.max(1,Math.min(200,+m[1]||1)) : 1; };
|
||||
|
||||
@@ -273,19 +273,6 @@ function montaFolhasDeTraco(grupos,W){
|
||||
area.replaceChildren(painel);
|
||||
}
|
||||
|
||||
function motivoNota(){
|
||||
if(!nota) return 'sem nota ainda · conferimos antes de imprimir';
|
||||
if(!ehFolha()){
|
||||
const ruins=artes.filter(a=>a.cm>0 && dpiDe(a)<300);
|
||||
if(!ruins.length) return 'nota '+nota+' · todas as artes em 300 DPI ou mais';
|
||||
const pior=ruins.reduce((p,a)=>dpiDe(a)<dpiDe(p)?a:p);
|
||||
return 'nota '+nota+' · '+ruins.length+(ruins.length>1?' artes abaixo':' arte abaixo')+
|
||||
' de 300 DPI · a menor é "'+pior.f.name+'" com '+
|
||||
Math.round(dpiDe(pior))+' DPI em '+pior.cm.toFixed(1).replace('.',',')+' cm';
|
||||
}
|
||||
return nota>=90 ? 'nota '+nota+' · resolução ótima em toda a folha'
|
||||
: 'nota '+nota+' · só a resolução pede atenção, o resto corrigimos';
|
||||
}
|
||||
function previa(){
|
||||
const T=window.dtfTimings;
|
||||
if(T && T.montageStart!=null && T.montageEnd==null) T.montageEnd=performance.now();
|
||||
|
||||
@@ -258,7 +258,7 @@ function ressalvaResolucao(){
|
||||
// e não existe aceite que destrave.
|
||||
if(recusadas.length){
|
||||
$('cienteTxt').innerHTML=
|
||||
'<p><b>A média da folha ficou abaixo de '+DPI_RECUSA+' DPI.</b> Não imprimimos assim: '+
|
||||
'<p><b>'+(recusadas.length>1?recusadas.length+' artes ficaram':'Uma arte ficou')+' abaixo de '+DPI_RECUSA+' DPI.</b> Não imprimimos assim: '+
|
||||
'sai serrilhado demais. Envie em resolução maior ou reduza a largura.</p>'+
|
||||
'<div class="lista">'+recusadas.map(b=>'<div><b>'+escapeHTML(b.nome)+'</b>: '+
|
||||
(b.quantas
|
||||
|
||||
@@ -187,7 +187,7 @@ async function sel(fs){
|
||||
// On their way at once; a JPG is refused at the order anyway.
|
||||
fs.filter(f=>!/\.jpe?g$/i.test(f.name)).forEach(f=>window.dtfEnvio?.enviar(f));
|
||||
if(ehFolha()){
|
||||
const novas=fs.map(f=>({f, med:null, rep:1, m:0, corte:null, semAnalise:null, analiseInicio:Date.now()}));
|
||||
const novas=fs.map(f=>({f, med:null, rep:copiasDoNome(f.name), m:0, corte:null, semAnalise:null, analiseInicio:Date.now()}));
|
||||
folhas=folhas.concat(novas); // soma, não substitui
|
||||
pintaFolha();
|
||||
novas.forEach(x=>{
|
||||
@@ -282,7 +282,7 @@ async function sel(fs){
|
||||
});
|
||||
return;
|
||||
}
|
||||
const novos=fs.map(f=>({f,px:0,py:0,cm:0,q:1,prop:1,giro:0,esp:false,analiseInicio:Date.now()}));
|
||||
const novos=fs.map(f=>({f,px:0,py:0,cm:0,q:copiasDoNome(f.name),prop:1,giro:0,esp:false,analiseInicio:Date.now()}));
|
||||
artes=novos.concat(artes); // a mais recente fica no topo da fila
|
||||
recemChegada=novos[0];
|
||||
pintaArtes();
|
||||
|
||||
@@ -348,6 +348,8 @@ section+section{border-top:0}
|
||||
.provaOp{display:flex;gap:10px;align-items:flex-start;cursor:pointer;font-size:15px;line-height:1.5;color:var(--fraco)}
|
||||
.provaOp input{margin-top:3px;width:17px;height:17px;flex:none;accent-color:var(--laranja)}
|
||||
.provaOp b{display:block;color:var(--preto);font-weight:700}
|
||||
.provaOp:has(input:disabled){cursor:default;opacity:.55}
|
||||
.provaMin{margin:8px 0 0 27px;font-size:14px;color:var(--fraco)}
|
||||
.cp input,.cepL input{height:46px;border-radius:var(--raio2)}
|
||||
.cp input:focus,.cepL input:focus{border-color:var(--laranja2);box-shadow:0 0 0 3px rgba(255,168,26,.18)}
|
||||
.opE{border-radius:12px}
|
||||
|
||||
Reference in New Issue
Block a user