fix: refs #6696 handle optional chaining and ensure async operations in TicketSale components

This commit is contained in:
Javi Gallego 2025-04-06 13:26:33 +02:00
parent 85f74e5ad8
commit d637ca9785
2 changed files with 4 additions and 6 deletions

View File

@ -183,7 +183,7 @@ const sumRisk = ({ clientRisks }) => {
/> />
<VnLv <VnLv
:label="t('customer.summary.payMethod')" :label="t('customer.summary.payMethod')"
:value="entity.payMethod.name" :value="entity.payMethod?.name"
/> />
<VnLv :label="t('customer.summary.bankAccount')" :value="entity.iban" /> <VnLv :label="t('customer.summary.bankAccount')" :value="entity.iban" />
<VnLv :label="t('customer.summary.dueDay')" :value="entity.dueDay" /> <VnLv :label="t('customer.summary.dueDay')" :value="entity.dueDay" />

View File

@ -186,8 +186,8 @@ const getRowUpdateInputEvents = (sale) => {
}; };
const resetChanges = async () => { const resetChanges = async () => {
arrayData.fetch({ append: false }); await arrayData.fetch({ append: false });
tableRef.value.reload(); await tableRef.value.reload();
selectedRows.value = []; selectedRows.value = [];
}; };
const changeQuantity = async (sale) => { const changeQuantity = async (sale) => {
@ -302,10 +302,8 @@ const updatePrice = async (sale, newPrice) => {
newPrice: newPrice, newPrice: newPrice,
componentId: componentId.value, componentId: componentId.value,
}); });
sale.price = newPrice;
edit.value = { ...DEFAULT_EDIT };
notify('globals.dataSaved', 'positive'); notify('globals.dataSaved', 'positive');
resetChanges(); await resetChanges();
}; };
const changeDiscount = async (sale) => { const changeDiscount = async (sale) => {