diff --git a/web/kanban-board.js b/web/kanban-board.js index 079772c..6aef1d4 100644 --- a/web/kanban-board.js +++ b/web/kanban-board.js @@ -572,16 +572,25 @@ function phoneMenu(){ const ava=node('span',initialsOf(ME.name||ME.email),'ava');ava.append(node('i',undefined,'pres on')); words.append(node('b',ME.name||ME.email),node('span',(ROLE_NAMES[ME.role]||ME.role)+(myMachine()?', na '+myMachine().name:''),'sub')); who.append(ava,words); - const rows=[]; - if(TAB_NEEDS.integrations()){const n=$('badge-integrations').textContent; - rows.push(mrow(IC.link,'Integrações',go(()=>showTab('integrations')),'mrow',n?statePill(n,'warn'):null));} - if(TAB_NEEDS.users())rows.push(mrow(IC.user,'Usuários',go(()=>showTab('users')))); - if(ME.machine_question)rows.push(mrow(IC.printer,'Trocar de máquina',go(()=>askMachine(true)),'mrow',node('span',myMachine()?.name||'','lbl'))); + // Seções: the tabs that do not fit the bottom bar (canvas Ph2), with the + // rail's own icon and name; then the account. + const sections=[]; + for(const name of MORE_TABS){ + if(TAB_NEEDS[name]&&!TAB_NEEDS[name]())continue; + const nav=document.querySelector('.rail .nav[data-tab="'+name+'"]'); + const n=name==='integrations'?$('badge-integrations').textContent:''; + const row=mrow(nav.querySelector('path').getAttribute('d'),nav.querySelector('span').textContent,go(()=>showTab(name)),'mrow',n?statePill(n,'warn'):null); + if(tab===name)row.classList.add('on'); + sections.push(row); + } + if(ME.machine_question)sections.push(mrow(IC.printer,'Trocar de máquina',go(()=>askMachine(true)),'mrow',node('span',myMachine()?.name||'','lbl'))); const light=kanbanTheme.get()==='light'; - rows.push(mrow(light?ICON_MOON:ICON_SUN,light?'Mudar para o modo escuro':'Mudar para o modo claro',go(()=>{kanbanTheme.toggle();paintThemeToggle();}))); - rows.push(mrow(IC.key,'Trocar a senha',go(accountForm))); - rows.push(mrow(IC.logout,'Sair',go(()=>$('logout').click()),'mrow bad')); - const body=node('div',undefined,'sbody');body.append(...rows); + const account=[mrow(light?ICON_MOON:ICON_SUN,light?'Mudar para o modo escuro':'Mudar para o modo claro',go(()=>{kanbanTheme.toggle();paintThemeToggle();})), + mrow(IC.key,'Trocar a senha',go(accountForm)), + mrow(IC.logout,'Sair',go(()=>$('logout').click()),'mrow bad')]; + const body=node('div',undefined,'sbody'); + if(sections.length)body.append(node('span','Seções','sgroup'),...sections); + body.append(node('span','Conta','sgroup'),...account); m=sheet([who,body],{label:'Mais',role:'menu'}); } // The board's filters on the phone: every kind, the product too, and how many diff --git a/web/kanban-numbers.js b/web/kanban-numbers.js index 293aacf..7ec031b 100644 --- a/web/kanban-numbers.js +++ b/web/kanban-numbers.js @@ -218,27 +218,35 @@ async function loadStats(){ if(editLimits){editLimits.hidden=!may('manage');editLimits.onclick=()=>stageLimitsDialog();} statsData=data;statsPeriod(); $('stats-note').textContent='Pedidos pagos de '+dayLabel(data.start)+' a '+dayLabel(data.end)+', sem testes e cancelados'; - const hk=(label,value,unit,note)=>{const k=node('div',undefined,'hk');const b=node('b',value);if(unit)b.append(node('small',unit)); - k.append(node('span',label),b,...(note?[node('em',note)]:[]));return k;}; - const mk=(label,value,unit)=>{const k=node('div',undefined,'mk');const b=node('b',value);if(unit)b.append(node('small',unit));k.append(node('span',label),b);return k;}; const pct=n=>data.orders?Math.round(100*n/data.orders)+'%':''; - const [reais,centavos]=money(data.cents).split(','); + const share=v=>v==null?'—':String(v).replace('.',',')+'%'; + const rw=data.rework; // The ticket is the cash received over the cash orders only: an Interno or // faturado order records the table price, not money received (front 7a.3). const cashOrders=Math.max(0,Number(data.orders)-(data.price_table||[]).reduce((sum,row)=>sum+(row.orders||0),0)); - const hero=node('div',undefined,'hero'); - hero.append(hk('Metros vendidos',metres(data.metres).replace(' m',''),'m',plural(data.orders,'pedido pago','pedidos pagos')), - hk('Recebido, com frete',reais,','+centavos,cashOrders?'ticket médio de '+money(Math.round(data.cents/cashOrders)):''), - hk('Do pagamento ao Finalizado',duration(data.lead.median_hours),'',data.lead.orders?'mediana de '+plural(data.lead.orders,'pedido','pedidos')+', sem o tempo em Aguardando contato':'nenhum finalizado no período')); - const rw=data.rework, share=v=>v==null?'—':String(v).replace('.',',')+'%'; - const minis=node('div',undefined,'minis'); - minis.append(mk('Pedidos pagos',String(data.orders)), - mk('Ticket médio',cashOrders?money(Math.round(data.cents/cashOrders)):'—'), - mk('Com correção',String(data.corrected),pct(data.corrected)), - mk('Artes tratadas',String(data.treated.orders),pct(data.treated.orders)), - mk('Retrabalho da casa',share(rw.house.percent),'meta '+share(rw.house.goal_percent)), - mk('Aguardando contato',String(board.orders.filter(waitingContact).length),'agora')); - $('stats-kpis').replaceChildren(hero,minis); + const card=(label,value,note,unit)=>{ + const k=node('div',undefined,'kpi'),b=node('b',value); + if(unit)b.append(node('small',unit)); + k.append(node('span',label),b,...(note?[node('small',note)]:[]));return k; + }; + const cards=node('div',undefined,'stats-cards'); + cards.append( + card('Metros vendidos',metres(data.metres).replace(' m',''),plural(data.orders,'pedido pago','pedidos pagos'),'m'), + card('Recebido, com frete',money(data.cents),cashOrders?'ticket médio de '+money(Math.round(data.cents/cashOrders)):''), + card('Do pagamento ao Finalizado',duration(data.lead.median_hours),data.lead.orders?'mediana de '+plural(data.lead.orders,'pedido','pedidos')+', sem o tempo em Aguardando contato':'nenhum finalizado no período'), + card('Retrabalho da casa',share(rw.house.percent),'meta '+share(rw.house.goal_percent))); + // The old small figures stay under the four cards: the two already shown in + // the cards' notes (paid orders and ticket) are not repeated. + const mini=(label,value,note)=>{ + const k=node('div',undefined,'kpi-mini'); + k.append(node('span',label),node('b',value),...(note?[node('small',note)]:[]));return k; + }; + const extra=node('div',undefined,'stats-extra'); + extra.append( + mini('Com correção',String(data.corrected),pct(data.corrected)), + mini('Artes tratadas',String(data.treated.orders),pct(data.treated.orders)), + mini('Aguardando contato',String(board.orders.filter(waitingContact).length),'agora')); + $('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; @@ -270,10 +278,9 @@ async function loadStats(){ $('stats-unpaid').replaceChildren(...unpaidRows.map(([label,value])=>{const tr=node('tr'); tr.append(node('td',label),node('td',value,'r'));return tr;})); // Who prepared the finals of the period's orders, for the designer's productivity. - const most=Math.max(1,...data.treated.by.map(t=>t.orders)); $('stats-treated').replaceChildren(...(data.treated.by.length?data.treated.by.map(t=>{ - const row=node('div',undefined,'byrow'),track=node('span',undefined,'track'),fill=node('i');fill.style.width=(100*t.orders/most)+'%';track.append(fill); - row.append(node('span',t.who),track,node('b',String(t.orders)));return row;}):[node('p','Nenhuma arte tratada no período.','empty')])); + const tr=node('tr');tr.append(node('td',t.who),node('td',String(t.orders),'r'));return tr;}): + [emptyRow('Nenhuma arte tratada no período.',2)])); // Rework (D-02 to D-04): authorized metres redone over the film printed, against the goal. const scale=Math.max(rw.goal_percent*2,...rw.causes.map(r=>r.percent||0))*1.15||1; const meter=(value,goal)=>{const m=node('span',undefined,'meter'),track=node('span',undefined,'track'),fill=node('span',undefined,'fill'+(goal!=null&&value>goal?' warn':'')); @@ -319,23 +326,7 @@ async function loadStats(){ node('td',String(s.samples),'r')); if(!s.samples)tr.classList.add('off'); return tr;})); - // Coupons of the period (front 8.3): the page's sections live in the HTML, - // so this panel is built here once and kept beside "Pedidos sem pagamento". - let couponPanel=$('stats-coupons-panel'); - if(!couponPanel){ - couponPanel=node('section',undefined,'panel clip');couponPanel.id='stats-coupons-panel'; - const head=node('div',undefined,'phead');head.append(node('h2','Cupons')); - const table=node('table',undefined,'table'); - const thead=node('thead'),headRow=node('tr'); - for(const [label,cls] of [['Cupom',''],['Pedidos','r'],['Metros','r'],['Desconto','r'],['Recebido','r']]) - headRow.append(node('th',label,cls)); - thead.append(headRow); - const tbody=node('tbody');tbody.id='stats-coupons'; - table.append(thead,tbody); - couponPanel.append(head,node('p','Cupons usados pelos pedidos pagos do período.','phint'),table); - const anchor=$('stats-unpaid')?.closest('section'); - if(anchor)anchor.after(couponPanel);else $('tab-stats').append(couponPanel); - } + // Coupons of the period (front 8.3): the panel lives in the Consulta group. const couponRows=data.coupons||[]; $('stats-coupons').replaceChildren(...(couponRows.length?couponRows.map(coupon=>{ const tr=node('tr'); diff --git a/web/kanban-order.js b/web/kanban-order.js index 26876d9..3b1d6cd 100644 --- a/web/kanban-order.js +++ b/web/kanban-order.js @@ -41,9 +41,7 @@ function renderPanel(order){ // The head: who, where the order is, and what it is called. const top=node('div',undefined,'dtop'); const name=node('span',who.title,'dname');name.title=[who.legal,who.mail].filter(Boolean).join(' · ')||who.title; - const stage=node('span',undefined,'stage'+(order.cancelled_at?' bad':'')); - stage.append(svgIcon(order.cancelled_at?IC.ban:GLYPH[order.state]||GLYPH.rec,'sg'+(order.state==='cor'||order.cancelled_at?' cor':'')), - order.cancelled_at?'Cancelado':stateName(order.state)); + const stage=node('span',order.cancelled_at?'Cancelado':stateName(order.state),'stage'+(order.cancelled_at?' bad':'')); const tools=node('span',undefined,'dtools'); const more=moreMenu(order);if(more)tools.append(more); tools.append(iconButton(IC.close,'Fechar',closePanel)); @@ -76,7 +74,7 @@ function renderPanel(order){ const head=node('div',undefined,'dhead');head.append(top,sub,steps); // The phone's head: back, the order and where it is, its menu. const mhead=node('div',undefined,'mhead phone'),mt=node('span',undefined,'t'); - mt.append(node('b','#'+order.number+' '+who.title),node('span',(order.cancelled_at?'Cancelado':stateName(order.state))+', '+money(s.total_cents)+(isTest(order)?' de teste':' pago'))); + mt.append(node('b','#'+order.number+' · '+who.title),node('span',(order.cancelled_at?'Cancelado':stateName(order.state))+' · '+money(s.total_cents)+(isTest(order)?' de teste':' pago'))); const phoneMore=moreMenu(order,'mic'); mhead.append(iconButton(IC.left,'Voltar',closePanel,'mic'),mt,...(phoneMore?[phoneMore]:[])); @@ -295,7 +293,7 @@ function nextBox(order){ return composeNext(title,body,main,more); } const fixBtn=()=>{if(!trans.includes('cor')||!can('cor'))return; - const b=node('button','Pedir correção','btn quiet lg');b.type='button';b.dataset.move='cor';b.onclick=()=>correctionDialog(order);more.push(b);}; + const b=node('button','Pedir correção','btn ghost lg');b.type='button';b.dataset.move='cor';b.onclick=()=>correctionDialog(order);more.push(b);}; const proofBtn=(className='btn lg')=>{if(!proofPending(order)||order.proof_card||!may('print'))return null; const b=button('Prova OK',()=>proofOk(order),className);b.dataset.proof='';b.title='A prova foi impressa e conferida';return b;}; const cannot=()=>note(!mayAct(order)?'Pedido da '+(order.machine?.name||'outra máquina')+': só quem está nela move o card.' @@ -409,8 +407,9 @@ function nextBox(order){ } function composeNext(title,body,main,more){ const box=node('section',undefined,'nextbox');box.setAttribute('aria-label','Próximo passo'); + const info=node('div',undefined,'ninfo'); const head=node('div');head.append(node('span','Próximo passo','lbl'),node('h3',title)); - box.append(head,...body); + info.append(head,...body);box.append(info); if(main.length||more.length){const acts=node('div',undefined,'nact');acts.append(...main,...more);box.append(acts);} return box; } @@ -608,21 +607,33 @@ async function photoSize(file){ } function reviewDialog(order){ const host=dialogHost(); - const video=node('video');video.className='reviewcam';video.muted=true;video.playsInline=true;video.autoplay=true; + const video=node('video');video.className='reviewcam';video.muted=true;video.playsInline=true;video.autoplay=true;video.hidden=true; video.setAttribute('aria-label','Pré-visualização da câmera'); const timer=node('span','0:00 / 0:30','reviewtime');timer.setAttribute('aria-live','polite'); - const controls=node('div',undefined,'reviewcontrols'); + const controls=node('div',undefined,'reviewcontrols');controls.hidden=true; const photoBtn=node('button','Tirar foto','btn pri');photoBtn.type='button';photoBtn.setAttribute('aria-label','Tirar foto');photoBtn.setAttribute('autofocus',''); const videoBtn=node('button','Gravar vídeo','btn');videoBtn.type='button';videoBtn.setAttribute('aria-label','Gravar vídeo'); const input=node('input');input.type='file';input.className='vh'; input.accept='image/jpeg,image/png,image/webp,video/mp4,video/webm,video/quicktime'; - const fileLabel=node('label',undefined,'btn');fileLabel.tabIndex=0; - fileLabel.append(svgIcon(IC.upload,'i m'),'Enviar arquivo',input); + const drop=node('label',undefined,'reviewdrop');drop.tabIndex=0; + const dropIco=node('span',undefined,'dropico');dropIco.append(svgIcon(IC.upload)); + drop.append(dropIco,node('b','Arraste a foto ou o vídeo'),node('span','ou'), + node('span','Escolher arquivo','btn sm'),input); + const camCard=node('div',undefined,'reviewcamcard'); + const camLabel=node('div',undefined,'reviewcamlabel'); + const camIco=node('span',undefined,'reviewcamico');camIco.append(svgIcon(IC.camera)); + camLabel.append(camIco,node('b','Usar a câmera'),node('span','foto ou vídeo')); + camCard.append(video,camLabel); + const drops=node('div',undefined,'reviewdrops');drops.append(camCard,drop); + const hint=node('p',undefined,'reviewnote'); + hint.append(svgIcon(IC.info,'i s'),node('span','A foto precisa de pelo menos '+REVIEW_PHOTO_MIN+' px no lado maior.')); + const nocam=node('p',undefined,'reviewnote');nocam.hidden=true; + nocam.append(svgIcon(IC.info,'i s'),node('span','Este computador não tem câmera. Envie um arquivo, ou faça a revisão pelo celular.')); const preview=node('div',undefined,'reviewpreview');preview.hidden=true; const status=node('p','','reviewmsg');status.setAttribute('role','status');status.setAttribute('aria-live','polite'); const save=node('button','Salvar revisão','btn pri');save.type='button';save.disabled=true; const cancel=node('button','Cancelar','btn ghost right');cancel.type='button'; - controls.append(photoBtn,videoBtn,fileLabel); + controls.append(photoBtn,videoBtn,timer); let stream=null,recorder=null,recordTimer=null,chunks=[],ready=null,objectUrl=null,closed=false,recording=false,recordStart=0; const fail=text=>{status.textContent=text;status.classList.add('bad');}; const clear=()=>{status.textContent='';status.classList.remove('bad');}; @@ -639,7 +650,7 @@ function reviewDialog(order){ function showReady(file,kind){ ready={file,kind}; endStream(); - video.hidden=true;photoBtn.hidden=true;videoBtn.hidden=true;timer.hidden=true; + drops.hidden=true;controls.hidden=true;nocam.hidden=true; if(objectUrl)URL.revokeObjectURL(objectUrl); objectUrl=URL.createObjectURL(file); preview.replaceChildren(); @@ -724,7 +735,13 @@ function reviewDialog(order){ showReady(file,'photo'); } }; - fileLabel.onkeydown=event=>{if(event.key==='Enter'||event.key===' '){event.preventDefault();input.click();}}; + drop.onkeydown=event=>{if(event.key==='Enter'||event.key===' '){event.preventDefault();input.click();}}; + drop.ondragover=event=>{event.preventDefault();drop.classList.add('over');}; + drop.ondragleave=()=>drop.classList.remove('over'); + drop.ondrop=event=>{event.preventDefault();drop.classList.remove('over'); + if(!event.dataTransfer.files.length)return; + const list=new DataTransfer();list.items.add(event.dataTransfer.files[0]);input.files=list.files; + input.dispatchEvent(new Event('change',{bubbles:true}));}; cancel.onclick=()=>m.close(); save.onclick=async()=>{ if(!ready)return; @@ -743,22 +760,22 @@ function reviewDialog(order){ } }; const m=modal('Revisão do #'+order.number,{host,width:640, - text:'Tire uma foto ou grave um vídeo de até 30 s da folha impressa, ou envie um arquivo. '+ - 'A foto precisa de pelo menos '+REVIEW_PHOTO_MIN+' px no lado maior.', - body:[video,controls,timer,preview],foot:[status,cancel,save],onclose:cleanup}); + text:'Uma foto ou um vídeo de até 30 s da folha impressa.', + body:[drops,controls,preview,hint,nocam],foot:[status,cancel,save],onclose:cleanup}); + m.box.classList.add('reviewdialog'); (async()=>{ try{ if(!navigator.mediaDevices?.getUserMedia)throw new Error('sem câmera'); stream=await navigator.mediaDevices.getUserMedia({video:{facingMode:'environment', width:{ideal:1920},height:{ideal:1080}},audio:false}); if(closed){endStream();return;} - video.srcObject=stream; + video.srcObject=stream;video.hidden=false;camLabel.hidden=true;camCard.classList.add('live'); await video.play().catch(()=>{}); + controls.hidden=false; photoBtn.focus(); }catch(_){ - endStream();video.hidden=true;photoBtn.hidden=true;videoBtn.hidden=true;timer.hidden=true; - fail('Câmera indisponível neste computador. Envie um arquivo.'); - fileLabel.focus(); + endStream();camCard.classList.add('off');nocam.hidden=false; + drop.focus(); } })(); } @@ -964,16 +981,18 @@ function itemCard(order,item,index){ const box=node('section',undefined,'item');box.setAttribute('aria-label','Item '+(index+1)); const info=node('div',undefined,'iinfo'); const count=order.snapshot.items.length; - info.append(node('span',count>1?'Item '+(index+1)+' de '+count:'Item','lbl'),node('h3',productName(item))); + if(count>1)info.append(node('span','Item '+(index+1)+' de '+count,'lbl')); + info.append(node('h3',productName(item))); const dl=node('dl',undefined,'dl'); const pair=(k,v)=>{if(v===null||v===undefined||v==='')return;const d=node('div');const dd=node('dd');dd.append(v);d.append(node('dt',k),dd);dl.append(d);}; - pair('Folha',sheetSize(spec));pair('Metros cobrados',metres(item.billed_metres)); - pair('Peças',spec?String(spec.placements.length):null); + pair('Metros cobrados',metres(item.billed_metres)); pair('Valor do metro',item.unit_cents?money(item.unit_cents)+manualExtra(item):null); const g=node('span',undefined,'gradeline');g.append(gradePill(item.grade));pair('Nota da arte',g); + pair('Contração',contractionControl(order,index)); + pair('Folha',sheetSize(spec)); + pair('Peças',spec?String(spec.placements.length):null); pair('Menor resolução',row?.status==='ready'&&row.detail?.min_dpi?row.detail.min_dpi+' DPI':null); pair('Arquivos',spec&&spec.sources.length>1?String(spec.sources.length):null); - pair('Contração',contractionControl(order,index)); info.append(dl); const notes=node('div',undefined,'inotes'); if(item.quality_status==='warning')notes.append(itemNote('O cliente aceitou a ressalva de resolução.','warn')); @@ -1010,10 +1029,17 @@ function itemCard(order,item,index){ const prumoLines=(order.prumo||[]).filter(line=>!multi||line.startsWith(prefix)||line.startsWith('Prova do')) .map(line=>line.startsWith(prefix)?line.slice(prefix.length):line); if(prumoLines.length){ - const block=node('details',undefined,'prumo');block.append(node('summary','O que o Prumo fez')); + const block=node('details',undefined,'prumo idisc');block.append(discSummary('O que o Prumo fez')); prumoLines.forEach(line=>block.append(node('p',line))); notes.append(block); } + // The art and its layout on the film, folded under the facts: an item + // without a picture gets no empty column (canvas P2). + const preview=itemPreview(item); + if(preview.children.length){ + const look=node('details',undefined,'idisc ipreview');look.append(discSummary('Prévia da arte'),preview); + notes.append(look); + } if(notes.children.length)info.append(notes); const links=node('div',undefined,'links'); const dl_=(text,uid)=>{const b=downloadButton(text,download(uid),'btn');return b;}; @@ -1022,15 +1048,17 @@ function itemCard(order,item,index){ const made=generatedFiles(row); made.forEach((f,k)=>links.append(dl_(made.length>1?'Parte '+(k+1)+' de '+made.length:/\.pdf$/i.test(f.name)?'PDF':'PNG',f.upload_id))); } - const originals=node('details',undefined,'originals');originals.append(node('summary','Originais ('+item.uploads.length+')')); + const originals=node('details',undefined,'originals');originals.append(discSummary('Originais ('+item.uploads.length+')')); item.uploads.forEach((uid,i)=>originals.append(downloadButton('Original '+(i+1),download(uid,order.id),'btn'))); - links.append(originals); + if(item.uploads.length)links.append(originals); if(row?.status==='ready')links.prepend(checkButton(order)); if(may('produce')&&!fix&&['rec','tra'].includes(order.state)&&!waitingProof(order)&&(!row||row.status==='manual'||row.status==='failed'||row.timed_out)){ const again=button('Gerar de novo',async()=>{await api('/orders/'+order.id+'/print-files',{});await load();},'btn');again.prepend(svgIcon(IC.refresh,'i m'));links.append(again);} info.append(links); - box.append(itemPreview(item),info);return box; + box.append(info);return box; } +// A disclosure's summary: the chevron turns when it opens. +function discSummary(text){const s=node('summary');s.append(svgIcon(IC.right,'i s'),node('span',text));return s;} // Arquivos: every final, current or replaced, and the way to send a new one. function filesView(order,revisions,view){ const out=[]; diff --git a/web/kanban-users.js b/web/kanban-users.js index 79c8839..88bb1b2 100644 --- a/web/kanban-users.js +++ b/web/kanban-users.js @@ -202,30 +202,38 @@ function renderUsers(){ $('machines-list').replaceChildren(...(machines.length?machines.map(machineTile) :[emptyState(IC.printer,'Nenhuma máquina cadastrada','Cadastre as máquinas para os pedidos irem para elas.')])); } -// A machine: its metres open against its limit, its orders by stage, and who is on it. +// A machine, in one compact line: name, products, its open metres and orders, +// who is on it, and the alert mark. The stage breakdown and the limit stay in +// the row's tooltip, so the numbers of the old tile are not lost. const STAGE_FILL={rec:'var(--tx3)',tra:'var(--ln3)',imp:'var(--ink)',cor:'var(--bad)',rev:'var(--tx2)'}; function machineTile(m){ - const tile=node('article',undefined,'mtile'+(m.active?'':' off')); - const head=node('div',undefined,'row'); - head.append(node('h3',m.name),node('span',m.products.map(p=>PRODUCT_LABEL[p]).join(' e ')||'Nenhum produto','lbl')); - if(!m.active)head.append(badge('Desativada','')); - head.append(button('Ficha',()=>openMachineSheet(m.id),'btn ghost right'),button('Editar',()=>machineForm(m),'btn ghost')); - const over=!!m.limit_metres&&m.open_metres>m.limit_metres; - const load=node('div',undefined,'row base'); - load.append(node('b',metres(m.open_metres),over?'bad':''),node('span','em aberto, '+(m.limit_metres?'limite de '+metres(m.limit_metres)+(over?', acima do limite':''):'sem limite'),'lbl')); - const stages=Object.keys(STAGE_FILL).filter(s=>m.states[s]); - const total=stages.reduce((t,s)=>t+m.states[s],0); - tile.append(head,load); - if(total){ - const stack=node('div',undefined,'stack'),list=node('ul'); - for(const s of stages){const seg=node('i');seg.style.width=(100*m.states[s]/total)+'%';seg.style.background=STAGE_FILL[s];stack.append(seg); - const li=node('li'),dot=node('i');dot.style.background=STAGE_FILL[s];li.append(dot,board?.states?.[s]||s,node('b',String(m.states[s])));list.append(li);} - tile.append(stack,list); - }else tile.append(node('span','Nenhum pedido em aberto','lbl')); - const people=node('div',undefined,'row people');people.append(svgIcon(IC.user,'i s'), - m.operators?.length?m.operators.map(o=>o.name+(o.since?' desde '+new Date(o.since).toLocaleTimeString('pt-BR',{hour:'2-digit',minute:'2-digit'}):'')).join(', ')+(m.operators.length>1?' estão nela':' está nela'):'Ninguém nela agora'); - tile.append(people); - return tile; + const row=node('div',undefined,'mt'+(m.active?'':' off')); + const body=node('div',undefined,'mtbody'); + const top=node('div',undefined,'mtname'); + top.append(node('b',m.name)); + for(const p of m.products||[])top.append(node('span',PRODUCT_LABEL[p],'tag')); + if(!m.active)top.append(node('span','Desativada','tag')); + if((m.alerts||[]).length){const dot=node('span',undefined,'mtwarn');dot.title='Aviso na ficha';top.append(dot);} + const stages=Object.keys(STAGE_FILL).filter(state=>m.states?.[state]); + const stageText=stages.map(state=>(board?.states?.[state]||state)+': '+m.states[state]).join(' · '); + const limit=m.limit_metres?'limite de '+metres(m.limit_metres):''; + if(limit||stageText)row.title=[limit,stageText].filter(Boolean).join(' · '); + const mine=myMachine()?.id===m.id; + const others=(m.operators||[]).filter(op=>op.name!==(ME.name||ME.email)); + const who=mine?'Ficha está nela agora':others.length?others.map(op=>op.name).join(', ')+(others.length>1?' estão nela':' está nela'):'ninguém nela agora'; + const open=Number(m.open_orders||0)>0||Number(m.open_metres||0)>0; + if(open){ + const status=node('div',undefined,'mtstatus'); + const amount=node('b',metres(m.open_metres)); + if(m.limit_metres&&m.open_metres>m.limit_metres)amount.classList.add('bad'); + status.append(amount,' em aberto · ',plural(m.open_orders,'pedido','pedidos'),' · ',who); + body.append(top,status); + }else{ + top.append(node('span','Livre · '+who,'mtfree')); + body.append(top); + } + row.append(body,button('Ficha',()=>openMachineSheet(m.id),'btn sm'),button('Editar',()=>machineForm(m),'btn ghost sm')); + return row; } function userForm(u){ const editing=!!u; @@ -302,40 +310,26 @@ function machineEntryLine(entry, catalog){ return [when(entry.created_at),label,detail,entry.created_by].filter(Boolean).join(' · '); } -async function openMachineSheet(machineId){ +async function openMachineSheet(machineId, tab='situacao'){ let data; try{data=await api('/machines/'+machineId+'/sheet');} catch(e){say(e.message,true);return;} const machine=data.machine; + const machineState=(board.machines||[]).find(row=>row.id===machine.id)||null; const launch=may('print')&&(ME?.role!=='operador'||myMachine()?.id===machine.id); - const body=[]; + const manage=may('manage'); let sheetModal=null; - const refresh=async()=>{sheetModal?.close();await load();openMachineSheet(machine.id);}; + let activeTab=tab; + const refresh=async(next=activeTab)=>{sheetModal?.close();await load();openMachineSheet(machine.id,next);}; const minimum=value=>Number(value).toLocaleString('pt-BR',{maximumFractionDigits:3}); - const counts=node('div',undefined,'mblock'); - const fact=(label,value)=>{const row=node('div',undefined,'mfact');row.append(node('span',label),node('b',value));counts.append(row);}; - const clean=data.counters.clean, film=data.counters.film; - fact('Desde a última limpeza',m1(clean.metres)+' m'+(clean.since?'':' (nenhuma limpeza lançada ainda)')); - fact('Desde a troca de filme',film.since?m1(film.metres)+' m '+(film.aligned?'(cabeça alinhada)':'(falta alinhar)'):'sem registro'); - body.push(node('h4','Contadores','sh'),counts); - - const supplies=node('div',undefined,'mblock'); - for(const [item,[label,unit]] of Object.entries(data.catalog.supplies)){ - const value=data.supplies[item]; - const row=node('div',undefined,'mfact'); - let text; - if(value){ - text='acaba em ~'+m1(value.metres_left)+' m'; - if(value.minimum!==null&&value.minimum!==undefined)text+=' · mínimo '+minimum(value.minimum)+' '+unit; - }else text='lance duas reposições para estimar'; - row.append(node('span',label),node('b',text)); - supplies.append(row); - } - body.push(node('h4','Insumos','sh'),supplies); + const situacao=node('div',undefined,'msheet-pane');situacao.setAttribute('role','tabpanel'); + const lancamentos=node('div',undefined,'msheet-pane');lancamentos.setAttribute('role','tabpanel'); + const dados=node('div',undefined,'msheet-pane');dados.setAttribute('role','tabpanel'); + // Situação: the alerts, the counters and the supplies. if(data.alerts.length){ - const box=node('div',undefined,'mblock'); + const box=node('div',undefined,'msheet-alerts'); const done=async alert=>{ if(alert.key.startsWith('supply:')){ const saved=await machineEntryForm(machine.id,{kind:'supply',item:alert.key.slice(7),from_alert:true},data); @@ -344,55 +338,69 @@ async function openMachineSheet(machineId){ await api('/machines/'+machine.id+'/entries',{kind:'event',item:alert.key,from_alert:true}); } say('Aviso resolvido.'); - await refresh(); + await refresh(activeTab); }; for(const alert of data.alerts){ - const row=node('div',undefined,'sheetalert'); - const words=node('span',undefined,'grow'); + const row=node('div',undefined,'msheet-alert'); + const ico=node('span',undefined,'msheet-alertico');ico.append(svgIcon(IC.alert,'i m')); + const words=node('div',undefined,'msheet-alertwords'); words.append(node('b',alert.text),node('span',alert.blocking?'pendente':'adiado neste ciclo','sub')); - row.append(words); + row.append(ico,words); if(launch){ const actions=node('span',undefined,'prow'); - actions.append(button('Marcar como feito',()=>done(alert),'btn')); if(alert.snoozable)actions.append(button('Adiar uma vez',async()=>{ await api('/machines/'+machine.id+'/alerts/'+encodeURIComponent(alert.key)+'/snooze',{}); say('Aviso adiado: passa um arquivo e ele volta.'); - await refresh(); + await refresh(activeTab); },'btn ghost')); + actions.append(button('Marcar como feito',()=>done(alert),'btn')); row.append(actions); } box.append(row); } - body.push(node('h4','Avisos pendentes','sh'),box); + situacao.append(box); } + const clean=data.counters.clean, film=data.counters.film; + const counters=node('div',undefined,'msheet-counters'); + const counter=(label,value,note)=>{ + const card=node('div',undefined,'msheet-ctr'); + card.append(node('span',label),node('b',value),node('small',note));counters.append(card); + }; + counter('Desde a última limpeza',m1(clean.metres)+' m', + clean.since?'Limpeza lançada em '+when(clean.since):'Nenhuma limpeza lançada ainda'); + counter('Desde a troca de filme',film.since?m1(film.metres)+' m':'—', + film.since?'Troca lançada em '+when(film.since)+(film.aligned?', cabeça alinhada':', falta alinhar'):'Sem registro'); + situacao.append(counters); + situacao.append(node('h4','Insumos','msheet-h')); + const supplies=node('div',undefined,'msheet-supplies'); + for(const [item,[label,unit]] of Object.entries(data.catalog.supplies)){ + const value=data.supplies[item]; + const typed=data.minimums[item], fallback=data.default_minimums?.[item]; + const floor=typed!==null&&typed!==undefined?typed:fallback; + const row=node('div',undefined,'msheet-supply'); + row.append(node('b',label), + node('span',value?'acaba em ~'+m1(value.metres_left)+' m':'lance duas reposições para estimar'), + node('em',floor!==null&&floor!==undefined?'mín. '+minimum(floor)+' '+unit:'')); + supplies.append(row); + } + situacao.append(supplies); - const entries=node('div',undefined,'mlist sheetentries'); + // Lançamentos: the log. The footer's Lançar opens the form. + const entries=node('div',undefined,'mlist'); if(data.entries.length)for(const entry of data.entries)entries.append(node('div',machineEntryLine(entry,data.catalog),'mli')); else entries.append(node('div','Nenhum lançamento ainda','mli muted')); - body.push(node('h4','Lançamentos','sh'),entries); + lancamentos.append(entries); - if(launch){ - const prow=node('div',undefined,'prow'); - prow.append(button('Lançar',async()=>{ - const saved=await machineEntryForm(machine.id,{},data); - if(!saved)return; - say('Lançamento registrado.'); - await refresh(); - },'btn pri')); - body.push(prow); - } - - if(may('manage')){ + // Dados da máquina: price, installation and the minimums (management). + if(manage){ const price=node('input');price.type='number';price.min='0';price.step='0.01';price.inputMode='decimal'; - price.value=data.machine.price_cents!==null&&data.machine.price_cents!==undefined?(data.machine.price_cents/100).toFixed(2):''; - const installed=node('input');installed.type='date';installed.value=data.machine.installed_on||''; + price.value=machine.price_cents!==null&&machine.price_cents!==undefined?(machine.price_cents/100).toFixed(2):''; + const installed=node('input');installed.type='date';installed.value=machine.installed_on||''; const minimums={}; const box=node('div',undefined,'mblock'); box.append(field('Preço de compra (R$)',price),field('Data de instalação',installed)); for(const [item,[label,unit]] of Object.entries(data.catalog.supplies)){ const input=node('input');input.type='number';input.min='0';input.step='0.001';input.inputMode='decimal'; - // Dropstar's fixed minimums are the defaults: a machine with none typed - // shows and uses them until Gestão changes them. const typed=data.minimums[item], fallback=data.default_minimums?.[item]; input.value=typed!==null&&typed!==undefined?Number(typed).toString() :fallback!==null&&fallback!==undefined?Number(fallback).toString():''; @@ -410,16 +418,48 @@ async function openMachineSheet(machineId){ minimums:Object.fromEntries(Object.entries(minimums).map(([item,input])=> [item,input.value.trim()===''?null:Number(input.value)]))}); say('Dados da máquina salvos.'); - await refresh(); + await refresh('dados'); }catch(e){error.textContent=e.message;error.hidden=false;} finally{save.disabled=false;} }; const foot=node('div',undefined,'prow');foot.append(error,save); box.append(foot,node('small','Preço e data servem para o retorno da máquina em Números.','sub')); - body.push(node('h4','Dados da máquina','sh'),box); + dados.append(box); } - sheetModal=modal('Ficha da '+machine.name,{host:dialogHost(),width:640,body}); + // The tabs keep the fixed head while the active section scrolls. + const tabs=node('div',undefined,'msheet-tabs');tabs.setAttribute('role','tablist'); + const panes=node('div',undefined,'msheet-panes'); + const labels=[['situacao','Situação',situacao],['lancamentos','Lançamentos',lancamentos],...(manage?[['dados','Dados da máquina',dados]]:[])]; + if(!labels.some(([key])=>key===activeTab))activeTab='situacao'; + const paintTabs=()=>{ + for(const button of tabs.children){const on=button.dataset.tab===activeTab;button.classList.toggle('on',on);button.setAttribute('aria-selected',String(on));} + for(const pane of panes.children)pane.hidden=pane.dataset.tab!==activeTab; + }; + for(const [key,label,pane] of labels){ + const b=node('button',label,'msheet-tab');b.type='button';b.dataset.tab=key;b.setAttribute('role','tab'); + b.onclick=()=>{activeTab=key;paintTabs();}; + tabs.append(b);pane.dataset.tab=key;panes.append(pane); + } + paintTabs(); + const wrap=node('div',undefined,'msheet');wrap.append(tabs,panes); + const note=node('span','Lançar registra limpeza, filme, alinhamento ou reposição.','msheet-note'); + const foot=[note,button('Fechar',()=>sheetModal?.close(),'btn ghost')]; + if(launch)foot.push(button('Lançar',async()=>{ + const saved=await machineEntryForm(machine.id,{},data); + if(!saved)return; + say('Lançamento registrado.'); + await refresh('lancamentos'); + },'btn pri')); + + const mine=myMachine()?.id===machine.id; + const others=(machineState?.operators||[]).filter(op=>op.name!==(ME.name||ME.email)); + const who=mine?'Ficha está nela agora':others.length?others.map(op=>op.name).join(', ')+(others.length>1?' estão nela':' está nela'):'Livre'; + const products=(machineState?.products||[]).map(p=>PRODUCT_LABEL[p]).join(' e ')||'Nenhum produto'; + const state=[products,machineState?.active===false?'Desativada':null,who, + machineState?.open_orders?plural(machineState.open_orders,'pedido','pedidos')+' em aberto':''].filter(Boolean).join(' · '); + sheetModal=modal('Ficha da '+machine.name,{text:state,host:dialogHost(),width:720,body:[wrap],foot}); + sheetModal.box.classList.add('machine-sheet-dlg'); } // The launch form: type, item, and only the fields that type uses. Resolves diff --git a/web/kanban.css b/web/kanban.css index d5b4b8c..9f80402 100644 --- a/web/kanban.css +++ b/web/kanban.css @@ -280,7 +280,28 @@ main{padding:0} .card-open:hover,.card-open:focus-visible{border-color:var(--acc);color:var(--acc)} .card-open-row{display:flex;flex-wrap:wrap;gap:6px} /* A review photo or video: live camera, the preview, and the order's list. */ -.reviewcam{width:100%;aspect-ratio:16/9;object-fit:contain;background:var(--bg);border:1px solid var(--ln2);border-radius:10px;display:block} +.reviewdrops{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px} +.reviewcamcard{position:relative;height:168px;border:1px solid var(--ln2);border-radius:12px;background:var(--sf2);overflow:hidden;display:flex;align-items:center;justify-content:center;text-align:center;padding:14px} +.reviewcamcard.off{opacity:.55} +.reviewcam{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#000;display:block} +.reviewcamlabel{display:flex;flex-direction:column;align-items:center;gap:6px;color:var(--tx2)} +.reviewcamlabel[hidden]{display:none} +/* A live camera takes the whole row, with the drop area under it. */ +.reviewdrops:has(.reviewcamcard.live){grid-template-columns:1fr} +.reviewcamcard.live{height:300px;padding:0} +.reviewdrops:has(.reviewcamcard.live) .reviewdrop{height:96px;flex-direction:row} +.reviewcamlabel b{font-size:14px;font-weight:600;color:var(--tx)} +.reviewcamlabel span{font-size:12.5px;color:var(--tx3)} +.reviewcamico{display:flex;align-items:center;justify-content:center;color:var(--tx3)} +.reviewdrop{height:168px;padding:14px;border:1.5px dashed var(--ln3);border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center;cursor:pointer;color:var(--tx2);transition:border-color .15s,background .15s} +.reviewdrop:hover,.reviewdrop.over{border-color:var(--acc);background:color-mix(in srgb,var(--acc) 5%,transparent)} +.reviewdrop:focus-visible{outline:2px solid var(--acc);outline-offset:2px} +.reviewdrop b{font-size:14px;font-weight:600;color:var(--tx)} +.reviewdrop>span:not(.dropico):not(.btn){font-size:12.5px;color:var(--tx3)} +.reviewdrop .dropico{width:auto;height:auto;background:none;color:var(--tx2)} +.reviewnote{display:flex;align-items:flex-start;gap:8px;margin:0;font-size:12.5px;color:var(--tx2)} +.reviewnote .i{margin-top:2px;flex:none;color:var(--tx3)} +.reviewnote.bad,.reviewnote.bad .i{color:var(--bad)} .reviewpreview{width:100%;aspect-ratio:16/9;background:var(--bg);border:1px solid var(--ln2);border-radius:10px;overflow:hidden;display:flex;align-items:center;justify-content:center} .reviewpreview img,.reviewpreview video{width:100%;height:100%;object-fit:contain;display:block} .reviewcontrols{display:flex;flex-wrap:wrap;align-items:center;gap:8px} @@ -288,6 +309,8 @@ main{padding:0} .reviewtime{font-size:12px;color:var(--tx3);font-variant-numeric:tabular-nums} .reviewmsg{flex:1;min-width:0;margin:0;font-size:13px;color:var(--tx2)} .reviewmsg.bad{color:var(--bad)} +.modal.reviewdialog .dlghead{padding-bottom:18px;border-bottom:1px solid var(--ln)} +.modal.reviewdialog .dfoot{padding-top:14px;border-top:1px solid var(--ln)} .reviewlist{display:flex;flex-direction:column;max-height:220px;overflow:auto;border-top:1px solid var(--ln)} .reviewsec{padding-top:22px;border-top:1px solid var(--ln)} .reviewrow{display:flex;align-items:center;gap:8px;padding:6px 0;border-bottom:1px solid var(--ln)} @@ -381,18 +404,17 @@ main{padding:0} then Pedido, Arquivos and Histórico. Its dialogs sit in #drawer beside it. */ .dwrap{position:fixed;inset:0;z-index:20} .dwrap>.scrim{position:absolute;inset:0;background:var(--scrim);-webkit-backdrop-filter:blur(3px) saturate(.6);backdrop-filter:blur(3px) saturate(.6);animation:fade .25s ease both} -.drawer{position:absolute;top:0;right:0;bottom:0;width:760px;max-width:100%;background:var(--sf);border-left:1px solid var(--ln2);display:flex;flex-direction:column;animation:drawerIn .45s cubic-bezier(.16,1,.3,1) both;box-shadow:-40px 0 80px -40px rgba(0,0,0,.55)} -.dhead{padding:22px 28px 20px;display:flex;flex-direction:column;gap:16px;border-bottom:1px solid var(--ln);flex-shrink:0} +.drawer{position:absolute;top:0;right:0;bottom:0;width:820px;max-width:100%;background:var(--sf);border-left:1px solid var(--ln2);display:flex;flex-direction:column;animation:drawerIn .45s cubic-bezier(.16,1,.3,1) both;box-shadow:-40px 0 80px -40px rgba(0,0,0,.55)} +.dhead{padding:22px 28px 0;display:flex;flex-direction:column;gap:14px;flex-shrink:0} .dtop{display:flex;align-items:center;gap:12px;min-width:0} .dnum{font-weight:650;font-size:26px;line-height:1;letter-spacing:-.02em;flex:none} .dname{font-size:16px;font-weight:600;color:var(--tx2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0} -.stage{display:inline-flex;align-items:center;gap:7px;height:28px;padding:0 11px 0 9px;border-radius:999px;background:var(--sf3);font-size:12.5px;font-weight:600;color:var(--tx);white-space:nowrap;flex:none} -.stage .sg{width:15px;height:15px} +.stage{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:6px;background:var(--sf3);font-size:12px;font-weight:550;color:var(--tx2);white-space:nowrap;flex:none} .stage.bad{background:color-mix(in srgb,var(--bad) 12%,transparent);color:var(--bad)} .dtools{margin-left:auto;display:flex;gap:6px;flex:none} .morewrap{position:relative} .dmenu{right:0;top:calc(100% + 6px);width:250px} -.dsub{display:flex;align-items:center;gap:8px 16px;color:var(--tx2);font-size:13px;flex-wrap:wrap} +.dsub{display:flex;align-items:center;gap:8px 18px;color:var(--tx2);font-size:13.5px;flex-wrap:wrap} .dsub b{color:var(--tx);font-weight:600} .chip{display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 4px 0 10px;border-radius:7px;background:var(--sf3);font-size:12.5px;color:var(--tx);white-space:nowrap} .code{font-family:var(--code);font-weight:500;letter-spacing:-.01em} @@ -401,11 +423,11 @@ main{padding:0} .copy:hover{color:var(--tx);background:var(--ln)} .copy svg{width:13px;height:13px} .stepper{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;margin:0;padding:0;list-style:none} -.stepper li{display:flex;flex-direction:column;gap:8px;font-size:12px;font-weight:550;color:var(--tx3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis} +.stepper li{display:flex;flex-direction:column;gap:8px;font-size:12.5px;font-weight:550;color:var(--tx3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis} .stepper li::before{content:"";height:3px;border-radius:2px;background:var(--ln2)} .stepper li.done{color:var(--tx2)}.stepper li.done::before{background:var(--tx3)} .stepper li.now{color:var(--tx)}.stepper li.now::before{background:var(--ink)} -.dbody{flex:1;overflow:auto;padding:20px 28px 32px;display:flex;flex-direction:column;gap:22px} +.dbody{flex:1;overflow:auto;padding:20px 28px 32px;display:flex;flex-direction:column;gap:20px} .dbody>*{flex-shrink:0} .callout{display:flex;align-items:center;gap:14px;padding:12px;border-radius:12px;background:var(--sf2);border:1px solid var(--ln2);color:var(--tx)} .callout .cico{width:36px;height:36px;border-radius:9px;display:flex;align-items:center;justify-content:center;flex:none;color:var(--warn);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--warn) 50%,transparent)} @@ -414,8 +436,10 @@ main{padding:0} .callout p b{font-weight:600} .callout small{display:block;color:var(--tx2);font-size:12.5px;margin-top:2px} .callout .btn{height:34px} -.nextbox{border:1px solid var(--ln2);border-radius:12px;padding:16px;display:flex;flex-direction:column;gap:14px} -.nextbox h3{margin:2px 0 0;font-size:18px;font-weight:650;letter-spacing:-.01em} +.nextbox{border:1px solid var(--ln2);border-radius:12px;padding:18px;display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;gap:16px} +.nextbox>.ninfo{flex:1 1 240px;min-width:240px;display:flex;flex-direction:column;gap:4px} +.nextbox>.nact{margin-left:auto} +.nextbox h3{margin:0;font-size:18px;font-weight:650;letter-spacing:-.01em} .nnote{margin:0;color:var(--tx2);font-size:13.5px} .nnote b{color:var(--tx);font-weight:600} .files{display:flex;flex-direction:column;gap:8px} @@ -426,36 +450,47 @@ main{padding:0} .ftext b{display:block;font-family:var(--code);font-weight:500;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis} .ftext span{display:block;font-size:12.5px;color:var(--tx2)} .nact{display:flex;align-items:center;gap:6px;flex-wrap:wrap} -.tabs{display:flex;gap:24px;border-bottom:1px solid var(--ln)} -.tabs button{height:40px;border:0;background:transparent;padding:0;color:var(--tx2);font-size:13.5px;font-weight:550;position:relative;display:flex;align-items:center;gap:7px} +.nextbox>.nact>.btn.pri{order:1} +.tabs{display:flex;gap:22px;border-bottom:1px solid var(--ln)} +.tabs button{height:42px;border:0;background:transparent;padding:0;color:var(--tx2);font-size:13.5px;font-weight:550;position:relative;display:flex;align-items:center;gap:7px} .tabs button:hover{color:var(--tx)} .tabs button .n{font-size:12px;color:var(--tx3)} .tabs button.on{color:var(--tx)} .tabs button.on::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;background:var(--ink)} -.tview{display:flex;flex-direction:column;gap:22px} +.tview{display:flex;flex-direction:column;gap:20px} .tview>*{flex-shrink:0} -.item{display:grid;grid-template-columns:176px minmax(0,1fr);gap:22px;align-items:start} -.item+.item{padding-top:22px;border-top:1px solid var(--ln)} -.item .preview{display:flex;flex-direction:column;gap:8px} -.item .preview>svg,.item .preview .view{display:block;width:100%;border-radius:8px;overflow:hidden;box-shadow:inset 0 0 0 1px var(--ln)} -.item .preview .view{min-height:176px;max-height:320px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:6px;background:repeating-conic-gradient(var(--chka) 0 25%,var(--chkb) 0 50%) 0 0/12px 12px} -.item .preview .view img{width:100%;min-height:0;flex:1;object-fit:contain} -.item .preview .view.layout{background:var(--sf2)} -.item .preview .view svg{width:auto;max-width:100%;max-height:300px} -.item .preview>svg{height:auto;max-height:320px} +.item{display:block} +.item+.item{padding-top:20px;border-top:1px solid var(--ln)} .ptabs{display:flex;padding:3px;gap:2px;border-radius:9px;background:var(--sf3)} .ptabs button{flex:1;height:26px;border:0;border-radius:6px;background:transparent;color:var(--tx2);font-size:12px;font-weight:550} .ptabs button[aria-pressed=true]{background:var(--sf);color:var(--tx);box-shadow:0 0 0 1px var(--ln)} .iinfo{min-width:0} -.iinfo h3{margin:6px 0 18px;font-size:19px;font-weight:650;letter-spacing:-.01em} +.iinfo h3{margin:0 0 16px;font-size:17px;font-weight:650;letter-spacing:-.01em} +.iinfo>.lbl{display:block;margin-bottom:6px} .dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 18px;margin:0} +.item .dl{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 20px} .dl div{display:flex;flex-direction:column;gap:3px;min-width:0} .dl dt{font-size:12.5px;color:var(--tx3)} .dl dd{margin:0;font-size:14px;font-weight:550;overflow-wrap:anywhere} +.item .dl dd{font-size:14.5px;font-weight:600} +.item .dl .contr select{width:100%;min-width:0} .inotes{display:flex;flex-direction:column;gap:7px;margin-top:18px} -.prumo{border:1px solid var(--ln2);border-radius:9px;padding:7px 10px;background:var(--sf3);font-size:12px;color:var(--mut)} -.prumo summary{cursor:pointer;color:var(--tx);font-weight:600} -.prumo p{margin:5px 0 0;line-height:1.35} +/* The item's disclosures (Prumo, preview, originals): a row with a turning chevron (canvas P2). */ +.idisc,.originals{border-radius:10px;background:var(--sf2);border:1px solid var(--ln)} +.idisc summary,.originals summary{display:flex;align-items:center;gap:10px;min-height:40px;padding:0 14px;font-size:13.5px;font-weight:600;color:var(--tx);cursor:pointer;list-style:none} +.idisc summary::-webkit-details-marker,.originals summary::-webkit-details-marker{display:none} +.idisc summary .i,.originals summary .i{color:var(--tx2);transition:transform .2s} +.idisc[open] summary .i,.originals[open] summary .i{transform:rotate(90deg)} +.prumo{font-size:13px;color:var(--tx2)} +.prumo p{margin:0;padding:0 14px 8px 38px;line-height:1.4} +.prumo p:last-child{padding-bottom:12px} +.ipreview .preview{display:flex;flex-direction:column;gap:8px;padding:0 14px 14px} +.ipreview .preview>svg,.ipreview .preview .view{display:block;width:100%;border-radius:8px;overflow:hidden;box-shadow:inset 0 0 0 1px var(--ln)} +.ipreview .preview .view{min-height:176px;max-height:320px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:6px;background:repeating-conic-gradient(var(--chka) 0 25%,var(--chkb) 0 50%) 0 0/12px 12px} +.ipreview .preview .view img{width:100%;min-height:0;flex:1;object-fit:contain} +.ipreview .preview .view.layout{background:var(--sf2)} +.ipreview .preview .view svg{width:auto;max-width:100%;max-height:300px} +.ipreview .preview>svg{height:auto;max-height:320px} .inote{display:flex;align-items:flex-start;gap:8px;font-size:13px;color:var(--tx2)} .inote .i{margin-top:2px;color:var(--tx3)} .inote.ok .i{color:var(--mine)} @@ -463,9 +498,9 @@ main{padding:0} .inote.bad,.inote.bad .i{color:var(--bad)} .inotes .callout{margin:2px 0} .links{display:flex;gap:8px;margin-top:18px;flex-wrap:wrap} -.originals{position:relative;border:1px solid var(--ln);border-radius:8px;padding:8px 12px} -.originals summary{cursor:pointer;font-weight:600} -.originals .btn{margin:8px 8px 0 0} +.originals{position:relative} +.links .originals summary{min-height:34px} +.originals .btn{margin:0 0 12px 14px} .facts3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--ln);border-radius:12px;overflow:hidden} .fact{padding:14px 16px;display:flex;flex-direction:column;gap:3px;min-width:0;border-right:1px solid var(--ln)} .fact:last-child{border-right:0} @@ -893,6 +928,36 @@ select.inp{appearance:none;-webkit-appearance:none;padding-right:32px;background .plainlist{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px;font-size:13.5px;color:var(--tx2)} .linkbtn{background:none;border:0;padding:0 4px 0 0;color:var(--tx);font:inherit;font-weight:600;text-decoration:underline;text-underline-offset:3px;cursor:pointer} .stagecell{display:flex;align-items:center;gap:10px} +/* Números (canvas N1): one scrolling page, four headline cards and groups. */ +#tab-stats .stats-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap} +#tab-stats .stats-bar .lbl{margin-left:auto} +#tab-stats .stats-kpis{display:block;padding:0} +#tab-stats .stats-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))} +#tab-stats .kpi{padding:16px 18px;display:flex;flex-direction:column;gap:4px;border-right:1px solid var(--ln);min-width:0} +#tab-stats .kpi:last-child{border-right:0} +#tab-stats .kpi>span{font-size:12.5px;color:var(--tx3)} +#tab-stats .kpi b{font-size:26px;font-weight:650;letter-spacing:-.01em;white-space:nowrap} +#tab-stats .kpi b small{font-size:14px;color:var(--tx2);margin-left:5px;font-weight:500} +#tab-stats .kpi small{font-size:12.5px;color:var(--tx2)} +#tab-stats .stats-extra{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-top:1px solid var(--ln)} +#tab-stats .kpi-mini{padding:10px 18px;display:flex;align-items:baseline;gap:8px;border-right:1px solid var(--ln);min-width:0} +#tab-stats .kpi-mini:last-child{border-right:0} +#tab-stats .kpi-mini span{font-size:12px;color:var(--tx3)} +#tab-stats .kpi-mini b{font-size:15px;font-weight:650} +#tab-stats .kpi-mini small{font-size:12px;color:var(--tx3);margin-left:auto} +#tab-stats .grouph{margin:4px 0 -8px;font-size:12px;font-weight:650;letter-spacing:.06em;text-transform:uppercase;color:var(--tx3)} +#tab-stats .stats-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start} +#tab-stats .stats-consulta{display:flex;flex-direction:column;gap:10px} +#tab-stats .stats-det{display:flex;align-items:center;gap:10px;height:52px;padding:0 18px;border:1px solid var(--ln);border-radius:12px;background:var(--sf);font-weight:650;font-size:15px;cursor:pointer;list-style:none} +#tab-stats .stats-det::-webkit-details-marker{display:none} +#tab-stats .stats-det .i{color:var(--tx3);transition:transform .2s;flex:none} +#tab-stats .stats-details[open] .stats-det .i{transform:rotate(90deg)} +#tab-stats .stats-det span{font-weight:500;font-size:13px;color:var(--tx3)} +#tab-stats .stats-details[open] .stats-det{margin-bottom:10px} +#tab-stats .stats-details>.panel+.panel{margin-top:10px} +#tab-stats .stats-details #stats-machine-panel>.phead h2, +#tab-stats .stats-details .stats-speed-panel>.phead h2{display:none} +@media (max-width:1100px){#tab-stats .stats-grid{grid-template-columns:1fr}} /* Usuários */ .who{display:flex;align-items:center;gap:12px;min-width:0} .ava,.bigava{position:relative;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:650;color:var(--tx);background:var(--sf3);flex:none} @@ -959,22 +1024,52 @@ select.inp{appearance:none;-webkit-appearance:none;padding-right:32px;background .pill.mine{background:color-mix(in srgb,var(--mine) 10%,transparent);color:var(--mine)} .pill.info,.pill.accent,.pill.muted{color:var(--tx2)} -/* Máquinas: one tile each, its metres open, its orders by stage, who is on it. */ -.mtiles{display:grid;grid-template-columns:1fr;gap:1px;background:var(--ln)} -.mtile{padding:18px;display:flex;flex-direction:column;gap:12px;background:var(--sf)} -.mtile.off>*:not(.row:first-child){opacity:.6} -.mtile .row{display:flex;align-items:center;gap:10px} -.mtile .row.base{align-items:baseline} -.mtile .row.base b{font-size:22px;font-weight:600;letter-spacing:-.02em} -.mtile .row.base b.bad{color:var(--bad)} -.mtile h3{margin:0;font-size:16px;font-weight:650} -.mtile .people{font-size:13px;color:var(--tx2)} -.stack{display:flex;height:8px;border-radius:4px;overflow:hidden;background:var(--sf3);gap:2px} -.stack i{display:block;height:100%} -.mtile ul{margin:0;padding:0;list-style:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 18px;font-size:13px;color:var(--tx2)} -.mtile ul li{display:flex;align-items:center;gap:8px} -.mtile ul li i{width:8px;height:8px;border-radius:2px;flex:none} -.mtile ul b{margin-left:auto;font-weight:600;color:var(--tx)} +/* Máquinas: one compact line each (canvas U2); the stage breakdown of the old + tile and the limit stay in the row's tooltip. */ +.mtiles{display:flex;flex-direction:column;background:var(--sf)} +.mtiles .mt{display:flex;align-items:center;gap:10px;padding:14px 18px;border-top:1px solid var(--ln);background:var(--sf)} +.mtiles .mt:first-child{border-top:0} +.mtiles .mtbody{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px} +.mtname{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap} +.mtname b{font-size:14.5px;font-weight:650} +.mtstatus{font-size:13px;color:var(--tx2)} +.mtstatus b{font-size:13px;color:var(--tx);font-weight:650} +.mtstatus b.bad{color:var(--bad)} +.mtfree{font-size:13px;color:var(--tx3)} +.mtwarn{width:8px;height:8px;border-radius:50%;background:var(--warn);flex:none} +.mt.off .mtname b{color:var(--tx3)} +.btn.sm{height:32px;padding:0 12px;font-size:13px} +/* The machine sheet (canvas U2): fixed head, tabs, one section scrolling. */ +.machine-sheet-dlg{padding:0;gap:0;overflow:hidden;width:720px} +.machine-sheet-dlg .dlghead{border-bottom:0;padding:22px 24px 8px} +.machine-sheet-dlg .msheet{display:flex;flex-direction:column;min-height:0;flex:1} +.machine-sheet-dlg .msheet-tabs{display:flex;gap:22px;padding:0 24px;border-bottom:1px solid var(--ln);flex:none} +.machine-sheet-dlg .msheet-tab{height:42px;padding:0;border:0;background:transparent;color:var(--tx2);font-size:14px;font-weight:600} +.machine-sheet-dlg .msheet-tab.on{color:var(--tx);box-shadow:inset 0 -2px 0 var(--tx)} +.machine-sheet-dlg .msheet-panes{flex:1;min-height:0;overflow:auto;padding:20px 24px 24px} +.machine-sheet-dlg .msheet-pane{display:flex;flex-direction:column;gap:18px} +.machine-sheet-dlg .msheet-pane[hidden]{display:none} +.machine-sheet-dlg .msheet-counters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px} +.machine-sheet-dlg .msheet-ctr{padding:14px 16px;border-radius:12px;border:1px solid var(--ln2);display:flex;flex-direction:column;gap:4px} +.machine-sheet-dlg .msheet-ctr span{font-size:12.5px;color:var(--tx3)} +.machine-sheet-dlg .msheet-ctr b{font-size:24px;font-weight:650} +.machine-sheet-dlg .msheet-ctr small{font-size:12.5px;color:var(--tx2)} +.machine-sheet-dlg .msheet-h{margin:4px 0 -4px;font-size:13px;font-weight:650;color:var(--tx2)} +.machine-sheet-dlg .msheet-supplies{display:flex;flex-direction:column} +.machine-sheet-dlg .msheet-supply{display:flex;align-items:center;gap:10px;padding:11px 0;border-top:1px solid var(--ln);font-size:13.5px} +.machine-sheet-dlg .msheet-supply:last-child{border-bottom:1px solid var(--ln)} +.machine-sheet-dlg .msheet-supply b{flex:1;font-weight:600} +.machine-sheet-dlg .msheet-supply span{color:var(--tx3);font-size:13px} +.machine-sheet-dlg .msheet-supply em{font-style:normal;color:var(--tx2);font-size:13px;width:110px;text-align:right} +.machine-sheet-dlg .msheet-alerts{display:flex;flex-direction:column;gap:8px} +.machine-sheet-dlg .msheet-alert{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:10px;background:var(--sf2)} +.machine-sheet-dlg .msheet-alertico{display:flex;color:var(--warn);flex:none} +.machine-sheet-dlg .msheet-alertwords{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px} +.machine-sheet-dlg .msheet-alertwords b{font-size:14px;font-weight:600} +.machine-sheet-dlg .msheet-alertwords span{font-size:12.5px;color:var(--tx2)} +.machine-sheet-dlg .msheet-note{flex:1;font-size:12.5px;color:var(--tx3)} +.machine-sheet-dlg .dfoot{align-items:center;padding:14px 24px} +.machine-sheet-dlg .mblock{margin-top:2px} .mtiles .emptystate{background:var(--sf)} /* A payment's details: who, what for, what Mercado Pago said. */ @@ -989,13 +1084,6 @@ select.inp{appearance:none;-webkit-appearance:none;padding-right:32px;background .modal .mli{display:flex;align-items:center;gap:12px;padding:10px 14px;border-bottom:1px solid var(--ln)} .modal .mli:last-child{border-bottom:0} .modal .mli .grow{flex:1;min-width:0} -/* The machine sheet: entries scroll inside a fixed height, alerts are rows. */ -.sheetentries{height:240px;overflow:auto} -.sheetalert{display:flex;align-items:flex-start;gap:10px;padding:10px 0;border-bottom:1px solid var(--ln);font-size:13.5px} -.sheetalert:last-child{border-bottom:0} -.sheetalert .grow{flex:1;min-width:0} -.sheetalert .grow b{display:block;font-weight:600;color:var(--tx)} -.sheetalert .grow .sub{font-size:12.5px;color:var(--tx3)} #payments .table td .who{gap:10px} /* Lists never change the page's size: a panel keeps its height and its @@ -1011,7 +1099,6 @@ select.inp{appearance:none;-webkit-appearance:none;padding-right:32px;background .fillbox{position:relative;flex:1 1 auto;min-height:460px} .fillbox.short{min-height:186px} .fillbox>.mtiles,.fillbox>.scrollin{position:absolute;inset:0;overflow:auto;margin:0} -.fillbox>.mtiles{border-top:1px solid var(--ln);align-content:start} .panel:has(> .fillbox){display:flex;flex-direction:column} /* Máquinas, mês a mês: a fixed panel whose table scrolls both ways, the month between its arrows and the first column pinned while it scrolls sideways. */ @@ -1043,8 +1130,8 @@ select.inp{appearance:none;-webkit-appearance:none;padding-right:32px;background .shell{padding-bottom:72px} /* the bar at the bottom */ .rail{position:fixed;left:0;right:0;bottom:0;top:auto;z-index:15;width:auto;height:72px;flex-direction:row;align-items:stretch;gap:0;padding:4px 4px 10px;border-right:0;border-top:1px solid var(--railln);background:var(--top)} - .rail .mark,.rail .grow,.railmachine,#theme-rail,.account,.nav[data-tab=integrations],.nav[data-tab=users]{display:none!important} - .nav{flex:1 1 0;width:auto;height:auto;min-width:0;gap:5px;font-size:11px;font-weight:600;border-radius:12px;color:var(--tx3)} + .rail .mark,.rail .grow,.railmachine,#theme-rail,.account,.nav[data-tab=montar],.nav[data-tab=site],.nav[data-tab=integrations],.nav[data-tab=users]{display:none!important} + .nav{flex:1 1 0;width:auto;height:auto;min-width:0;padding:0 1px;gap:5px;font-size:11px;font-weight:600;letter-spacing:-.01em;border-radius:12px;color:var(--tx3)} .nav .i{width:22px;height:22px} .nav:hover{background:transparent} .nav[aria-selected=true],.nav.on{background:transparent;color:var(--tx)} @@ -1075,7 +1162,8 @@ select.inp{appearance:none;-webkit-appearance:none;padding-right:32px;background #tab-board .tools{display:none} .mtabs{display:flex;gap:6px;overflow-x:auto;padding:10px 12px;border-bottom:1px solid var(--ln);background:var(--top);scrollbar-width:none;position:sticky;top:58px;z-index:4;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 40px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 40px),transparent)} .mtab,#quote-filters button,#stats-period button,#stats-range .btn,.pagetools .seg button{flex:none;height:36px;padding:0 13px 0 10px;border-radius:999px;border:1px solid var(--ln2);background:transparent;color:var(--tx2);font-size:13px;font-weight:600;display:flex;align-items:center;gap:7px;white-space:nowrap;box-shadow:none} - .mtab .sg{width:16px;height:16px} + .mtab .sg{display:none} + .mtab{padding:0 14px} .mtab .n,#quote-filters .n,.pagetools .seg .n{font-size:12px;font-weight:600;color:var(--tx3)} .mtab.on,#quote-filters button.on,#stats-period button.on,.pagetools .seg button.on{background:var(--ink);border-color:var(--ink);color:var(--onink)} .mtab.on .sg,.mtab.on .n,#quote-filters .on .n,.pagetools .seg .on .n{color:var(--onink)} @@ -1117,6 +1205,10 @@ select.inp{appearance:none;-webkit-appearance:none;padding-right:32px;background .mrow .mtext{flex:1} .mrow .lbl,.mrow .pill{margin-left:auto} .mrow.bad,.mrow.bad .i{color:var(--bad)} + .mrow.on{background:var(--sf2)} + .msheet .sgroup{display:block;padding:16px 12px 4px;font-size:11.5px;font-weight:650;letter-spacing:.06em;text-transform:uppercase;color:var(--tx3)} + .msheet .sgroup+.mrow{margin-top:2px} + .msheet .sbody .mrow+.sgroup{margin-top:6px;border-top:1px solid var(--ln)} /* the order's menu, as a sheet */ .menu.dmenu{position:fixed;left:0;right:0;top:auto;bottom:0;width:auto;z-index:31;padding:16px 6px 10px;border-radius:18px 18px 0 0;border:0;box-shadow:0 0 0 100vmax var(--scrim);animation:sheetUp .4s cubic-bezier(.16,1,.3,1) both} .menu.dmenu .menuitem{min-height:56px;height:auto;gap:14px;font-size:15px;padding:0 12px} @@ -1132,32 +1224,36 @@ select.inp{appearance:none;-webkit-appearance:none;padding-right:32px;background .stepper{display:flex;gap:4px} .stepper li{flex:1;font-size:0;gap:0} .stepper li::before{height:4px} - .dbody{padding:12px 12px 170px;gap:10px} + .dbody{padding:12px 12px 220px;gap:10px} .callout{flex-wrap:wrap;padding:12px;border-radius:12px;background:var(--sf)} .callout .btn{width:100%;height:42px} - .nextbox{gap:12px;padding:16px;border:1px solid var(--ln);background:var(--sf)} - .nextbox h3{font-size:17px;margin-top:-6px} + .nextbox{display:flex;flex-direction:column;align-items:stretch;gap:12px;padding:16px;border:1px solid var(--ln);background:var(--sf)} + .nextbox>.ninfo{gap:8px;flex:initial;min-width:0} + .nextbox h3{font-size:17px;margin:0} + /* fields full width on the phone (canvas Ph3) */ + .contrrow{display:flex;flex-direction:column;align-items:stretch;gap:6px} + .contr{align-items:stretch;width:100%} + .contr select{width:100%;min-width:0} + .item .dl div:has(.contr){flex-direction:column;align-items:stretch;gap:6px} + .item .dl div:has(.contr) dd{text-align:left} .nnote{font-size:14px} .nextbox .nact{position:fixed;left:0;right:0;bottom:0;z-index:5;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px 16px 18px;border-top:1px solid var(--ln);background:var(--top)} .nextbox .nact>*{height:50px;font-size:15px;width:100%} .nextbox .nact>:first-child{grid-column:1/-1} + .nextbox .nact>.btn.pri{order:-1} .dbody .tabs{display:none} .dbody .tview{display:flex} .dbody .tview+.tview{display:none!important} .mbtns{display:flex;gap:8px} .mbtns .btn{flex:1;height:44px} - .item{grid-template-columns:112px minmax(0,1fr);gap:4px 14px;align-items:start} - .item .iinfo{display:contents} - .item .preview{grid-column:1;grid-row:1/4} - .item .preview .view{min-height:0;max-height:200px} + .item{display:block} .item .iinfo>.lbl{display:none} - .item .iinfo>h3{grid-column:2;margin:0;font-size:15px} - .item .dl{grid-column:2;display:flex;flex-direction:column;gap:0} + .item .iinfo>h3{margin:0 0 10px;font-size:15px} + .item .dl{display:flex;flex-direction:column;gap:0} .dl div{flex-direction:row;justify-content:space-between;gap:16px;padding:10px 0;border-bottom:1px solid var(--ln)} .dl div:last-child{border-bottom:0} .dl dt{font-size:14px;color:var(--tx2);flex:none} .dl dd{font-size:14px;text-align:right} - .item .inotes,.item .links{grid-column:1/-1} .item .links .btn{flex:1} .mblock{display:flex;flex-direction:column;gap:12px;padding:16px;border:1px solid var(--ln);border-radius:12px;background:var(--sf)} .mfacts{gap:0;padding-top:4px;padding-bottom:4px} @@ -1166,6 +1262,19 @@ select.inp{appearance:none;-webkit-appearance:none;padding-right:32px;background .mfact span{color:var(--tx2);flex:none} .mfact b{font-weight:550;text-align:right;min-width:0;overflow-wrap:anywhere} .mfacts select{margin-top:10px;height:44px;padding:0 12px;border-radius:10px;border:1px solid var(--ln2);background:var(--bg);color:var(--tx)} + .machine-sheet-dlg{padding:0} + .machine-sheet-dlg .dlghead{padding:18px 16px 6px} + .machine-sheet-dlg .msheet-tabs{padding:0 16px;gap:16px;overflow-x:auto} + .machine-sheet-dlg .msheet-tab{height:44px;flex:none} + .machine-sheet-dlg .msheet-panes{padding:16px 16px 20px} + .machine-sheet-dlg .msheet-counters{grid-template-columns:1fr} + .machine-sheet-dlg .msheet-alert{flex-wrap:wrap} + .machine-sheet-dlg .msheet-alert .prow{flex-basis:100%;justify-content:flex-end} + .machine-sheet-dlg .msheet-supply{flex-wrap:wrap} + .machine-sheet-dlg .msheet-supply em{width:auto} + .machine-sheet-dlg .dfoot{flex-wrap:wrap;padding:12px 16px 18px} + .machine-sheet-dlg .msheet-note{flex-basis:100%} + .machine-sheet-dlg .dfoot .btn{flex:1} .rework{border-radius:12px;background:var(--sf)} /* dialogs: sheets from the bottom, over a quote opened as a page */ .scrim.hi{z-index:27} @@ -1175,6 +1284,9 @@ select.inp{appearance:none;-webkit-appearance:none;padding-right:32px;background .dfoot{flex-wrap:wrap} .dfoot .btn{flex:1;height:48px} .dfoot .lbl{max-width:none;flex-basis:100%} + .reviewdrops{grid-template-columns:1fr} + .reviewcamcard,.reviewdrop{height:148px} + .reviewcontrols .btn{flex:1;height:48px} .mchoices{grid-template-columns:1fr} /* the pages */ .page:not([hidden]){padding:12px 12px 24px;gap:10px} @@ -1230,6 +1342,21 @@ select.inp{appearance:none;-webkit-appearance:none;padding-right:32px;background .presets{flex-direction:row;flex-wrap:wrap;border-right:0;border-bottom:1px solid var(--ln)} #stats-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))} #stats-kpis .hero,#stats-kpis .minis{display:contents} + #tab-stats .stats-bar{gap:8px} + #tab-stats .stats-bar .lbl{width:100%;margin:0} + #tab-stats .stats-cards{grid-template-columns:repeat(2,minmax(0,1fr))} + #tab-stats .kpi{padding:14px;border-right:1px solid var(--ln);border-bottom:1px solid var(--ln)} + #tab-stats .kpi:nth-child(2n){border-right:0} + #tab-stats .stats-extra{grid-template-columns:1fr} + #tab-stats .kpi-mini{border-right:0;border-bottom:1px solid var(--ln)} + #tab-stats .kpi-mini:last-child{border-bottom:0} + #tab-stats .stats-grid{grid-template-columns:1fr;gap:10px} + #tab-stats .stats-grid>section:has(#stats-machines){display:none} + #tab-stats .grouph{margin:8px 0 0;font-size:11.5px;letter-spacing:.05em} + #tab-stats .stats-details .stats-det{height:44px;padding:0 14px;font-size:14px} + #tab-stats .stats-det span{display:none} + #tab-stats .stats-details[open] .stats-det{margin-bottom:8px} + #tab-stats .stats-details>.panel+.panel{margin-top:8px} .hk,.mk{padding:14px;gap:4px;border:0;border-right:1px solid var(--ln);border-bottom:1px solid var(--ln)} .hk:first-child{grid-column:1/-1;border-right:0} .hk>span,.mk>span{font-size:12.5px;color:var(--tx2)} @@ -1263,8 +1390,17 @@ select.inp{appearance:none;-webkit-appearance:none;padding-right:32px;background #stats-stages td,#stats-rework td{padding:0;border:0} #stats-stages td:nth-child(1) .sub{display:none} #stats-stages td:nth-child(1){font-size:14.5px;font-weight:600} - #stats-stages td:nth-child(2){grid-column:2;grid-row:1/3;align-self:center;font-size:13.5px} - #stats-stages td:nth-child(3){grid-column:1;grid-row:2;font-size:12.5px;padding-left:28px} + /* a stage: name and average on top, then the limit, the overruns and now, each named */ + #stats-stages td:nth-child(2){grid-column:2;grid-row:1;align-self:center;font-size:14px} + #stats-stages td:nth-child(n+3){grid-column:1/-1;font-size:12.5px;color:var(--tx2);padding-left:28px;text-align:left} + #stats-stages td:nth-child(3)::before{content:"Aceitável: "} + #stats-stages td:nth-child(4)::before{content:"Estouros: "} + #stats-stages td:nth-child(5)::before{content:"Agora: "} + #stats-stages td:nth-child(n+3)::before{color:var(--tx3)} + #tab-stats .table td.r{white-space:nowrap} + #stats-origins td{padding:10px 6px;font-size:12.5px} + #stats-origins td:first-child{padding-left:12px} + #stats-origins td:last-child{padding-right:12px;white-space:normal} #stats-rework td:nth-child(1){font-size:14px} #stats-rework td:nth-child(1) .sub{display:none} #stats-rework td:nth-child(2){font-weight:600;color:var(--tx)} diff --git a/web/kanban.html b/web/kanban.html index ed75e2a..10e91f5 100644 --- a/web/kanban.html +++ b/web/kanban.html @@ -223,40 +223,54 @@