feat: new layout phase D, the production board and stage times as on the canvas
Roadmap Novo Layout, phase D step 2 (canvas A1, D1): a late card gets the red border and red time (warn colour for a warn late) instead of the Atrasados strip, which is no longer shown (renderLatebar kept for later); machine lanes with name, blocking-alert dot, free places and dashed free slots; compact Finalizado cards; the phone stage chips fade at the edge. "Tempo aceitável de cada etapa" is a table (Etapa, Aceitável, Responde pela etapa) with the same API. Built by Prensa. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -754,17 +754,38 @@ const STAGE_LABELS={rec:'Arte recebida',tra:'Arte conferida',imp:'Imprimindo',re
|
||||
function stageLimitsDialog(){
|
||||
api('/stage-limits').then(({limits})=>{
|
||||
const current=Object.fromEntries((limits||[]).map(limit=>[limit.state,limit]));
|
||||
const inputs={},fields=[];
|
||||
const inputs={};
|
||||
const table=node('table',undefined,'dtable stageLimits');
|
||||
const thead=node('thead'),headRow=node('tr');
|
||||
for(const title of ['Etapa','Aceitável','Responde pela etapa'])headRow.append(node('th',title));
|
||||
thead.append(headRow);
|
||||
const tbody=node('tbody');
|
||||
for(const state of ['rec','tra','imp','rev','fin']){
|
||||
const limit=current[state]||{hours:2,responsible:''};
|
||||
const tr=node('tr');
|
||||
const stage=node('td');
|
||||
const name=node('span',undefined,'limitStage');
|
||||
name.append(svgIcon(GLYPH[state],'i m'),node('b',STAGE_LABELS[state]));
|
||||
stage.append(name);
|
||||
const hoursCell=node('td');
|
||||
const hoursBox=node('span',undefined,'inp limitHours');
|
||||
const hours=node('input');hours.type='number';hours.min='0.1';hours.step='0.5';hours.value=limit.hours;
|
||||
hours.className='limitInp';hours.setAttribute('aria-label','Horas aceitáveis em '+STAGE_LABELS[state]);
|
||||
hoursBox.append(hours,node('span','h','pre'));
|
||||
hoursCell.append(hoursBox);
|
||||
if(state==='fin')hoursCell.append(node('span','3 dias','limitHint'));
|
||||
const whoCell=node('td');
|
||||
const whoBox=node('span',undefined,'inp limitWho');
|
||||
const who=node('input');who.value=limit.responsible||'';who.maxLength=80;
|
||||
who.className='limitInp';who.setAttribute('aria-label','Quem responde por '+STAGE_LABELS[state]);
|
||||
whoBox.append(who);
|
||||
whoCell.append(whoBox);
|
||||
inputs[state]={hours,who};
|
||||
fields.push(field(STAGE_LABELS[state]+' (horas)',hours,state==='fin'?'Use 72 para 3 dias.':''));
|
||||
fields.push(field('Responsável por '+STAGE_LABELS[state].toLowerCase(),who));
|
||||
tr.append(stage,hoursCell,whoCell);tbody.append(tr);
|
||||
}
|
||||
formDialog('Tempos aceitáveis por etapa',{host:dialogHost(),width:640,fields,
|
||||
note:'Amarelo ao passar do limite; vermelho no dobro.',
|
||||
table.append(thead,tbody);
|
||||
formDialog('Tempo aceitável de cada etapa',{host:dialogHost(),width:680,className:'limitsDialog',
|
||||
text:'Passou disso, o horário do card fica vermelho.',fields:[table],label:'Salvar tempos',
|
||||
onsave:async()=>{
|
||||
const limits=Object.entries(inputs).map(([state,{hours,who}])=>({
|
||||
state,hours:Number(hours.value),responsible:who.value.trim()}));
|
||||
|
||||
Reference in New Issue
Block a user