Merge new layout phase F step 2 (Ficha, Números)
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -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
|
||||
|
||||
128
web/kanban.css
128
web/kanban.css
@@ -909,6 +909,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}
|
||||
@@ -975,22 +1005,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. */
|
||||
@@ -1005,13 +1065,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
|
||||
@@ -1027,7 +1080,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. */
|
||||
@@ -1180,6 +1232,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}
|
||||
@@ -1247,6 +1312,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{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
||||
#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)}
|
||||
|
||||
@@ -223,40 +223,54 @@
|
||||
<section id="payments"></section>
|
||||
</section>
|
||||
<section id="tab-stats" class="page" hidden>
|
||||
<div class="pagetools">
|
||||
<div class="stats-bar">
|
||||
<div class="seg" id="stats-period" role="group" aria-label="Período"></div>
|
||||
<div class="calwrap" id="stats-range"></div>
|
||||
<span class="lbl right" id="stats-note"></span>
|
||||
</div>
|
||||
<div class="panel" id="stats-kpis"></div>
|
||||
<section class="panel"><div class="phead"><h2>Metros por dia</h2><span class="legend right" id="stats-legend"></span></div><div id="stats-chart"></div></section>
|
||||
<div class="g12">
|
||||
<section class="panel clip s4"><div class="phead"><h2>Por máquina</h2><span class="hint tip-r" tabindex="0" data-tip="Pedidos que chegaram a Finalizado no período, na máquina em que estavam. Impresso: o filme da folha, não o metro cobrado. Por hora: sobre o tempo em Imprimindo; pedidos imprimindo juntos na mesma máquina contam esse tempo uma vez."><svg class="i s" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg></span></div>
|
||||
<div class="fillbox short"><div class="scrollin"><table class="table"><thead><tr><th scope="col">Máquina</th><th scope="col" class="r">Impresso</th><th scope="col" class="r">Por hora</th><th scope="col">Agora</th></tr></thead><tbody id="stats-machines"></tbody></table></div></div></section>
|
||||
<section class="panel clip s4"><div class="phead"><h2>Por origem</h2><span class="hint" tabindex="0" data-tip="Por onde o pedido entrou: o Site, os lotes do Dropflow ou a equipe, em Atendimento. Até Finalizado: do pagamento ao Finalizado, mediana, sem o tempo em Aguardando contato."><svg class="i s" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg></span></div>
|
||||
<table class="table"><thead><tr><th scope="col">Origem</th><th scope="col" class="r">Pedidos</th><th scope="col" class="r">Metros</th><th scope="col" class="r">Recebido</th><th scope="col" class="r">Até Finalizado</th></tr></thead><tbody id="stats-origins"></tbody></table></section>
|
||||
<section class="panel s4"><div class="phead"><h2>Artes tratadas, por quem aprovou</h2><span class="hint tip-l" tabindex="0" data-tip="Pedidos do período em que o arquivo final aprovado não é a arte do cliente: alguém da equipe preparou."><svg class="i s" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg></span></div>
|
||||
<div class="fillbox short"><div class="scrollin bylist" id="stats-treated"></div></div></section>
|
||||
</div>
|
||||
<section class="panel clip"><div class="phead"><h2>Preço de tabela (não é caixa)</h2><span class="hint tip-l" tabindex="0" data-tip="Pedidos Internos e faturados do período: o preço de tabela fica registrado no pedido, mas esse valor não é dinheiro recebido."><svg class="i s" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg></span></div>
|
||||
<table class="table"><thead><tr><th scope="col">Forma</th><th scope="col" class="r">Pedidos</th><th scope="col" class="r">Metros</th><th scope="col" class="r">Valor</th></tr></thead><tbody id="stats-price-table"></tbody></table></section>
|
||||
<div class="g12">
|
||||
<section class="panel clip s6"><div class="phead"><h2>Retrabalho</h2><span class="hint" tabindex="0" data-tip="Metros refeitos sobre o filme impresso no período, só os autorizados, pela data em que foram abertos. Arte ruim aprovada pelo cliente fica fora da meta."><svg class="i s" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg></span><span class="pill warn right" id="stats-rework-pending-pill" hidden></span></div>
|
||||
<div class="panel stats-kpis" id="stats-kpis"></div>
|
||||
<section class="panel stats-chart-panel"><div class="phead"><h2>Metros por dia</h2><span class="legend right" id="stats-legend"></span></div><div id="stats-chart"></div></section>
|
||||
<h2 class="grouph">Produção</h2>
|
||||
<div class="stats-grid">
|
||||
<section class="panel clip"><div class="phead"><h2>Por máquina</h2><span class="hint tip-r" tabindex="0" data-tip="Pedidos que chegaram a Finalizado no período, na máquina em que estavam. Impresso: o filme da folha, não o metro cobrado. Por hora: sobre o tempo em Imprimindo; pedidos imprimindo juntos na mesma máquina contam esse tempo uma vez."><svg class="i s" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg></span></div>
|
||||
<table class="table"><thead><tr><th scope="col">Máquina</th><th scope="col" class="r">Impresso</th><th scope="col" class="r">Por hora</th><th scope="col">Agora</th></tr></thead><tbody id="stats-machines"></tbody></table></section>
|
||||
<section class="panel clip"><div class="phead"><h2>Tempo em cada etapa</h2><span class="hint tip-l" tabindex="0" data-tip="Tempo mediano por pedido: quem voltou para a etapa soma cada passagem. O tempo em Aguardando contato não conta."><svg class="i s" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg></span><button class="btn right" id="edit-stage-limits" type="button" hidden>Editar tempos</button></div>
|
||||
<table class="table"><thead><tr><th scope="col">Etapa</th><th scope="col" class="r">Média</th><th scope="col" class="r">Aceitável</th><th scope="col" class="r">Estouros</th><th scope="col">Agora</th></tr></thead><tbody id="stats-stages"></tbody></table></section>
|
||||
<section class="panel clip"><div class="phead"><h2>Retrabalho</h2><span class="hint" tabindex="0" data-tip="Metros refeitos sobre o filme impresso no período, só os autorizados, pela data em que foram abertos. Arte ruim aprovada pelo cliente fica fora da meta."><svg class="i s" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg></span><span class="pill warn right" id="stats-rework-pending-pill" hidden></span></div>
|
||||
<table class="table"><thead><tr><th scope="col">Causa</th><th scope="col" class="r">Refeito</th><th scope="col" class="w50" id="stats-rework-film">Do impresso, contra a meta</th></tr></thead><tbody id="stats-rework"></tbody></table>
|
||||
<details class="psub"><summary>Por quem imprimiu e aguardando autorização</summary>
|
||||
<h3>Da casa, por quem imprimiu</h3>
|
||||
<table class="table"><tbody id="stats-rework-printers"></tbody></table>
|
||||
<h3>Aguardando autorização</h3><ul class="plainlist" id="stats-rework-pending"></ul></details></section>
|
||||
<section class="panel clip s6"><div class="phead"><h2>Tempo em cada etapa</h2><span class="hint tip-l" tabindex="0" data-tip="Tempo mediano por pedido: quem voltou para a etapa soma cada passagem. O tempo em Aguardando contato não conta."><svg class="i s" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg></span><button class="btn right" id="edit-stage-limits" type="button" hidden>Editar tempos</button></div>
|
||||
<table class="table"><thead><tr><th scope="col">Etapa</th><th scope="col" class="r">Média</th><th scope="col" class="r">Aceitável</th><th scope="col" class="r">Estouros</th><th scope="col">Agora</th></tr></thead><tbody id="stats-stages"></tbody></table></section>
|
||||
<section class="panel clip"><div class="phead"><h2>Artes tratadas, por quem aprovou</h2><span class="hint tip-l" tabindex="0" data-tip="Pedidos do período em que o arquivo final aprovado não é a arte do cliente: alguém da equipe preparou."><svg class="i s" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg></span></div>
|
||||
<table class="table tight"><thead><tr><th scope="col">Quem aprovou</th><th scope="col" class="r">Artes</th></tr></thead><tbody id="stats-treated"></tbody></table></section>
|
||||
</div>
|
||||
<h2 class="grouph">Vendas</h2>
|
||||
<div class="stats-grid">
|
||||
<section class="panel clip"><div class="phead"><h2>Por origem</h2><span class="hint" tabindex="0" data-tip="Por onde o pedido entrou: o Site, os lotes do Dropflow ou a equipe, em Atendimento. Até Finalizado: do pagamento ao Finalizado, mediana, sem o tempo em Aguardando contato."><svg class="i s" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg></span></div>
|
||||
<table class="table"><thead><tr><th scope="col">Origem</th><th scope="col" class="r">Pedidos</th><th scope="col" class="r">Metros</th><th scope="col" class="r">Recebido</th><th scope="col" class="r">Até Finalizado</th></tr></thead><tbody id="stats-origins"></tbody></table></section>
|
||||
<section class="panel clip"><div class="phead"><h2>Pedidos sem pagamento</h2><span class="hint" tabindex="0" data-tip="Cotações aprovadas no período, pela data de aprovação. Pagas viraram pedido; expiradas passaram de 24 horas sem pagamento; aguardando ainda podem ser pagas. A taxa de abandono é expiradas sobre pagas mais expiradas."><svg class="i s" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg></span></div>
|
||||
<table class="table"><thead><tr><th scope="col">Indicador</th><th scope="col" class="r">Valor</th></tr></thead><tbody id="stats-unpaid"></tbody></table></section>
|
||||
</div>
|
||||
<h2 class="grouph">Consulta</h2>
|
||||
<div class="stats-consulta">
|
||||
<details class="stats-details"><summary class="stats-det"><svg class="i m" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="m181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128L90.34,53.66a8,8,0,0,1,11.32-11.32l80,80a8,8,0,0,1,0,11.32Z"></path></svg>Máquinas, mês a mês <span>produção, consumo, custo e retorno</span></summary>
|
||||
<section class="panel clip" id="stats-machine-panel"><div class="phead"><h2>Máquinas, mês a mês</h2><div class="mnav" id="stats-machine-nav"></div></div>
|
||||
<div class="fillbox machinebox"><div class="scrollin"><table class="table machine-month"><thead id="stats-machine-head"></thead><tbody id="stats-machine-body"></tbody></table></div></div>
|
||||
<p class="phint" id="stats-machine-note"></p></section>
|
||||
</details>
|
||||
<details class="stats-details"><summary class="stats-det"><svg class="i m" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="m181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128L90.34,53.66a8,8,0,0,1,11.32-11.32l80,80a8,8,0,0,1,0,11.32Z"></path></svg>Velocidade do site e do Prumo <span>média e p95 por etapa</span></summary>
|
||||
<section class="panel clip stats-speed-panel"><div class="phead"><h2>Velocidade do site e do Prumo</h2><span class="hint tip-l" tabindex="0" data-tip="Média e p95 do que o cliente sente, por pedido pago no período: abrir a página, subir o arquivo (segundos por MB), a conferência do Prumo, a montagem das avulsas, a geração do arquivo final por 10 m e o tempo do evento de pagamento até o card. Referências: página < 3 s; conferência < 30 s; geração < 2 min por 10 m; card em até 1 min."><svg class="i s" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg></span></div>
|
||||
<table class="table"><thead><tr><th scope="col">Etapa</th><th scope="col" class="r">Média</th><th scope="col" class="r">p95</th><th scope="col" class="r">Amostras</th></tr></thead><tbody id="stats-speed"></tbody></table></section>
|
||||
</details>
|
||||
<details class="stats-details"><summary class="stats-det"><svg class="i m" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="m181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128L90.34,53.66a8,8,0,0,1,11.32-11.32l80,80a8,8,0,0,1,0,11.32Z"></path></svg>Cupons e preço de tabela <span>o que entrou sem ser caixa</span></summary>
|
||||
<section class="panel clip" id="stats-coupons-panel"><div class="phead"><h2>Cupons</h2></div>
|
||||
<p class="phint">Cupons usados pelos pedidos pagos do período.</p>
|
||||
<table class="table"><thead><tr><th scope="col">Cupom</th><th scope="col" class="r">Pedidos</th><th scope="col" class="r">Metros</th><th scope="col" class="r">Desconto</th><th scope="col" class="r">Recebido</th></tr></thead><tbody id="stats-coupons"></tbody></table></section>
|
||||
<section class="panel clip"><div class="phead"><h2>Preço de tabela (não é caixa)</h2><span class="hint tip-l" tabindex="0" data-tip="Pedidos Internos e faturados do período: o preço de tabela fica registrado no pedido, mas esse valor não é dinheiro recebido."><svg class="i s" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg></span></div>
|
||||
<table class="table"><thead><tr><th scope="col">Forma</th><th scope="col" class="r">Pedidos</th><th scope="col" class="r">Metros</th><th scope="col" class="r">Valor</th></tr></thead><tbody id="stats-price-table"></tbody></table></section>
|
||||
</details>
|
||||
</div>
|
||||
<section class="panel clip"><div class="phead"><h2>Pedidos sem pagamento</h2><span class="hint" tabindex="0" data-tip="Cotações aprovadas no período, pela data de aprovação. Pagas viraram pedido; expiradas passaram de 24 horas sem pagamento; aguardando ainda podem ser pagas. A taxa de abandono é expiradas sobre pagas mais expiradas."><svg class="i s" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg></span></div>
|
||||
<table class="table"><thead><tr><th scope="col">Indicador</th><th scope="col" class="r">Valor</th></tr></thead><tbody id="stats-unpaid"></tbody></table></section>
|
||||
<section class="panel clip" id="stats-machine-panel"><div class="phead"><h2>Máquinas, mês a mês</h2><div class="mnav" id="stats-machine-nav"></div></div>
|
||||
<div class="fillbox machinebox"><div class="scrollin"><table class="table machine-month"><thead id="stats-machine-head"></thead><tbody id="stats-machine-body"></tbody></table></div></div>
|
||||
<p class="phint" id="stats-machine-note"></p></section>
|
||||
<section class="panel clip"><div class="phead"><h2>Velocidade do site e do Prumo</h2><span class="hint tip-l" tabindex="0" data-tip="Média e p95 do que o cliente sente, por pedido pago no período: abrir a página, subir o arquivo (segundos por MB), a conferência do Prumo, a montagem das avulsas, a geração do arquivo final por 10 m e o tempo do evento de pagamento até o card. Referências: página < 3 s; conferência < 30 s; geração < 2 min por 10 m; card em até 1 min."><svg class="i s" viewBox="0 0 256 256" aria-hidden="true"><path fill="currentColor" d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg></span></div>
|
||||
<table class="table"><thead><tr><th scope="col">Etapa</th><th scope="col" class="r">Média</th><th scope="col" class="r">p95</th><th scope="col" class="r">Amostras</th></tr></thead><tbody id="stats-speed"></tbody></table></section>
|
||||
</section>
|
||||
<section id="tab-site" class="page" hidden>
|
||||
<div class="site-sub" id="site-sub"></div>
|
||||
|
||||
Reference in New Issue
Block a user