fix: a cart with a quality note to confirm guides the customer to it instead of an error (DTF-WEB-Y)
All checks were successful
Build and deploy / Validate source (push) Successful in 9s
Build and deploy / Integration suite on a real stack (push) Successful in 6m49s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m13s
All checks were successful
Build and deploy / Validate source (push) Successful in 9s
Build and deploy / Integration suite on a real stack (push) Successful in 6m49s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m13s
Enter in the coupon field sends the cart like "Aplicar" and "Pagar"; with a quality note still unconfirmed, the guard's expected message was red and reached Sentry. It is now a warning, and the page scrolls to the first note to confirm. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user