feat: places per machine, drops on Imprimindo go to your machine, a Venda carries its seller to Tiny (DTF-WEB-V)
All checks were successful
Build and deploy / Validate source (push) Successful in 10s
Build and deploy / Integration suite on a real stack (push) Successful in 7m38s
Build and deploy / Secret scan and release gate (push) Successful in 7s
Build and deploy / Publish images (push) Successful in 1m19s

Marcus, 2026-11-17:
- Each machine has its own places (machines.places, 1 to 6, three to
  start): orders at once in Imprimindo and files at once in its hot
  folder. Admin sets it in the machine dialog; Admin and Gestão in the
  machine sheet's Dados da máquina. A third order shows as "Na vez".
- Whoever is signed in on a machine drops a card anywhere in Imprimindo
  and it goes to that machine; without one, the lane under the pointer.
- Each Kanban user may name their Tiny seller (Usuários, read from
  Tiny's own list); a montador Venda reaches Tiny with the seller of who
  assembled it. Every other order still sends no seller.
- A folder download that never reached storage (a network drop) waits
  for the next pass as a warning and is reported only if it keeps
  failing (Sentry DTF-WEB-V).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-11-17 14:18:19 -03:00
parent c61ac27ca4
commit aaa6090642
19 changed files with 244 additions and 63 deletions

View File

@@ -249,12 +249,12 @@ async function loadStats(){
$('stats-kpis').replaceChildren(cards,extra);
statsChart($('stats-chart'),data.daily);
// Por máquina: what each printed, how fast, and what it has now.
const cap=board.printing_cap||2;
const capOf=id=>(board.machines||[]).find(x=>x.id===id)?.places||board.printing_cap||3;
const machineRows=data.machines.map(m=>{
const tr=node('tr');if(!m.active)tr.classList.add('off');
const name=node('td');name.append(node('b',m.name+(m.active?'':', desativada')),
node('span',(m.orders?plural(m.orders,'pedido','pedidos'):'nada')+(m.last_finished?', último '+when(m.last_finished):''),'sub'));
const now=!m.id?'—':m.now.imp?(m.now.imp>=cap?'cheia':m.now.imp+' imprimindo')+(m.now.tra?', '+m.now.tra+' na fila':''):m.now.tra?m.now.tra+' na fila':'livre';
const now=!m.id?'—':m.now.imp?(m.now.imp>=capOf(m.id)?'cheia':m.now.imp+' imprimindo')+(m.now.tra?', '+m.now.tra+' na fila':''):m.now.tra?m.now.tra+' na fila':'livre';
tr.append(name,node('td',m.orders?metres(m.metres):'—','r'),
node('td',m.metres_per_hour!=null?String(m.metres_per_hour).replace('.',',')+' m':'—','r'),node('td',now,'muted'));
return tr;});