fix: Pedido pago fora do site no longer offers Faturado, and a 422 names its field (DTF-WEB-E)
All checks were successful
Build and deploy / Validate source (push) Successful in 6s
Build and deploy / Integration suite on a real stack (push) Successful in 7m16s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m16s

The register dialog offered Faturado, which the API refuses there: an
invoiced sale goes through the montador's Venda (front 7a.3). The choices are
now Pix, Cartão, Dinheiro and Crédito do cliente, as the API accepts. A
validation error in the Kanban now shows its first field and message instead
of the bare "Confira os campos (422)".

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-11-16 13:12:02 -03:00
parent 52b8bb368f
commit 397e55c81d
2 changed files with 9 additions and 2 deletions

View File

@@ -235,7 +235,9 @@ function callout(d,title,text,tone=''){
// An order paid outside the site (Dropstar's rule D-35): the team builds the
// cart on the Site, as a customer would, and registers it here. Origin and
// payment start unchosen: a default would become the answer to everything.
const PAID_OUTSIDE={pix:'Pix',card:'Cartão',cash:'Dinheiro',credit:'Crédito do cliente',faturado:'Faturado'};
// Faturado is not one of them: an invoiced sale goes through the montador's
// Venda (front 7a.3), and the API refuses it here (Sentry DTF-WEB-E).
const PAID_OUTSIDE={pix:'Pix',card:'Cartão',cash:'Dinheiro',credit:'Crédito do cliente'};
function registerDialog(quote){
const group=(name,label,options)=>{
const g=node('div',undefined,'fgroup2');g.setAttribute('role','radiogroup');g.setAttribute('aria-label',label);