diff --git a/web/checkout.js b/web/checkout.js index fdb18b8..9b3ca5b 100644 --- a/web/checkout.js +++ b/web/checkout.js @@ -471,7 +471,12 @@ if (draftId) clearDraft(); if (!clienteOk() || !entrega.cotado) return; if (!enderecoOk()) return message('Preencha o endereço de entrega.','error'); - if (!cartPodeEnviar()) return message('Revise a qualidade e confirme a ressalva de cada item antes de enviar o pedido.','error'); + // Guidance, not a failure: the customer still has a quality note to + // confirm, and the page takes them to it (Sentry DTF-WEB-Y). + if (!cartPodeEnviar()) { + document.querySelector('.aceiteRes input:not(:checked)')?.closest('label')?.scrollIntoView({behavior:'smooth',block:'center'}); + return message('Revise a qualidade e confirme a ressalva de cada item antes de enviar o pedido.','warn'); + } const semArquivo=faltaEnvioMensagem(); if (semArquivo) return message(semArquivo+'.','error'); const cart = itensAPagar(); @@ -873,7 +878,8 @@ if (!naPagina() && semPedidos) message('No momento não estamos recebendo pedidos pelo site.','warn'); }); // "Aplicar" sends the coupon with the cart: there is no public route to test - // a code, so the server's answer comes with the quote (front 8.3). + // a code, so the server's answer comes with the quote (front 8.3). Enter in + // the field does the same, and so meets the same checks as "Pagar". const aplicarCupom=document.getElementById('bCupom'); if(aplicarCupom)aplicarCupom.onclick=()=>window.dtfCheckout(); const campoCupom=document.getElementById('fCupom');