feat: two cards at most in Imprimindo per machine, one printing and one ripping (Dropstar's third round, item 11)
All checks were successful
Build and deploy / Validate source (push) Successful in 7s
Build and deploy / Integration suite on a real stack (push) Successful in 4m14s
Build and deploy / Secret scan and release gate (push) Successful in 7s
Build and deploy / Publish images (push) Successful in 1m5s
All checks were successful
Build and deploy / Validate source (push) Successful in 7s
Build and deploy / Integration suite on a real stack (push) Successful in 4m14s
Build and deploy / Secret scan and release gate (push) Successful in 7s
Build and deploy / Publish images (push) Successful in 1m5s
A third pull onto the same machine is refused with "máquina5 já tem 2 em Imprimindo", and so is changing a printing order to a full machine. On the board, the first order to enter Imprimindo on its machine is labelled Imprimindo and the next Ripando; the column shows each machine's count, as "máquina5 · 2/2". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -122,6 +122,7 @@ main{padding:0 24px 24px}
|
||||
.col-head small{font-size:13.5px;color:var(--faint)}
|
||||
.col-head .col-sub{justify-content:space-between;min-height:30px}
|
||||
.col-head .col-sub small{white-space:nowrap}
|
||||
.col-head .col-slots{flex-wrap:wrap;gap:5px}
|
||||
.col .empty{font-size:13.5px;color:var(--faint);padding:8px 2px}
|
||||
.card{text-align:left;display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:10px;border:1px solid var(--line2);background:var(--card);width:100%}
|
||||
.card:hover,.card.open{border-color:var(--line3);background:#1E2226}
|
||||
|
||||
@@ -593,6 +593,23 @@ const TREATED_NOTE='O arquivo final foi preparado pela equipe, não é a arte qu
|
||||
// Mirrored by the customer (UV only, web/site-pdf.js): the room checks it before printing.
|
||||
const mirroredItem=item=>!!item.production?.sources?.some(source=>source.mirrored);
|
||||
const MIRROR_NOTE='O cliente espelhou a arte: confira antes de imprimir';
|
||||
// Two places per machine in Imprimindo (app/machines.py): the first to come
|
||||
// in is printing, the next is being ripped meanwhile.
|
||||
const PRINTING={imprimindo:['Imprimindo','ok','Já ripou, está rodando'],
|
||||
ripando:['Ripando','info','O Flexi está ripando enquanto o anterior roda']};
|
||||
// "máquina5 · 2/2" for each machine that prints, or has an order printing.
|
||||
// An operator who works on some machines sees those.
|
||||
function printingRoom(){
|
||||
const cap=board.printing_cap, mine=ME?.role==='operador'&&ME.machines?.length?ME.machines:null;
|
||||
const list=(board.machines||[]).filter(m=>(m.active||m.states.imp)&&(!mine||mine.includes(m.id)));
|
||||
if(!list.length)return null;
|
||||
const room=node('div',undefined,'col-slots');
|
||||
room.append(...list.map(m=>{const n=m.states.imp||0;
|
||||
const chip=node('span',m.name+' · '+n+'/'+cap,'pill '+(n>cap?'bad':n===cap?'warn':'muted'));
|
||||
chip.title=n>=cap?m.name+' está cheia: abre vaga quando um pedido sair de Imprimindo':m.name+' tem '+(cap-n)+' vaga'+(cap-n===1?'':'s');
|
||||
return chip;}));
|
||||
return room;
|
||||
}
|
||||
async function proofOk(order){
|
||||
await api('/orders/'+order.id+'/proof',{});say('Prova do pedido #'+order.number+' conferida.');await load();
|
||||
}
|
||||
@@ -712,6 +729,7 @@ function renderBoard(){
|
||||
sub.append(tools);
|
||||
}
|
||||
head.append(line,sub);
|
||||
if(state==='imp'){const room=printingRoom();if(room)head.append(room);}
|
||||
column.append(head);
|
||||
for(const order of orders)column.append(card(order));
|
||||
if(state==='fin'&&finishedMore&&!Object.values(boardFilter).some(Boolean))moreButton(column,true,loadOlderFinished);
|
||||
@@ -750,6 +768,7 @@ function card(order){
|
||||
else if(order.state!=='fin'){
|
||||
const p=printState(order);
|
||||
flags.append(badge((p.tone==='ok'?'✓ ':p.tone==='warn'?'! ':'')+p.text,p.tone));
|
||||
if(order.printing)flags.append(badge(...PRINTING[order.printing]));
|
||||
if(s.items.some(i=>i.quality_status==='warning'))flags.append(badge('! Ressalva','warn','O cliente aceitou a ressalva de resolução'));
|
||||
if(s.items.some(mirroredItem))flags.append(badge('Espelhado','bad',MIRROR_NOTE));
|
||||
if(stalled(order))flags.append(badge('⏱ Parado '+hoursSince(order.updated_at)+' h','bad','Sem mudar de etapa desde '+when(order.updated_at)));
|
||||
|
||||
Reference in New Issue
Block a user