feat: the customer sees how long each site step is taking (0.12)
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 4m26s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 1m0s
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 4m26s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 1m0s
The file card, the sheet preview and the analysis status now count the seconds since the file arrived; the confirmation says the Prumo is preparing the print file and the usual estimate per 10 m.
This commit is contained in:
@@ -506,7 +506,8 @@
|
||||
const titulo=node('h4','Pagamento confirmado');
|
||||
titulo.insertAdjacentHTML('afterbegin', icone('okCirculo'));
|
||||
box.append(titulo,
|
||||
node('p','Recebemos seu pedido e ele já está na produção. Você acompanha cada etapa em Meus pedidos.'));
|
||||
node('p','Recebemos seu pedido e ele já está na produção. Você acompanha cada etapa em Meus pedidos.'),
|
||||
node('p','O Prumo está preparando o arquivo de impressão. Em geral leva até 1 min por 10 m; o card aparece em Meus pedidos quando fica pronto.'));
|
||||
button('Ver meus pedidos',()=>location.assign('/conta/pedidos?order='+quote.order.id),box);
|
||||
actions.append(box);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
scope and run top to bottom, exactly as the original did. */
|
||||
|
||||
const $=id=>document.getElementById(id);
|
||||
// Segundos desde um marco, para as etapas nunca ficarem mudas (item 0.12).
|
||||
const segundosDesde=inicio=>inicio?Math.max(0,Math.round((Date.now()-inicio)/1000)):0;
|
||||
// What the browser measured while the customer built the cart (item 0.12):
|
||||
// page load, upload, Prumo's check and the loose-art montage. It only feeds
|
||||
// Números; no price or acceptance depends on it.
|
||||
|
||||
@@ -393,7 +393,7 @@ function previaAoVivo(){
|
||||
if(!x.previewSrc){
|
||||
const esqueleto=document.createElement('div'); esqueleto.className='skel folhaSkel';
|
||||
esqueleto.style.aspectRatio=x.med ? x.med.larg+' / '+Math.min(x.med.alt,x.med.larg*4) : '1 / 2';
|
||||
esqueleto.append(Object.assign(document.createElement('span'),{textContent:'Gerando a prévia da folha…'}));
|
||||
esqueleto.append(Object.assign(document.createElement('span'),{textContent:'Gerando a prévia da folha… · '+segundosDesde(x.analiseInicio)+' s'}));
|
||||
figura.append(esqueleto,legenda); painel.append(figura); return;
|
||||
}
|
||||
const pilha=document.createElement('div'); pilha.className='folhaPilha';
|
||||
|
||||
@@ -406,8 +406,9 @@ function medirFolha(file){
|
||||
}
|
||||
|
||||
function textoProgresso(x){
|
||||
if(x.med && x.med.grande) return 'gerando a prévia e conferindo a arte · '+faltaLeitura(x.leitura);
|
||||
return x.pct<50?'lendo o arquivo…':x.pct<70?'medindo a folha…':'conferindo a arte…';
|
||||
const tempo=x.analiseInicio?' · '+segundosDesde(x.analiseInicio)+' s':'';
|
||||
if(x.med && x.med.grande) return 'gerando a prévia e conferindo a arte · '+faltaLeitura(x.leitura)+tempo;
|
||||
return (x.pct<50?'lendo o arquivo…':x.pct<70?'medindo a folha…':'conferindo a arte…')+tempo;
|
||||
}
|
||||
// The file card's thumbnail (52 x 96 px, drawn at twice that for sharp screens).
|
||||
// At 480 x 720 it is the picture the Kanban shows of the order (checkout.js).
|
||||
|
||||
@@ -93,7 +93,7 @@ function avaliar(){
|
||||
// Resíduo e fundo chapado barram antes do pagamento, com um ponto só
|
||||
// (Dropstar, 21/10/2026): então o pedido espera a conferência terminar.
|
||||
const lendo=folhas.find(x=>x.pct!=null);
|
||||
if(lendo) return {pronto:false, falta:'Conferindo '+lendo.f.name+'…'};
|
||||
if(lendo) return {pronto:false, falta:'Conferindo '+lendo.f.name+'… · '+segundosDesde(lendo.analiseInicio)+' s'};
|
||||
const barrada=folhas.find(folhaBarrada);
|
||||
if(barrada) return {pronto:false, falta:barrada.an.fundoChapado
|
||||
? barrada.f.name+' está sem fundo transparente. Exporte a folha com fundo transparente, em PNG ou PDF, e envie de novo.'
|
||||
@@ -145,7 +145,8 @@ function avaliar(){
|
||||
return {pronto:true};
|
||||
}
|
||||
if(!artes.length) return {pronto:false, falta:'Arraste suas artes para começar.'};
|
||||
if(artes.some(a=>a.lendo!=null)) return {pronto:false, falta:'Gerando a prévia das artes grandes…'};
|
||||
const grande=artes.find(a=>a.lendo!=null);
|
||||
if(grande) return {pronto:false, falta:'Gerando a prévia das artes grandes… · '+segundosDesde(grande.analiseInicio)+' s'};
|
||||
if(artes.some(a=>a.decodeError || !(a.src||a.semPrevia) || !(a.px>0) || !(a.py>0)))
|
||||
return {pronto:false, falta:'Não conseguimos ler uma das imagens. Exporte-a novamente em PNG antes de continuar.'};
|
||||
if(artes.some(a=>!Number.isFinite(a.cm) || a.cm>larguraFilme()))
|
||||
@@ -156,7 +157,8 @@ function avaliar(){
|
||||
' para ver a nota e o preço.'};
|
||||
// Item 4: a dot under 2 mm in a loose artwork holds the order like on a
|
||||
// sheet, until the customer erases it or accepts printing that artwork so.
|
||||
if(artes.some(a=>a.lendoArte)) return {pronto:false, falta:'Conferindo as artes…'};
|
||||
const lendoArte=artes.find(a=>a.lendoArte);
|
||||
if(lendoArte) return {pronto:false, falta:'Conferindo as artes… · '+segundosDesde(lendoArte.analiseInicio)+' s'};
|
||||
const comPontos=artes.find(a=>{const an=analiseDaArte(a);return an&&an.residuos&&!a.residuoAceito;});
|
||||
if(comPontos){const n=analiseDaArte(comPontos).residuos;
|
||||
return {pronto:false, falta:comPontos.f.name+' tem '+n+' ponto'+(n>1?'s':'')+
|
||||
|
||||
@@ -125,7 +125,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, semAnalise:null}));
|
||||
const novas=fs.map(f=>({f, med:null, rep:1, m:0, semAnalise:null, analiseInicio:Date.now()}));
|
||||
folhas=folhas.concat(novas); // soma, não substitui
|
||||
pintaFolha();
|
||||
novas.forEach(x=>{
|
||||
@@ -219,7 +219,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}));
|
||||
const novos=fs.map(f=>({f,px:0,py:0,cm:0,q:1,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();
|
||||
|
||||
Reference in New Issue
Block a user