feat: above 10 m the payment asks for the proof in a pop-up, not mandatory (Marcus, 2026-12-02)
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 8m36s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m6s

The proof checkbox in the cart becomes a pop-up when the customer presses
pay on an order above 10 m: "Quero aprovar uma prova" sends proof=true,
"Seguir sem prova", Escape or closing goes on without one. Same text as the
old box. Below 10 m nothing is asked. A cart already sent goes straight to
its payment without asking again. The dialog sits outside the panels so it
shows wherever pay is pressed. The automatic proof above 10 m is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-12-02 10:43:17 -03:00
parent 41126a42fd
commit 1633b995eb
6 changed files with 56 additions and 22 deletions

View File

@@ -526,6 +526,8 @@
const totalArquivos=item=>(item.localFiles||[]).length+(item.savedFiles||[]).length;
if (semCap.some(item=>totalArquivos(item)>200))
return message('Este item tem mais de 200 arquivos. Divida em dois itens.','error');
// Above 10 m the pop-up asks for the proof; the answer is part of the order.
if ((await perguntaProva())===null || busy) return;
const initialCart=cartSnapshot();
busy = true;
$('bPagar').disabled = true;
@@ -576,8 +578,8 @@
...(cupom?{coupon:cupom}:{})};
const destination = destinoApi();
if (destination) content.destination = destination;
// "Quero aprovar uma prova antes de imprimir": the order waits for the customer.
if ($('fProva')?.checked) content.proof = true;
// "Quero aprovar uma prova", chosen in the pop-up: the order waits for the customer.
if (querProva) content.proof = true;
// Ajuste Fino: true for every art, or the [item, source] pairs chosen.
const treatment=tratamentoParaItens(sheets);
if (treatment) content.treatment = treatment;