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:
@@ -67,7 +67,9 @@ function sitePriceBlock(product){
|
||||
starts.setAttribute('aria-label','Quando o novo preço de '+product.title+' começa');
|
||||
startsLabel.append(starts);
|
||||
// Faixas progressivas (front 8.2): a nova tabela começa vazia; as faixas
|
||||
// viajam com este preço. Ajuste Fino conta as faixas em artes, os produtos em metros.
|
||||
// viajam com este preço. Ajuste Fino conta as faixas em artes, os produtos em
|
||||
// metros. O Redesenho tem um preço único por arte, nunca faixas (front 1b).
|
||||
const permiteFaixas=product.id!=='redesenho';
|
||||
const bandUnit=product.unit==='arte'?'artes':'m';
|
||||
const bandRows=node('div',undefined,'siteBandRows');
|
||||
const addBand=node('button','Adicionar faixa','btn ghost');addBand.type='button';
|
||||
@@ -105,11 +107,11 @@ function sitePriceBlock(product){
|
||||
if(whenDate&&Number.isNaN(whenDate.getTime()))throw new Error('Data inválida.');
|
||||
await api('/site/products/'+product.id+'/prices',
|
||||
{unit_cents:cents,starts_at:whenDate?whenDate.toISOString():null,
|
||||
bands:formBands()});
|
||||
bands:permiteFaixas?formBands():[]});
|
||||
say(whenDate?'Preço salvo para '+when(whenDate)+'.':'Preço salvo. Vale a partir de agora.');
|
||||
await loadSiteAdmin();
|
||||
},'btn pri');
|
||||
form.append(priceLabel,startsLabel,save,bands);
|
||||
form.append(priceLabel,startsLabel,save,...(permiteFaixas?[bands]:[]));
|
||||
|
||||
const scheduled=node('div',undefined,'siteScheduled');
|
||||
if(product.scheduled.length){
|
||||
|
||||
Reference in New Issue
Block a user