fix: checkout and the Kanban take layout version 3
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 3m9s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 1m20s

The layout rule of 2026-10-21 records version 3, but checkout still
refused any item not on version 2, so no order could be quoted (CI's
browser test timed out at the upload), and the Kanban marked new quotes
"Montagem antiga". Both now take versions 2 and 3, as the server does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-10-22 17:05:35 -03:00
parent c8c49ed57e
commit f6bdbe006e
2 changed files with 6 additions and 3 deletions

View File

@@ -311,7 +311,8 @@
uploads.push(await upload(file));
enviaFoto(uploads[index], item.fotos?.[index]);
}
if (item.production?.version!==2 || item.production.sources?.length!==uploads.length)
// Layout versions the server takes: 3 since 2026-10-21, 2 for a cart saved before.
if (![2,3].includes(item.production?.version) || item.production.sources?.length!==uploads.length)
throw new Error('A montagem deste item precisa ser refeita antes da cotação.');
items.push({mode:item.modo, metres:String(item.metros), grade:item.nota, uploads,
production:{...item.production,sources:item.production.sources.map((source,index)=>({