feat: Ajuste Fino Redesenho in the cart (Marcus 12/11, slice R1)

Under each art the Prumo warns about, the customer can choose Ajuste Fino
or Ajuste Fino Redesenho (vectorize or redraw, per art, +48 h, no batch
price). It is a disabled product until Gestão prices it in the Site tab;
the server charges it per chosen art, Tiny gets a DTFIMP.AJF.RED line and
two more business days, the card shows 'Redesenho · N artes' and the
designer gate applies. The preview loop is slice R2.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-11-12 11:05:17 -03:00
parent 5ca6792221
commit 38f947d632
23 changed files with 429 additions and 60 deletions

View File

@@ -102,6 +102,9 @@
// same amount and the 24 h to the quote.
TAXA_TRATAMENTO=(session.treatment_cents||0)/100;
FAIXAS.tratamento=session.treatment_bands||[];
// Ajuste Fino Redesenho (front 1b): one price per art, no band, only
// offered when the server prices it above zero.
TAXA_REDESENHO=(session.redesign_cents||0)/100;
const tratamentoBox=document.getElementById('tratamentoBox');
if(tratamentoBox){
tratamentoBox.hidden=!(TAXA_TRATAMENTO>0);
@@ -199,6 +202,11 @@
rows.push(linha('Ajuste Fino'+(arts?' · '+arts+(arts===1?' arte':' artes'):'')+' · +24 h',
rs(quote.treatment.cents/100)));
}
if(quote.redesign?.cents){
const arts=Number(quote.redesign.arts)||0;
rows.push(linha('Ajuste Fino Redesenho'+(arts?' · '+arts+(arts===1?' arte':' artes'):'')+' · +48 h',
rs(quote.redesign.cents/100)));
}
if(approved.coupon)
rows.push(linha('Cupom '+approved.coupon.code, '− '+rs(approved.coupon.discount_cents/100)));
rows.push(linha('Total', rs(approved.total_cents/100), 'tot'));
@@ -500,6 +508,9 @@
// Ajuste Fino: true for every art, or the [item, source] pairs chosen.
const treatment=tratamentoParaItens(sheets);
if (treatment) content.treatment = treatment;
// Ajuste Fino Redesenho: the [item, source] pairs chosen, one per art.
const redesign=redesenhoParaItens(sheets);
if (redesign) content.redesign = redesign;
if (cartSnapshot()!==initialCart) throw new Error('O carrinho mudou durante o envio. Confira os itens e envie de novo.');
// Browser timings for Números (item 0.12); they never affect the price.
const T=window.dtfTimings, timings={};