Merge branch 'main' into fix-front-payments
This commit is contained in:
@@ -447,6 +447,11 @@
|
||||
if (semArquivo) return message(semArquivo+'.','error');
|
||||
const cart = itensAPagar();
|
||||
if (!cart.length) return message('Adicione um item ao pedido.','error');
|
||||
// One item carries at most 200 files (app/core/models.py); a bigger cart
|
||||
// line is refused here, with the reason, never by the generic 422.
|
||||
const semCap=cart.flatMap(line=>line.partes?.length?line.partes:[line]);
|
||||
if (semCap.some(item=>(item.localFiles||[]).length>200))
|
||||
return message('Este item tem mais de 200 arquivos. Divida em dois itens.','error');
|
||||
const initialCart=cartSnapshot();
|
||||
busy = true;
|
||||
$('bPagar').disabled = true;
|
||||
|
||||
Reference in New Issue
Block a user