fix: new layout phase E review, the art preview stays and the live camera is not covered
The item keeps its Arte / Montagem preview, folded under the facts as "Prévia da arte", so an item without a picture still has no empty column. The Prumo, preview and Originais disclosures share one row style with a turning chevron; Originais is hidden when there are none. In Revisão the camera label no longer sits over the live video, a live camera takes the whole row, and the no-camera line is a plain note as in D2. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
conferir (fronts 2/7). Loaded after kanban.js, which defines $, api, node,
|
||||
button, svgIcon, IC, badge, money, when, ago, metres, plural, say, may,
|
||||
mayMove, mayAct, myMachine, board, ME, MODALS, load, render, dialog, modal,
|
||||
formDialog, field, checkbox, dropField, iconButton, gradePill,
|
||||
formDialog, field, checkbox, dropField, iconButton, gradePill, itemPreview,
|
||||
productName, sheetSize, buyer, cnpj, docKind, copyButton, freightWeight,
|
||||
whatsappLink, download, downloadButton, FOLDER, STAGE_FOLDERS, FLOW, kv,
|
||||
orderCode, fileCode, stateName, manifest, contractionRecord and cm. */
|
||||
@@ -627,8 +627,8 @@ function reviewDialog(order){
|
||||
const drops=node('div',undefined,'reviewdrops');drops.append(camCard,drop);
|
||||
const hint=node('p',undefined,'reviewnote');
|
||||
hint.append(svgIcon(IC.info,'i s'),node('span','A foto precisa de pelo menos '+REVIEW_PHOTO_MIN+' px no lado maior.'));
|
||||
const nocam=node('p',undefined,'reviewnote bad');nocam.hidden=true;
|
||||
nocam.append(svgIcon(IC.camera,'i s'),node('span','Este computador não tem câmera. Envie um arquivo, ou faça a revisão pelo celular.'));
|
||||
const nocam=node('p',undefined,'reviewnote');nocam.hidden=true;
|
||||
nocam.append(svgIcon(IC.info,'i s'),node('span','Este computador não tem câmera. Envie um arquivo, ou faça a revisão pelo celular.'));
|
||||
const preview=node('div',undefined,'reviewpreview');preview.hidden=true;
|
||||
const status=node('p','','reviewmsg');status.setAttribute('role','status');status.setAttribute('aria-live','polite');
|
||||
const save=node('button','Salvar revisão','btn pri');save.type='button';save.disabled=true;
|
||||
@@ -769,7 +769,7 @@ function reviewDialog(order){
|
||||
stream=await navigator.mediaDevices.getUserMedia({video:{facingMode:'environment',
|
||||
width:{ideal:1920},height:{ideal:1080}},audio:false});
|
||||
if(closed){endStream();return;}
|
||||
video.srcObject=stream;video.hidden=false;
|
||||
video.srcObject=stream;video.hidden=false;camLabel.hidden=true;camCard.classList.add('live');
|
||||
await video.play().catch(()=>{});
|
||||
controls.hidden=false;
|
||||
photoBtn.focus();
|
||||
@@ -1029,10 +1029,17 @@ function itemCard(order,item,index){
|
||||
const prumoLines=(order.prumo||[]).filter(line=>!multi||line.startsWith(prefix)||line.startsWith('Prova do'))
|
||||
.map(line=>line.startsWith(prefix)?line.slice(prefix.length):line);
|
||||
if(prumoLines.length){
|
||||
const block=node('details',undefined,'prumo');block.append(node('summary','O que o Prumo fez'));
|
||||
const block=node('details',undefined,'prumo idisc');block.append(discSummary('O que o Prumo fez'));
|
||||
prumoLines.forEach(line=>block.append(node('p',line)));
|
||||
notes.append(block);
|
||||
}
|
||||
// The art and its layout on the film, folded under the facts: an item
|
||||
// without a picture gets no empty column (canvas P2).
|
||||
const preview=itemPreview(item);
|
||||
if(preview.children.length){
|
||||
const look=node('details',undefined,'idisc ipreview');look.append(discSummary('Prévia da arte'),preview);
|
||||
notes.append(look);
|
||||
}
|
||||
if(notes.children.length)info.append(notes);
|
||||
const links=node('div',undefined,'links');
|
||||
const dl_=(text,uid)=>{const b=downloadButton(text,download(uid),'btn');return b;};
|
||||
@@ -1041,15 +1048,17 @@ function itemCard(order,item,index){
|
||||
const made=generatedFiles(row);
|
||||
made.forEach((f,k)=>links.append(dl_(made.length>1?'Parte '+(k+1)+' de '+made.length:/\.pdf$/i.test(f.name)?'PDF':'PNG',f.upload_id)));
|
||||
}
|
||||
const originals=node('details',undefined,'originals');originals.append(node('summary','Originais ('+item.uploads.length+')'));
|
||||
const originals=node('details',undefined,'originals');originals.append(discSummary('Originais ('+item.uploads.length+')'));
|
||||
item.uploads.forEach((uid,i)=>originals.append(downloadButton('Original '+(i+1),download(uid,order.id),'btn')));
|
||||
links.append(originals);
|
||||
if(item.uploads.length)links.append(originals);
|
||||
if(row?.status==='ready')links.prepend(checkButton(order));
|
||||
if(may('produce')&&!fix&&['rec','tra'].includes(order.state)&&!waitingProof(order)&&(!row||row.status==='manual'||row.status==='failed'||row.timed_out)){
|
||||
const again=button('Gerar de novo',async()=>{await api('/orders/'+order.id+'/print-files',{});await load();},'btn');again.prepend(svgIcon(IC.refresh,'i m'));links.append(again);}
|
||||
info.append(links);
|
||||
box.append(info);return box;
|
||||
}
|
||||
// A disclosure's summary: the chevron turns when it opens.
|
||||
function discSummary(text){const s=node('summary');s.append(svgIcon(IC.right,'i s'),node('span',text));return s;}
|
||||
// Arquivos: every final, current or replaced, and the way to send a new one.
|
||||
function filesView(order,revisions,view){
|
||||
const out=[];
|
||||
|
||||
Reference in New Issue
Block a user