fix: a proof card shows the film it prints, the Kanban's tooltips stay whole on screen, and a session that changed is a warning (DTF-WEB-26)
A proof card bills 0 m: the board now carries proof_film_cm per item (the same measure as Números), the card reads 'prova · 0,15 m', the column totals count it, and the drawer says 'prova sem custo', the proof's film and 'Folha do pedido'. The [data-tip] tooltips were CSS boxes inside the card, cut by the column and over the card below; one box fixed to the window now sits under the element, or over it near the bottom, inside the screen. 'Sua conta ou sessão mudou' is guidance shown as a warning, so it stays out of Sentry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -212,7 +212,10 @@ const GLYPH={
|
||||
cor:'M232,144a64.07,64.07,0,0,1-64,64H80a8,8,0,0,1,0-16h88a48,48,0,0,0,0-96H51.31l34.35,34.34a8,8,0,0,1-11.32,11.32l-48-48a8,8,0,0,1,0-11.32l48-48A8,8,0,0,1,85.66,45.66L51.31,80H168A64.07,64.07,0,0,1,232,144Z',
|
||||
rev:'M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z',
|
||||
fin:'M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z'};
|
||||
const orderMetres=o=>o.snapshot.items.reduce((t,i)=>t+Number(i.billed_metres),0);
|
||||
// The film an order takes: what is billed, or, for a free proof card, the film
|
||||
// its sheets print (proof_film_cm, from the server).
|
||||
const proofFilmMetres=o=>Object.values(o.proof_film_cm||{}).reduce((t,cm)=>t+Number(cm),0)/100;
|
||||
const orderMetres=o=>o.snapshot.proof_of?proofFilmMetres(o):o.snapshot.items.reduce((t,i)=>t+Number(i.billed_metres),0);
|
||||
// On a phone the board shows one stage at a time, picked from the chips above it.
|
||||
let phoneCol='rec';
|
||||
// Atrasados (front 11): the cards past the stage limit, with the person
|
||||
@@ -523,7 +526,7 @@ function card(order,place){
|
||||
if(special){const tag=node('span',special,'origin');tag.title=special;meta.append(tag);}
|
||||
if(s.items.some(i=>i.mode==='premium'))meta.append(badge('Premium','','DTF Têxtil Premium: 8 passadas, branco no máximo'));
|
||||
if(order.machine){const m=node('span',order.machine.name,'mach'+(mine?' mine':''));m.title=mine?'Sua máquina':'Máquina';meta.append(m);}
|
||||
meta.append(node('b',metres(orderMetres(order)),'mtr'));
|
||||
meta.append(node('b',(order.snapshot.proof_of?'prova · ':'')+metres(orderMetres(order)),'mtr'));
|
||||
info.append(row,name,meta);
|
||||
const art=artBox(s.items,'thumb');top.append(art,info);
|
||||
c.append(top);
|
||||
|
||||
Reference in New Issue
Block a user