Merge main into montador-v2
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> # Conflicts: # web/kanban.js
This commit is contained in:
@@ -10,11 +10,11 @@ sessionStorage.removeItem('dtf-operator');
|
||||
const FLOW=['rec','tra','imp','rev','fin'];
|
||||
const FORMER_STATES={fil:'Fila de impressão'};
|
||||
const stateName=s=>board.states[s]||FORMER_STATES[s]||s;
|
||||
const PRODUCT={file:'DTF Têxtil · folha montada',avulsa:'DTF Têxtil · artes avulsas',uvfile:'DTF UV · folha montada',uv:'DTF UV · artes avulsas'};
|
||||
const PRODUCT={file:'DTF Têxtil · folha montada',avulsa:'DTF Têxtil · artes avulsas',uvfile:'DTF UV · folha montada',uv:'DTF UV · artes avulsas',premium:'DTF Têxtil Premium · folha montada'};
|
||||
// Loose art the Site split by stroke (item 17): each sheet is an item of its own.
|
||||
const productName=item=>PRODUCT[item.mode]+(item.split?' · folha '+item.split.part+' de '+item.split.of+
|
||||
', '+(item.stroke_class==='C3'?'chapado':'traço fino'):'');
|
||||
const SHORT={file:'Têxtil folha',avulsa:'Têxtil avulsa',uvfile:'UV folha',uv:'UV avulsa'};
|
||||
const SHORT={file:'Têxtil folha',avulsa:'Têxtil avulsa',uvfile:'UV folha',uv:'UV avulsa',premium:'Premium'};
|
||||
const EVENTS={payment_approved:'Pagamento aprovado',production_started:'Produção iniciada',correction_needed:'Correção necessária',ready:'Pedido pronto',cancelled:'Pedido cancelado'};
|
||||
// Payment outcomes are recorded by the API in English; operators read Portuguese.
|
||||
function outcomeText(outcome){
|
||||
@@ -427,7 +427,7 @@ async function fetchInto(dir,file){
|
||||
await writeWhole(dir,file.name,r.body);
|
||||
}
|
||||
|
||||
// The machines' hot folders (item 10): 3. Imprimindo/<máquina>/<C1|C2|C3>/.
|
||||
// The machines' hot folders (item 10): 3. Imprimindo/<máquina>/<C1|C2|C3|PREMIUM>/.
|
||||
// The server says what this computer writes now (claimed for it alone, two
|
||||
// parts at most per machine); a written part gone from its folder was taken
|
||||
// by FlexiPRINT, and is never written again; a withdrawn one, from a card that
|
||||
@@ -757,7 +757,7 @@ const FILTER_TESTS={
|
||||
site:o=>o.origin==='site',
|
||||
dropflow:o=>o.origin==='dropflow',
|
||||
atendimento:o=>o.origin==='atendimento',
|
||||
textil:o=>o.snapshot.items.some(i=>i.mode==='file'||i.mode==='avulsa'),
|
||||
textil:o=>o.snapshot.items.some(i=>i.mode==='file'||i.mode==='avulsa'||i.mode==='premium'),
|
||||
uv:o=>o.snapshot.items.some(i=>i.mode==='uvfile'||i.mode==='uv'),
|
||||
entrega:o=>!!o.snapshot.destination,
|
||||
retirada:o=>!o.snapshot.destination,
|
||||
@@ -1116,6 +1116,7 @@ function card(order,place){
|
||||
const meta=node('span',undefined,'cmeta');meta.append(node('span',productLine(s.items)));
|
||||
const special=specialDelivery(s);
|
||||
if(special){const tag=node('span',special,'origin');tag.title=special;meta.append(tag);}
|
||||
if(s.items.some(i=>i.mode==='premium'))meta.append(badge('Premium','','DTF Têxtil Premium: 8 passadas, branco no máximo'));
|
||||
if(order.machine){const m=node('span',order.machine.name,'mach'+(mine?' mine':''));m.title=mine?'Sua máquina':'Máquina';meta.append(m);}
|
||||
meta.append(node('b',metres(orderMetres(order)),'mtr'));
|
||||
info.append(row,name,meta);
|
||||
@@ -1440,6 +1441,7 @@ function renderPanel(order){
|
||||
sub.append(badge('Nota '+s.grade_flags.aviso+': conferir a arte','warn',
|
||||
'A nota da arte ficou abaixo do limite configurado: confira antes de imprimir'));
|
||||
if(isTest(order))sub.append(badge('Teste','','Pedido de teste: sem pagamento, não vai ao Tiny'));
|
||||
if(s.items.some(i=>i.mode==='premium'))sub.append(badge('Premium','','DTF Têxtil Premium: 8 passadas, branco no máximo'));
|
||||
if(stalled(order)&&!order.cancelled_at)sub.append(badge('Parado há '+hoursSince(order.updated_at)+' h','bad','Sem mudar de etapa desde '+when(order.updated_at)));
|
||||
const steps=node('ol',undefined,'stepper');steps.setAttribute('aria-label','Etapas');
|
||||
const at=FLOW.indexOf(order.state);
|
||||
@@ -2824,7 +2826,11 @@ async function openMachineSheet(machineId){
|
||||
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';
|
||||
input.value=data.minimums[item]!==null&&data.minimums[item]!==undefined?Number(data.minimums[item]).toString():'';
|
||||
// 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():'';
|
||||
minimums[item]=input;
|
||||
box.append(field('Mínimo de '+label.toLowerCase()+' ('+unit+')',input));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user