fix: "Criar pedido de teste" works again, and the quote list is wider
All checks were successful
Build and deploy / Validate source (push) Successful in 12s
Build and deploy / Integration suite on a real stack (push) Successful in 3m22s
Build and deploy / Secret scan and release gate (push) Successful in 7s
Build and deploy / Publish images (push) Successful in 1m8s
All checks were successful
Build and deploy / Validate source (push) Successful in 12s
Build and deploy / Integration suite on a real stack (push) Successful in 3m22s
Build and deploy / Secret scan and release gate (push) Successful in 7s
Build and deploy / Publish images (push) Successful in 1m8s
A checkbox label named `confirm` in the quote panel hid window.confirm from the test-order button, which failed with "can't access lexical declaration 'confirm' before initialization". The quote list takes about a third of the screen (up to 640 px) and cuts long e-mails with an ellipsis. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -153,7 +153,8 @@ main{padding:0 24px 24px}
|
||||
/* Quotes */
|
||||
#tab-quotes{padding-top:18px}
|
||||
.split{display:flex;gap:0;border:1px solid var(--line);border-radius:12px;overflow:hidden;min-height:calc(100vh - 140px)}
|
||||
.split .list{width:460px;flex-shrink:0;border-right:1px solid var(--line);padding:16px;display:flex;flex-direction:column;gap:12px;background:#111316}
|
||||
/* About a third of the screen: the rows carry a picture, the customer and the price. */
|
||||
.split .list{width:clamp(460px,34vw,640px);flex-shrink:0;border-right:1px solid var(--line);padding:16px;display:flex;flex-direction:column;gap:12px;background:#111316}
|
||||
.qitem{text-align:left;display:flex;align-items:center;gap:12px;padding:12px;border-radius:10px;border:1px solid var(--line2);background:var(--card);width:100%}
|
||||
.qitem .qmain{flex:1;min-width:0}
|
||||
.qitem .qmain>span{display:block}
|
||||
@@ -163,7 +164,7 @@ main{padding:0 24px 24px}
|
||||
.chips.small{gap:6px}
|
||||
.chips.small .chip{height:30px;padding:0 10px;font-size:13px}
|
||||
.qitem[aria-current=true]{border-color:var(--accent);background:#1F1A15}
|
||||
.qitem b{display:block;font-size:14.5px;overflow-wrap:anywhere}
|
||||
.qitem b{display:block;font-size:14.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
||||
.qitem span{font-size:13.5px;color:var(--muted)}
|
||||
.qitem .right{text-align:right;flex-shrink:0}
|
||||
.qitem .flag{display:block;color:var(--warn);font-weight:600;margin-top:4px}
|
||||
|
||||
@@ -490,7 +490,8 @@ function renderQuotes(){
|
||||
else currentQuote=quoteRows.find(q=>q.id===currentQuote.id)||currentQuote;
|
||||
const list=quoteRows.map(q=>{
|
||||
const b=node('button',undefined,'qitem');b.type='button';b.dataset.quotePick=q.id;b.setAttribute('aria-current',String(q.id===currentQuote?.id));
|
||||
const left=node('div',undefined,'qmain');left.append(node('b',q.draft.customer.mail),
|
||||
const mail=node('b',q.draft.customer.mail);mail.title=q.draft.customer.mail;
|
||||
const left=node('div',undefined,'qmain');left.append(mail,
|
||||
node('span',q.draft.items.map(i=>SHORT[i.mode]).join(' + ')+' · '+metres(quoteMetres(q))));
|
||||
if(q.draft.items.some(i=>i.production?.version!==2))left.append(node('span','Montagem antiga: peça nova cotação','flag'));
|
||||
else if(q.draft.items.some(i=>i.quality_status==='warning'))left.append(node('span','Ressalva de resolução aceita pelo cliente','flag'));
|
||||
@@ -541,9 +542,11 @@ function review(quote){
|
||||
const edits=quote.draft.items.map(item=>{const fields={};content.append(quoteItem(item,fields));
|
||||
return ()=>({...item,metres:fields.metres.value,grade:Number(fields.grade.value)});});
|
||||
const check=node('input');check.type='checkbox';check.required=true;
|
||||
const confirm=node('label',undefined,'check');confirm.append(check,'Arquivos, metragem e nota conferidos');
|
||||
// Not "confirm": that name in this function hid window.confirm from the
|
||||
// test-order button above, which then failed before asking anything.
|
||||
const checked=node('label',undefined,'check');checked.append(check,'Arquivos, metragem e nota conferidos');
|
||||
const submit=node('button','Aprovar cotação','btn primary');
|
||||
foot.append(confirm,submit);
|
||||
foot.append(checked,submit);
|
||||
form.append(content,foot);
|
||||
form.onsubmit=async e=>{e.preventDefault();submit.disabled=true;
|
||||
try{const approved=await api('/quotes/'+quote.id+'/approve',{items:edits.map(fn=>fn())});
|
||||
|
||||
Reference in New Issue
Block a user