diff --git a/web/kanban-montador.js b/web/kanban-montador.js index 04accbb..7eccf8b 100644 --- a/web/kanban-montador.js +++ b/web/kanban-montador.js @@ -433,7 +433,7 @@ async function montarLayout(token){ say('A estampa não pôde ser lida.',true);return; } const cargas=lines.flatMap((line,sourceIndex)=>Array.from({length:line.qty},(_,copyIndex)=>({ - a:{sourceIndex,giro:0,esp:false},img:line.ref?null:line.img,copyIndex,w:line.widthCm,h:line.heightCm,travado:false}))); + a:{sourceIndex,giro:0,esp:false},img:line.ref?null:line.img,foto:line.img,copyIndex,w:line.widthCm,h:line.heightCm,travado:false}))); let enc; try{enc=encaixar(cargas,MONTAR_FILM_CM);} catch(e){ @@ -474,7 +474,9 @@ function montarDrawPreview(layout){ ctx.rotate(giro*Math.PI/180); if(c.a&&c.a.esp)ctx.scale(-1,1); const dw=((giro%180===90)?p.h:p.w)*px, dh=((giro%180===90)?p.w:p.h)*px; - if(c.img)ctx.drawImage(c.img,-dw/2,-dh/2,dw,dh); + // A stamp with a reference packs as a box (img null); it draws its picture. + const picture=c.img||c.foto; + if(picture)ctx.drawImage(picture,-dw/2,-dh/2,dw,dh); else{ctx.fillStyle='#E7E7E3';ctx.fillRect(-dw/2,-dh/2,dw,dh);} ctx.restore(); } @@ -828,6 +830,8 @@ function montarListErrors(valid,skipped){ function montarOpenPaste(){ if(!montarKindNames().includes('interno')) return say('Seu perfil não monta lista colada: ela vira pedido Interno.',true); + // The list is always Interno: without the internal customer it could not be ordered. + if(!montarInternalReady())return say('Peça à Gestão para completar o cliente 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';