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:
@@ -32,18 +32,16 @@ function avaliar(){
|
||||
reencaixado=false;
|
||||
const ans=folhas.map(x=>x.an).filter(Boolean);
|
||||
if(ans.length!==folhas.length){
|
||||
// A nota precisa cobrir cada folha faturada. Uma folha sem análise não
|
||||
// herda a nota/desconto de outra folha que o navegador conseguiu abrir.
|
||||
// A nota precisa cobrir cada folha. Uma folha sem análise não herda a
|
||||
// nota de outra folha que o navegador conseguiu abrir.
|
||||
const ausentes=folhas.filter(f=>!f.an);
|
||||
const exts=[...new Set(ausentes.map(f=>extDe(f.f.name)))].join(', ');
|
||||
mostraNota([
|
||||
['av','Sem nota · '+exts+' sem análise completa',
|
||||
ausentes.length+' de '+folhas.length+' folha(s) precisam de conferência manual'],
|
||||
['er','Metro pela tabela · '+rs(TABELA[modo]),
|
||||
'exportando em PNG ou PDF, cai até '+rs(pisoEscada())],
|
||||
['fix','Alguém abre seu arquivo','a conferência é feita na mão, na sala']
|
||||
], 0, folhas.length>1? folhas.length+' folhas' : folhas[0].f.name,
|
||||
larguraFilme()+' cm · '+fmtM(metros)+' m · preço de tabela');
|
||||
larguraFilme()+' cm · '+fmtM(metros)+' m');
|
||||
return {pronto:true};
|
||||
}
|
||||
const dpi=Math.min(...ans.map(a=>a.dpi));
|
||||
@@ -91,7 +89,7 @@ function avaliar(){
|
||||
const media=Math.round(notas.reduce((s,n)=>s+n,0)/notas.length), pior=Math.min(...notas);
|
||||
mostraNota([
|
||||
['ok','Montagem por nossa conta','5 mm garantidos'],
|
||||
[cls(pior),'Pior arte em '+pior+'%',pior>=85?'todas em boa resolução':'reenviar maior sai mais barato']
|
||||
[cls(pior),'Pior arte em '+pior+'%',pior>=85?'todas em boa resolução':'há arte abaixo da resolução ideal']
|
||||
],media,artes.length+' arte'+(artes.length>1?'s':''),
|
||||
'folha montada por nós · '+fmtM(metros)+' m');
|
||||
return {pronto:true};
|
||||
@@ -142,7 +140,7 @@ function ressalvaResolucao(){
|
||||
const box=$('ciente'), chk=$('cienteOk');
|
||||
let baixas=[], geral=300, recusadas=[];
|
||||
if(ehFolha()){
|
||||
// Uma régua só: o número que precifica é o número que bloqueia.
|
||||
// Uma régua só: o número da nota é o número que bloqueia.
|
||||
// Recusa quando a média por área fica abaixo de 96 DPI — a folha inteira não
|
||||
// vale o filme. Se a média passa mas há peças ruins, é ressalva com aceite.
|
||||
folhas.forEach((x,k)=>{
|
||||
@@ -166,7 +164,7 @@ function ressalvaResolucao(){
|
||||
const todas=comTamanho.map(a=>dpiDe(a));
|
||||
geral = todas.length? Math.round(Math.max(...todas)) : 300;
|
||||
}
|
||||
// Abaixo de 96 DPI a sala não imprime. Não é desconto, é recusa —
|
||||
// Abaixo de 96 DPI a sala não imprime. Não é ressalva, é recusa —
|
||||
// e não existe aceite que destrave.
|
||||
if(recusadas.length){
|
||||
$('cienteTxt').innerHTML=
|
||||
|
||||
Reference in New Issue
Block a user