fix: a pasted list needs the internal customer first, and its stamps with a reference show their picture in the preview (Rodada 5, C4)
All checks were successful
Build and deploy / Validate source (push) Successful in 4s
Build and deploy / Integration suite on a real stack (push) Successful in 6m48s
Build and deploy / Secret scan and release gate (push) Successful in 3s
Build and deploy / Publish images (push) Successful in 51s
All checks were successful
Build and deploy / Validate source (push) Successful in 4s
Build and deploy / Integration suite on a real stack (push) Successful in 6m48s
Build and deploy / Secret scan and release gate (push) Successful in 3s
Build and deploy / Publish images (push) Successful in 51s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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.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;
|
let enc;
|
||||||
try{enc=encaixar(cargas,MONTAR_FILM_CM);}
|
try{enc=encaixar(cargas,MONTAR_FILM_CM);}
|
||||||
catch(e){
|
catch(e){
|
||||||
@@ -474,7 +474,9 @@ function montarDrawPreview(layout){
|
|||||||
ctx.rotate(giro*Math.PI/180);
|
ctx.rotate(giro*Math.PI/180);
|
||||||
if(c.a&&c.a.esp)ctx.scale(-1,1);
|
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;
|
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);}
|
else{ctx.fillStyle='#E7E7E3';ctx.fillRect(-dw/2,-dh/2,dw,dh);}
|
||||||
ctx.restore();
|
ctx.restore();
|
||||||
}
|
}
|
||||||
@@ -828,6 +830,8 @@ function montarListErrors(valid,skipped){
|
|||||||
function montarOpenPaste(){
|
function montarOpenPaste(){
|
||||||
if(!montarKindNames().includes('interno'))
|
if(!montarKindNames().includes('interno'))
|
||||||
return say('Seu perfil não monta lista colada: ela vira pedido Interno.',true);
|
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;
|
if(!montarFolderReady())return;
|
||||||
const text=node('textarea',undefined,'montar-list-text');
|
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';
|
text.id='montar-list-text';text.rows=12;text.spellcheck=false;text.placeholder='NX.226 C 2 ML-4471';
|
||||||
|
|||||||
Reference in New Issue
Block a user