feat: a pasted list in Montar, with the reference printed under each stamp and the skipped lines in the report (Rodada 5, C4)

One line per item, code size quantity reference. Lines with errors are
listed with the line and the reason and mounted only after "Montar sem
essas N linhas". A reference is drawn 3 mm high right under the stamp,
with 1 cm to the next piece on that side; the list is always Interno and
the Prumo report names the skipped lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-11-30 11:59:24 -03:00
parent a275a77896
commit 19eb37bdd9
8 changed files with 229 additions and 7 deletions

View File

@@ -120,6 +120,8 @@ def montador_order(body: MontadorOrder, request: Request, user=Depends(can('asse
kinds = set().union(*(MONTADOR_KINDS.get(r, set()) for r in roles_of(request.state.operator))) kinds = set().union(*(MONTADOR_KINDS.get(r, set()) for r in roles_of(request.state.operator)))
if body.kind not in kinds: if body.kind not in kinds:
raise HTTPException(403, 'Seu perfil não permite este tipo de pedido.') raise HTTPException(403, 'Seu perfil não permite este tipo de pedido.')
if body.batch and body.kind != 'interno':
raise HTTPException(422, 'A lista colada vira sempre pedido Interno.')
with db.connect() as c: with db.connect() as c:
if body.kind == 'interno': if body.kind == 'interno':
customer = internal_customer(c) customer = internal_customer(c)
@@ -148,7 +150,8 @@ def montador_order(body: MontadorOrder, request: Request, user=Depends(can('asse
# The order's kind and the clothing order it travels with, on the # The order's kind and the clothing order it travels with, on the
# card and in Tiny's internal note. # card and in Tiny's internal note.
approved = {**approved, 'kind': body.kind, approved = {**approved, 'kind': body.kind,
**({'with_order': body.with_order} if body.with_order else {})} **({'with_order': body.with_order} if body.with_order else {}),
**({'batch': body.batch.model_dump()} if body.batch else {})}
# A Venda's seller in Tiny is who assembled it, when their user # A Venda's seller in Tiny is who assembled it, when their user
# names one (Marcus, 2026-11-17, app/tiny.py order_payload). # names one (Marcus, 2026-11-17, app/tiny.py order_payload).
if body.kind == 'venda': if body.kind == 'venda':

View File

@@ -405,6 +405,15 @@ class QuoteRequest(StrictModel):
raise ValueError('The delivery address CEP must be the CEP freight was quoted for') raise ValueError('The delivery address CEP must be the CEP freight was quoted for')
return self return self
class SkippedLine(StrictModel):
line: int = Field(ge=1, le=10000, strict=True)
text: str = Field(max_length=200)
reason: str = Field(max_length=200)
class MontadorBatch(StrictModel):
lines: int = Field(ge=0, le=1000, strict=True)
skipped: list[SkippedLine] = Field(default_factory=list, max_length=1000)
class MontadorOrder(StrictModel): class MontadorOrder(StrictModel):
"""What the montador sends (fronts 7a.3 and 7a.4): Interno or Venda, loose """What the montador sends (fronts 7a.3 and 7a.4): Interno or Venda, loose
artwork only; the server prices and approves it as a quote. An Interno artwork only; the server prices and approves it as a quote. An Interno
@@ -421,6 +430,8 @@ class MontadorOrder(StrictModel):
# A Venda with "Envio": the chosen freight service and the full address. # A Venda with "Envio": the chosen freight service and the full address.
freight: Freight | None = None freight: Freight | None = None
destination: Destination | None = None destination: Destination | None = None
# The pasted list this order came from: the valid lines and the skipped ones.
batch: MontadorBatch | None = None
@model_validator(mode='after') @model_validator(mode='after')
def order_kind(self): def order_kind(self):

View File

@@ -59,6 +59,15 @@ def report(order, uploads):
lines = [] lines = []
if snapshot.get('proof_of'): if snapshot.get('proof_of'):
lines.append(f'Prova do pedido #{snapshot["proof_of"]}') lines.append(f'Prova do pedido #{snapshot["proof_of"]}')
batch = snapshot.get('batch') or {}
if batch:
skipped = batch.get('skipped') or []
summary = f'Lista colada: {batch.get("lines", 0)} linhas montadas'
if skipped:
summary += f', {len(skipped)} puladas'
lines.append(summary)
for row in skipped:
lines.append(f'Linha {row.get("line")} pulada ({row.get("reason")}): {row.get("text")}')
multi = len(items) > 1 multi = len(items) > 1
for index, item in enumerate(items): for index, item in enumerate(items):
lead = f'Item {index + 1}: ' if multi else '' lead = f'Item {index + 1}: ' if multi else ''

View File

@@ -146,7 +146,9 @@ def run():
# Interno is refused while Gestão has not completed the customer. # Interno is refused while Gestão has not completed the customer.
stamp = upload_stamp(shipping) stamp = upload_stamp(shipping)
interno = {'kind': 'interno', 'items': [montador_item(stamp)]} batch = {'lines': 2, 'skipped': [
{'line': 5, 'text': 'NX.999 Z 1 REF', 'reason': 'tamanho não existe na tabela'}]}
interno = {'kind': 'interno', 'items': [montador_item(stamp)], 'batch': batch}
refused = shipping.call('/operator/montador/orders', {'request_key': str(uuid4()), **interno}, refused = shipping.call('/operator/montador/orders', {'request_key': str(uuid4()), **interno},
expected=409) expected=409)
assert refused['detail'] == INTERNAL_MISSING, refused assert refused['detail'] == INTERNAL_MISSING, refused
@@ -164,6 +166,7 @@ def run():
assert order_interno['state'] == 'rec' and order_interno['origin'] == 'dropflow', order_interno assert order_interno['state'] == 'rec' and order_interno['origin'] == 'dropflow', order_interno
assert order_interno['snapshot']['kind'] == 'interno', order_interno['snapshot'].get('kind') assert order_interno['snapshot']['kind'] == 'interno', order_interno['snapshot'].get('kind')
assert order_interno['snapshot']['customer']['cnpj'] == '11222333000181', order_interno['snapshot'] assert order_interno['snapshot']['customer']['cnpj'] == '11222333000181', order_interno['snapshot']
assert order_interno['snapshot']['batch'] == batch, order_interno['snapshot'].get('batch')
payment = order_interno['payment'] payment = order_interno['payment']
assert (payment['provider'], payment['method'], payment['status']) == ('manual', 'interno', 'paid'), payment assert (payment['provider'], payment['method'], payment['status']) == ('manual', 'interno', 'paid'), payment
with db.connect() as c: with db.connect() as c:
@@ -213,6 +216,12 @@ def run():
designer.call('/operator/montador/orders', {'request_key': str(uuid4()), **venda}, expected=403) designer.call('/operator/montador/orders', {'request_key': str(uuid4()), **venda}, expected=403)
shipping.call('/operator/montador/orders', {'request_key': str(uuid4()), 'kind': 'interno', shipping.call('/operator/montador/orders', {'request_key': str(uuid4()), 'kind': 'interno',
'items': [montador_item(stamp, 'file')]}, expected=422) 'items': [montador_item(stamp, 'file')]}, expected=422)
# A pasted list only becomes an Interno order.
refused = seller.call('/operator/montador/orders', {'request_key': str(uuid4()), 'kind': 'venda',
'customer': venda_customer,
'items': [montador_item(venda_stamp)],
'batch': batch}, expected=422)
assert refused['detail'] == 'A lista colada vira sempre pedido Interno.', refused
# Venda with Envio: the Site's freight, re-quoted by the server. # Venda with Envio: the Site's freight, re-quoted by the server.
destination = {'recipient': 'Maria Souza', 'street': 'Rua das Flores', 'number': '100', destination = {'recipient': 'Maria Souza', 'street': 'Rua das Flores', 'number': '100',

View File

@@ -37,6 +37,29 @@ class PrumoReportTests(unittest.TestCase):
self.assertIn('Prumo levou 41 s', text) self.assertIn('Prumo levou 41 s', text)
self.assertNotIn('Prumo levou 341 s', text) self.assertNotIn('Prumo levou 341 s', text)
def test_pasted_list_says_how_many_lines_were_mounted(self):
order = self.order()
order['snapshot']['batch'] = {'lines': 3, 'skipped': []}
lines = report(order, {'u1': {'name': 'arte.pdf'}})
text = '\n'.join(lines)
self.assertIn('Lista colada: 3 linhas montadas', text)
self.assertNotIn('puladas', text)
# Before the item lines: the designer reads the list first.
self.assertLess(text.index('Lista colada'), text.index('Formato detectado'))
def test_pasted_list_lists_the_skipped_lines(self):
order = self.order()
order['snapshot']['batch'] = {'lines': 2, 'skipped': [
{'line': 4, 'text': 'NX.999 Z 1 REF', 'reason': 'tamanho não existe na tabela'},
{'line': 7, 'text': 'NX.226 C 0', 'reason': 'quantidade de 1 a 9999'}]}
lines = report(order, {'u1': {'name': 'arte.pdf'}})
text = '\n'.join(lines)
self.assertIn('Lista colada: 2 linhas montadas, 2 puladas', text)
self.assertIn('Linha 4 pulada (tamanho não existe na tabela): NX.999 Z 1 REF', text)
self.assertIn('Linha 7 pulada (quantidade de 1 a 9999): NX.226 C 0', text)
self.assertLess(text.index('Lista colada'), text.index('Linha 4 pulada'))
self.assertLess(text.index('Linha 7 pulada'), text.index('Formato detectado'))
def test_saved_png_size_says_whether_the_customer_kept_it(self): def test_saved_png_size_says_whether_the_customer_kept_it(self):
order = self.order() order = self.order()
item = order['snapshot']['items'][0] item = order['snapshot']['items'][0]

View File

@@ -14,7 +14,7 @@ const MONTAR_GEAR='M128 80a48 48 0 1 0 48 48a48.05 48.05 0 0 0-48-48m0 80a32 32
const MONTAR={sizes:[],lines:[],seq:0,preview:null,timer:null,dirty:false,token:0, const MONTAR={sizes:[],lines:[],seq:0,preview:null,timer:null,dirty:false,token:0,
layout:null,layoutTimer:null,layoutToken:0,layoutPending:false,creating:false,requestKey:null, layout:null,layoutTimer:null,layoutToken:0,layoutPending:false,creating:false,requestKey:null,
kind:null,internal:null,internalDirty:false,brands:new Map(),contactToken:0,contactTimer:null, kind:null,internal:null,internalDirty:false,brands:new Map(),contactToken:0,contactTimer:null,
freights:null,freight:null,catalog:null}; freights:null,freight:null,catalog:null,batch:null};
const montarFolderReady=()=>!!FOLDER.handle&&!!FOLDER.granted; const montarFolderReady=()=>!!FOLDER.handle&&!!FOLDER.granted;
const montarDpi=found=>found.width/(found.widthCm/2.54); const montarDpi=found=>found.width/(found.widthCm/2.54);
@@ -433,7 +433,7 @@ async function montarLayout(token){
say('A estampa não pôde ser lida.',true);return; say('A estampa não pôde ser lida.',true);return;
} }
const cargas=lines.flatMap((line,sourceIndex)=>Array.from({length:line.qty},(_,copyIndex)=>({ const cargas=lines.flatMap((line,sourceIndex)=>Array.from({length:line.qty},(_,copyIndex)=>({
a:{sourceIndex,giro:0,esp:false},img:line.img,copyIndex,w:line.widthCm,h:line.heightCm,travado:false}))); a:{sourceIndex,giro:0,esp:false},img:line.ref?null:line.img,copyIndex,w:line.widthCm,h:line.heightCm,travado:false})));
let enc; let enc;
try{enc=encaixar(cargas,MONTAR_FILM_CM);} try{enc=encaixar(cargas,MONTAR_FILM_CM);}
catch(e){ catch(e){
@@ -523,7 +523,7 @@ function montarItem(sources){
const cargas=[]; const cargas=[];
sources.forEach((source,sourceIndex)=>{ sources.forEach((source,sourceIndex)=>{
for(let copyIndex=0;copyIndex<source.copies;copyIndex++) for(let copyIndex=0;copyIndex<source.copies;copyIndex++)
cargas.push({a:{sourceIndex,giro:0,esp:false},img:source.line.img,copyIndex, cargas.push({a:{sourceIndex,giro:0,esp:false},img:source.line.ref?null:source.line.img,copyIndex,
w:source.line.widthCm,h:source.line.heightCm,travado:false}); w:source.line.widthCm,h:source.line.heightCm,travado:false});
}); });
const enc=encaixar(cargas,MONTAR_FILM_CM); const enc=encaixar(cargas,MONTAR_FILM_CM);
@@ -563,6 +563,7 @@ function montarItems(lines,uploads){
async function montarCreate(){ async function montarCreate(){
if(MONTAR.creating)return; if(MONTAR.creating)return;
const kind=MONTAR.kind||'venda'; const kind=MONTAR.kind||'venda';
if(MONTAR.batch&&kind!=='interno')return say('A lista colada vira sempre pedido Interno.');
let customer=null,name=''; let customer=null,name='';
if(kind==='interno'){ if(kind==='interno'){
if(!montarInternalReady())return say('Peça à Gestão para completar o cliente interno.'); if(!montarInternalReady())return say('Peça à Gestão para completar o cliente interno.');
@@ -596,12 +597,13 @@ async function montarCreate(){
const line=lines[index]; const line=lines[index];
say('Enviando estampas '+(index+1)+' de '+lines.length+'…'); say('Enviando estampas '+(index+1)+' de '+lines.length+'…');
const id=await dtfUpload(line.file,{api,startPath:'/montador/uploads', const id=await dtfUpload(line.file,{api,startPath:'/montador/uploads',
scope:'montador:'+line.code+'-'+line.letter,progress:say}); scope:'montador:'+line.code+'-'+line.letter+(line.ref?'-'+line.ref:''),progress:say});
uploads.set(line.id,id); uploads.set(line.id,id);
} }
say('Criando o pedido…'); say('Criando o pedido…');
if(!MONTAR.requestKey)MONTAR.requestKey=crypto.randomUUID(); if(!MONTAR.requestKey)MONTAR.requestKey=crypto.randomUUID();
const body={request_key:MONTAR.requestKey,kind,items:montarItems(lines,uploads)}; const body={request_key:MONTAR.requestKey,kind,items:montarItems(lines,uploads)};
if(MONTAR.batch)body.batch=MONTAR.batch;
if(kind==='venda'){ if(kind==='venda'){
body.customer=customer; body.customer=customer;
if(withOrder)body.with_order=withOrder; if(withOrder)body.with_order=withOrder;
@@ -630,6 +632,7 @@ function montarLine(line){
const img=node('img',undefined,'montar-thumb');img.src=line.url;img.alt=''; const img=node('img',undefined,'montar-thumb');img.src=line.url;img.alt='';
const words=node('div',undefined,'montar-linemeta'); const words=node('div',undefined,'montar-linemeta');
words.append(node('b',line.code),node('span','tamanho '+line.letter+' · '+cm(line.widthCm)+' cm','sub')); words.append(node('b',line.code),node('span','tamanho '+line.letter+' · '+cm(line.widthCm)+' cm','sub'));
if(line.ref)words.append(node('span','ref '+line.ref,'sub'));
if(line.dpi<MONTAR_DPI_WARN)words.append(badge(Math.floor(line.dpi)+' DPI','warn','Abaixo de '+MONTAR_DPI_WARN+' DPI.')); if(line.dpi<MONTAR_DPI_WARN)words.append(badge(Math.floor(line.dpi)+' DPI','warn','Abaixo de '+MONTAR_DPI_WARN+' DPI.'));
const step=node('div',undefined,'montar-step'); const step=node('div',undefined,'montar-step');
const minus=node('button','−','montar-stepbtn');minus.type='button';minus.setAttribute('aria-label','Menos uma'); const minus=node('button','−','montar-stepbtn');minus.type='button';minus.setAttribute('aria-label','Menos uma');
@@ -667,6 +670,7 @@ function montarRemoveLine(line){
function montarClear(){ function montarClear(){
for(const line of MONTAR.lines)URL.revokeObjectURL(line.url); for(const line of MONTAR.lines)URL.revokeObjectURL(line.url);
MONTAR.lines=[]; MONTAR.lines=[];
MONTAR.batch=null;
montarChanged(); montarChanged();
} }
@@ -695,6 +699,156 @@ async function montarAdd(){
montarChanged(); montarChanged();
} }
function montarListSize(letter){
const wanted=String(letter||'').toUpperCase();
return MONTAR.sizes.find(size=>size.letter===wanted)||null;
}
function montarParseList(text){
const rows=[];
const lines=String(text||'').split(/\r?\n/);
for(let index=0;index<lines.length;index++){
const line=lines[index].trim();
if(!line||line.startsWith('#'))continue;
const parts=line.split(/\s+/);
const row={line:index+1,text:line,code:'',letter:'',qty:0,ref:'',error:''};
if(parts.length>4){row.error='mais de 4 campos';rows.push(row);continue;}
if(parts.length<3){row.error='faltam campos';rows.push(row);continue;}
row.code=parts[0];row.letter=parts[1];row.ref=parts[3]||'';
if(!MONTAR_CODE.test(row.code)){row.error='código inválido';rows.push(row);continue;}
const size=montarListSize(row.letter);
if(!size){row.error='tamanho não existe na tabela';rows.push(row);continue;}
row.letter=size.letter;
const quantity=Number(parts[2]);
if(!Number.isInteger(quantity)||quantity<1||quantity>9999){
row.error='quantidade de 1 a 9999';rows.push(row);continue;
}
row.qty=quantity;
if(row.ref.length>30){row.error='referência com mais de 30 caracteres';rows.push(row);continue;}
rows.push(row);
}
return rows;
}
async function montarListCheck(rows){
const cache=new Map();
for(const row of rows){
if(row.error)continue;
const size=montarListSize(row.letter);
if(!size){row.error='tamanho não existe na tabela';continue;}
const key=row.code+'\u0000'+size.letter;
let found;
if(cache.has(key))found=cache.get(key);
else{
try{found=await montarRead(row.code,size);}
catch(e){if(!montarFolderError(e))say(e.message,true);return null;}
cache.set(key,found);
}
if(!found){row.error='código não existe em Estampas/';continue;}
if(found.widthCm>56){row.error='estampa com mais de 56 cm';continue;}
if(montarDpi(found)<MONTAR_DPI_REFUSE){row.error='estampa abaixo de '+MONTAR_DPI_REFUSE+' DPI';continue;}
row.found=found;row.size=size;
}
return rows;
}
function montarListFile(row){
return row.code+'.'+row.letter+'-'+row.ref.replace(/[^A-Za-z0-9._-]/g,'_')+'.png';
}
function montarComposeRef(found,row){
return new Promise((ok,fail)=>{
const source=montarStampImage(found.url);
source.loading.then(image=>{
if(!image)return fail(new Error('A estampa não pôde ser lida.'));
const pxCm=found.width/found.widthCm;
const gap=Math.round(0.1*pxCm),cap=Math.round(0.3*pxCm),bottom=Math.round(0.5*pxCm);
const font=0.3*pxCm/0.72;
const canvas=document.createElement('canvas'),ctx=canvas.getContext('2d');
ctx.font='bold '+font+'px Arial, sans-serif';
const textWidth=Math.ceil(ctx.measureText(row.ref).width);
canvas.width=Math.max(1,Math.max(found.width,textWidth));
canvas.height=Math.max(1,found.height+gap+cap+bottom);
ctx.font='bold '+font+'px Arial, sans-serif';
ctx.textBaseline='alphabetic';ctx.fillStyle='#000';
ctx.drawImage(image,0,0,found.width,found.height);
ctx.fillText(row.ref,0,found.height+gap+cap);
canvas.toBlob(blob=>{
if(!blob)return fail(new Error('A referência não pôde ser gerada.'));
const file=new File([blob],montarListFile(row),{type:'image/png'});
const url=URL.createObjectURL(file),picture=montarStampImage(url);
ok({file,url,img:picture.img,loading:picture.loading,
widthCm:canvas.width/pxCm,heightCm:canvas.height/pxCm});
},'image/png');
},fail);
});
}
async function montarListBuild(valid,skipped){
montarSetKind('interno');
const used=new Set();
try{
for(const row of valid){
const found=row.found;
used.add(found);
const existing=MONTAR.lines.find(line=>line.code===row.code&&line.letter===row.letter&&
(line.ref||'')===row.ref);
if(existing){existing.qty=Math.min(9999,existing.qty+row.qty);continue;}
if(row.ref){
const composed=await montarComposeRef(found,row);
MONTAR.lines.push({id:++MONTAR.seq,code:row.code,letter:row.letter,widthCm:composed.widthCm,
qty:row.qty,heightCm:composed.heightCm,dpi:montarDpi(found),url:composed.url,
img:composed.img,loading:composed.loading,file:composed.file,ref:row.ref});
}else{
const url=URL.createObjectURL(found.file),picture=montarStampImage(url);
MONTAR.lines.push({id:++MONTAR.seq,code:row.code,letter:row.letter,widthCm:found.widthCm,
qty:row.qty,heightCm:montarHeight(found),dpi:montarDpi(found),url,
img:picture.img,loading:picture.loading,file:found.file,ref:''});
}
}
}finally{
for(const found of used)URL.revokeObjectURL(found.url);
}
MONTAR.batch={lines:valid.length,skipped};
montarChanged();
}
function montarListErrors(valid,skipped){
const box=node('div',undefined,'montar-list-errors');
box.append(...skipped.map(row=>node('p','Linha '+row.line+': '+row.text+' · '+row.reason)));
const all=!valid.length;
const label=all?'Fechar':(skipped.length===1?'Montar sem essa linha':'Montar sem essas '+skipped.length+' linhas');
const dialog=formDialog('Linhas com erro',{
text:all?'Nenhuma linha será montada.':'As linhas abaixo serão puladas.',
fields:[box],label,
onsave:async()=>{
if(all)return;
await montarListBuild(valid,skipped);
}
});
if(all){
const cancel=dialog.box.querySelector('.dfoot .btn.ghost.right');
if(cancel)cancel.remove();
}
}
function montarOpenPaste(){
if(!montarKindNames().includes('interno'))
return say('Seu perfil não monta lista colada: ela vira pedido Interno.',true);
if(!montarFolderReady())return;
const text=node('textarea',undefined,'montar-list-text');
text.id='montar-list-text';text.rows=12;text.spellcheck=false;text.placeholder='NX.226 C 2 ML-4471';
formDialog('Colar lista',{
text:'Uma linha por item: código tamanho quantidade referência. Ex.: NX.226 C 2 ML-4471',
fields:[field('Lista',text)],label:'Conferir lista',width:640,
onsave:async()=>{
const rows=montarParseList(text.value);
if(rows.length>500){say('A lista tem mais de 500 linhas.',true);return false;}
if(!rows.length){say('A lista está vazia.',true);return false;}
const checked=await montarListCheck(rows);
if(!checked)return false;
const valid=checked.filter(row=>!row.error);
const skipped=checked.filter(row=>row.error)
.map(row=>({line:row.line,text:row.text,reason:row.error}));
if(skipped.length){montarListErrors(valid,skipped);return;}
await montarListBuild(valid,skipped);
}
});
}
function montarPaintSelect(){ function montarPaintSelect(){
const select=$('montar-size'),current=select.value; const select=$('montar-size'),current=select.value;
select.replaceChildren(...MONTAR.sizes.map(size=>{ select.replaceChildren(...MONTAR.sizes.map(size=>{
@@ -855,6 +1009,7 @@ $('montar-add').onclick=async()=>{
$('montar-add').disabled=true; $('montar-add').disabled=true;
try{await montarAdd();}catch(e){say(e.message,true);}finally{$('montar-add').disabled=false;} try{await montarAdd();}catch(e){say(e.message,true);}finally{$('montar-add').disabled=false;}
}; };
$('montar-paste').onclick=()=>montarOpenPaste();
$('montar-clear').onclick=()=>montarClear(); $('montar-clear').onclick=()=>montarClear();
$('montar-build').onclick=()=>montarCreate(); $('montar-build').onclick=()=>montarCreate();
for(const id of MONTAR_CUSTOMER)$(id).addEventListener('input',()=>{MONTAR.requestKey=null;montarPaintCustomer();montarPaintActions();}); for(const id of MONTAR_CUSTOMER)$(id).addEventListener('input',()=>{MONTAR.requestKey=null;montarPaintCustomer();montarPaintActions();});

View File

@@ -1666,3 +1666,12 @@ dialog.viewer::backdrop{background:var(--scrim)}
.montar-size-row{height:44px} .montar-size-row{height:44px}
.montar-ajustes-dlg{max-height:92vh} .montar-ajustes-dlg{max-height:92vh}
} }
.montar-list-actions{display:flex;align-items:center;gap:8px}
.montar-list-actions>.btn{height:42px;white-space:nowrap}
.montar-list-text{min-height:210px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13px;line-height:1.5}
.montar-list-errors{display:flex;flex-direction:column;gap:6px;max-height:320px;overflow:auto;padding:10px 12px;border-radius:10px;background:var(--sf2)}
.montar-list-errors p{margin:0;font-size:13px;color:var(--tx2);word-break:break-word}
@media (max-width:700px){
.montar-list-actions{grid-column:1/-1;justify-content:flex-start}
}

View File

@@ -131,7 +131,10 @@
<label class="fld"><span>Código</span><input id="montar-code" maxlength="40" autocomplete="off" spellcheck="false" placeholder="1001"></label> <label class="fld"><span>Código</span><input id="montar-code" maxlength="40" autocomplete="off" spellcheck="false" placeholder="1001"></label>
<label class="fld"><span>Tamanho</span><select id="montar-size"></select></label> <label class="fld"><span>Tamanho</span><select id="montar-size"></select></label>
<label class="fld"><span>Quantidade</span><input id="montar-qty" type="number" min="1" max="9999" step="1" value="1"></label> <label class="fld"><span>Quantidade</span><input id="montar-qty" type="number" min="1" max="9999" step="1" value="1"></label>
<div class="montar-list-actions">
<button class="btn pri" id="montar-add" type="button">Adicionar</button> <button class="btn pri" id="montar-add" type="button">Adicionar</button>
<button class="btn" id="montar-paste" type="button">Colar lista</button>
</div>
</div> </div>
<div class="montar-preview" id="montar-preview"></div> <div class="montar-preview" id="montar-preview"></div>
</section> </section>