Merge pull request 'HOTFIX: TicketSale refresh panel data' (!1499) from hotfix_ticketSale_updatePanel into master
gitea/salix-front/pipeline/head This commit looks good Details

Reviewed-on: #1499
Reviewed-by: Jon Elias <jon@verdnatura.es>
This commit is contained in:
Javier Segarra 2025-02-26 11:35:58 +00:00
commit 56e71b01d3
1 changed files with 5 additions and 5 deletions

View File

@ -202,7 +202,7 @@ const updateQuantity = async (sale) => {
sale.isNew = false;
await axios.post(`Sales/${id}/updateQuantity`, { quantity });
notify('globals.dataSaved', 'positive');
tableRef.value.reload();
resetChanges();
} catch (e) {
const { quantity } = tableRef.value.CrudModelRef.originalData.find(
(s) => s.id === sale.id,
@ -246,7 +246,7 @@ const updateConcept = async (sale) => {
const data = { newConcept: sale.concept };
await axios.post(`Sales/${sale.id}/updateConcept`, data);
notify('globals.dataSaved', 'positive');
tableRef.value.reload();
resetChanges();
};
const DEFAULT_EDIT = {
@ -297,7 +297,7 @@ const updatePrice = async (sale, newPrice) => {
sale.price = newPrice;
edit.value = { ...DEFAULT_EDIT };
notify('globals.dataSaved', 'positive');
tableRef.value.reload();
resetChanges();
};
const changeDiscount = async (sale) => {
@ -329,7 +329,7 @@ const updateDiscount = async (sales, newDiscount = null) => {
};
await axios.post(`Tickets/${route.params.id}/updateDiscount`, params);
notify('globals.dataSaved', 'positive');
tableRef.value.reload();
resetChanges();
};
const getNewPrice = computed(() => {
@ -397,7 +397,7 @@ const removeSales = async () => {
await axios.post('Sales/deleteSales', params);
removeSelectedSales();
notify('globals.dataSaved', 'positive');
window.location.reload();
resetChanges();
};
const setTransferParams = async () => {