feat: the customer picks Agrupado or Misturado and sees free copies that fit the same metres (Rodada 5, C1, C2)

C2: encaixar takes an optional mode ('linhas', 'forma'; the Montar keeps
the automatic one); the buy box shows both billed lengths and the
difference in cm and R$ when they differ, marking the packing on screen.
C1: up to 5 arts are tried with up to 30 more copies, by binary search
with the packing in use, and up to 3 '+k file' buttons add the copies
that keep the billed metres. Both run after the order check, never
before it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-11-30 15:03:02 -03:00
parent 28c10aabf6
commit 030b66c697
7 changed files with 189 additions and 13 deletions

View File

@@ -729,6 +729,7 @@ function pintaArtes(){
// A file still being read when the customer left the product page lands
// here with no product open: nothing to paint.
if(!MODOS[modo]) return;
if(!artes.length) modoEncaixe='auto'; // C2: lista zerada volta ao automático
if(!espelhavel()) artes.forEach(a=>{ a.esp=false; });
invalidaItemAtual();
$('zona').classList.toggle('compacta', artes.length>0);