fix: a stalled card says it only in red at its time, not as a mark too
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 3m41s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 1m1s
All checks were successful
Build and deploy / Validate source (push) Successful in 5s
Build and deploy / Integration suite on a real stack (push) Successful in 3m41s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 1m1s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -906,7 +906,7 @@ function cardFlags(order){
|
||||
const s=order.snapshot, out=[];
|
||||
if(order.cancelled_at)return [['bad','Cancelado','Cancelado por '+order.cancelled_by+' em '+when(order.cancelled_at)+': '+order.cancel_reason]];
|
||||
const live=order.state!=='fin';
|
||||
if(live&&stalled(order))out.push(['bad','Parado '+hoursSince(order.updated_at)+' h','Sem mudar de etapa desde '+when(order.updated_at)]);
|
||||
// A stalled order says so in red where its time is, not as a mark.
|
||||
const redo=(order.reworks||[]).filter(r=>r.authorized!==false);
|
||||
if(redo.length)out.push(['bad','Retrabalho',redo.map(r=>'Retrabalho · '+REWORK_CAUSES[r.cause]+' · '+metres(r.metres)+(r.authorized?'':' · aguardando autorização')).join(' · ')]);
|
||||
if(live&&s.items.some(mirroredItem))out.push(['warn','Espelhada',MIRROR_NOTE]);
|
||||
@@ -957,7 +957,10 @@ function card(order,place){
|
||||
c.setAttribute('aria-label','Pedido #'+order.number+', '+who.title+': '+step);
|
||||
const top=node('span',undefined,'ctop'), info=node('span',undefined,'cinfo');
|
||||
const row=node('span',undefined,'crow');
|
||||
row.append(node('span','#'+order.number,'num'),originTag(order),node('span',shortAgo(order.updated_at),'age'+(stalled(order)&&!order.cancelled_at?' late':'')));
|
||||
const late=stalled(order)&&!order.cancelled_at;
|
||||
const age=node('span',shortAgo(order.updated_at),'age'+(late?' late tip-l':''));
|
||||
if(late)age.dataset.tip='Parado: sem mudar de etapa desde '+when(order.updated_at);
|
||||
row.append(node('span','#'+order.number,'num'),originTag(order),age);
|
||||
const name=node('span',who.title,'cname');name.title=[who.legal,who.mail].filter(Boolean).join(' · ')||who.title;
|
||||
const meta=node('span',undefined,'cmeta');meta.append(node('span',productLine(s.items)));
|
||||
if(order.machine){const m=node('span',order.machine.name,'mach'+(mine?' mine':''));m.title=mine?'Sua máquina':'Máquina';meta.append(m);}
|
||||
|
||||
Reference in New Issue
Block a user