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
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:
@@ -55,9 +55,10 @@ const MIRROR_NOTE='O cliente espelhou a arte: confira antes de imprimir';
|
||||
const residueNote=item=>{const many=item.residue_accepted>1;
|
||||
return item.residue_accepted+(many?' pontos menores':' ponto menor')+' que 2 mm, que '+(many?'podem':'pode')+' se perder no recorte';};
|
||||
const residueBadge=item=>badge('! Resíduo aceito','warn','O cliente aceitou imprimir com '+residueNote(item));
|
||||
// Two places per machine in Imprimindo (app/machines.py): the first to come
|
||||
// in is printing, the next is being ripped meanwhile.
|
||||
// A machine's places in Imprimindo (app/machines.py): the first to come in is
|
||||
// printing, the next is being ripped meanwhile, any after it waits its turn.
|
||||
const PRINTING={imprimindo:['Imprimindo','live','Já ripou, está rodando'],
|
||||
aguardando:['Na vez','wait','Na hot folder, espera os da frente'],
|
||||
ripando:['Ripando','rip','O Flexi está ripando enquanto o anterior roda']};
|
||||
// A film in parts on its machine (items 10 and 13, Dropstar 2026-10-30):
|
||||
// "parte 3/7 imprimindo · 4/7 ripando". Flexi rips the part it took last from
|
||||
@@ -259,11 +260,11 @@ function renderBoard(){
|
||||
column.ondragover=e=>{
|
||||
if(dragging?.state===state&&state!=='fin'&&mayReorder(state)){e.preventDefault();markDrop(column,e.clientY);return;}
|
||||
if(!column.classList.contains('allowed'))return;e.preventDefault();column.classList.add('target');
|
||||
if(state==='imp')markLane(column,laneAt(column,e.clientY));};
|
||||
if(state==='imp')markLane(column,dropMachine(column,e.clientY));};
|
||||
column.ondragleave=e=>{if(!column.contains(e.relatedTarget)){column.classList.remove('target');markLane(column,null);clearDrop();}};
|
||||
column.ondrop=async e=>{e.preventDefault();column.classList.remove('target');
|
||||
const order=board.orders.find(o=>o.id===e.dataTransfer.getData('text/plain'));
|
||||
const machine=state==='imp'?laneAt(column,e.clientY):null;markLane(column,null);
|
||||
const machine=state==='imp'?dropMachine(column,e.clientY):null;markLane(column,null);
|
||||
if(!order)return;
|
||||
// Above 1 m Finalizado needs the review photo: the drop opens Revisão
|
||||
// instead of a refused move (Sentry DTF-WEB-B).
|
||||
@@ -301,7 +302,7 @@ function renderBoard(){
|
||||
// machine has its lane, so a card dragged from the queue can be dropped on
|
||||
// the machine it goes to print on.
|
||||
function printingLanes(orders){
|
||||
const cap=board.printing_cap||2, mine=myMachine()?.id;
|
||||
const mine=myMachine()?.id;
|
||||
const filtered=Object.values(boardFilter).some(Boolean);
|
||||
const out=[];
|
||||
const list=(board.machines||[]).filter(m=>m.active||orders.some(o=>o.machine?.id===m.id));
|
||||
@@ -310,6 +311,8 @@ function printingLanes(orders){
|
||||
.sort((a,b)=>(a.printing==='imprimindo'?0:1)-(b.printing==='imprimindo'?0:1));
|
||||
// Filtered, a lane with nothing to show stays out; unfiltered, the places count every order.
|
||||
if(filtered&&!here.length)continue;
|
||||
// Each machine's own places (app/machines.py), set in its sheet.
|
||||
const cap=m.places||board.printing_cap||3;
|
||||
const n=filtered?here.length:Math.max(m.states?.imp||0,here.length);
|
||||
const lane=node('div',undefined,'lanehead'+(m.id===mine?' mine':''));lane.dataset.machine=m.id;
|
||||
const load=n>cap?'acima do limite':plural(Math.max(0,cap-n),'vaga','vagas');
|
||||
@@ -336,6 +339,10 @@ function printingLanes(orders){
|
||||
return out;
|
||||
}
|
||||
// The machine lane under the pointer in Imprimindo: the last lane head above it.
|
||||
// Where a card dropped on Imprimindo goes: the machine of whoever is signed in
|
||||
// on one, wherever it lands in the column (Marcus, 2026-11-17); otherwise the
|
||||
// lane under the pointer.
|
||||
const dropMachine=(column,y)=>myMachine()?.id||laneAt(column,y);
|
||||
function laneAt(column,y){
|
||||
let found=null;
|
||||
for(const el of column.querySelectorAll('[data-machine]')){
|
||||
|
||||
Reference in New Issue
Block a user