feat: one price per product; the grade is shown but no longer prices
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 3m58s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 1m11s
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 3m58s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 1m11s
Dropstar asked on 2026-10-23 to drop the five-band ladder by grade: textile R$ 19,90 a ready sheet and R$ 21,90 loose art, UV R$ 79,90 and R$ 89,90. - the server charges PRICES (app/core/pricing.py) whatever the grade; the grade is still validated and kept with the item, and discount_cents is gone - a file opened by hand pays the product's price plus MANUAL_FILE_EXTRA_CENTS - the Site's PRECO replaces FAIXAS, TABELA and MONTAGEM; the top chip, the home example, the product cards, the selector and the price table read it (data-preco), so no page still says "a partir de R$ 14,90" - no "Desconto pela nota", ladder, "cai até" or "sai mais barato" anywhere; the buy box shows "Nota da arte" on its own line, the 96 DPI refusal and the resolution warning stay - the review reason "Nota informada sem análise da arte" is removed: it only stopped a discount. The server still checks the grade against the files, so the grade shown on the Kanban and in Tiny stays honest - the Tiny probe's test order uses the single price - docs/CONTEXT.md: Commercial rules and Still to do Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Site DTF — the product page's buy box: price ladder, price per metre, billed length,
|
||||
/* Site DTF — the product page's buy box: the grade, price per metre, billed length,
|
||||
total and the add-to-cart button, beside the live sheet. It shows the item
|
||||
the other site-*.js files already priced (itemAtual) and never computes a
|
||||
price of its own, so the box and the cart always agree. */
|
||||
@@ -9,23 +9,12 @@
|
||||
vals.hidden=!it;
|
||||
add.disabled=!it || !itemPodeEnviar(it);
|
||||
if(!it) return;
|
||||
const semNota=!it.nota;
|
||||
// The price ladder in resolution: nota = DPI ÷ 3, so 90 is 270 DPI.
|
||||
const faixas=FAIXAS[it.modo], ativa=faixas.findIndex(([min])=>it.nota>=min);
|
||||
$('cEscada').innerHTML=faixas.map(([min,v],i)=>
|
||||
'<li'+(i===ativa?' class="on" aria-current="true"':'')+'><span>'+
|
||||
(min? min*3+'+'+(i? '' : ' DPI') : semNota? 'cheio' : 'menos')+'</span>'+
|
||||
'<b>'+rs(v).slice(3)+'</b></li>').join('');
|
||||
const analisadas=ehFolha(it.modo) && folhas.length && folhas.every(x=>x.an);
|
||||
$('cMetroLbl').textContent = it.extra ? 'Metro · cheio + '+rs(it.extra)+' manual'
|
||||
: semNota ? 'Metro · preço cheio'
|
||||
: analisadas && folhas.every(x=>x.an.vetor) ? 'Metro · arte vetorial'
|
||||
: analisadas ? 'Metro · '+Math.min(...folhas.map(x=>x.an.dpi))+' DPI'
|
||||
: 'Metro';
|
||||
// One price per product (Dropstar, 2026-10-23): the grade is shown to explain
|
||||
// the file, on its own line, and never changes the metre.
|
||||
$('cNota').textContent = it.nota ? it.nota+'/100' : '—';
|
||||
$('cMetroLbl').textContent = it.extra ? 'Metro · com '+rs(it.extra)+' de arquivo manual' : 'Metro';
|
||||
$('cMetro').textContent=rs(it.unit);
|
||||
$('cMetragem').textContent=fmtM(it.cob)+' m';
|
||||
const economia=(TABELA[it.modo]-(it.unit-(it.extra||0)))*it.cob;
|
||||
$('cEco').textContent = economia>0.005 ? rs(economia)+' a menos pela resolução da arte' : '';
|
||||
const partes=ehFolha(it.modo) ? Math.ceil(it.metros/20) : 1;
|
||||
$('cPartes').textContent = partes>1 ? ' Sai em '+partes+' partes de até 20 m.' : '';
|
||||
const sobraCm=Math.round((it.cob-it.metros)*100);
|
||||
|
||||
Reference in New Issue
Block a user