Merge pull request 'fix: fix ticketSale quantity' (!1251) from hotfix-7356ticketSale into master
gitea/salix-front/pipeline/head This commit looks good Details

Reviewed-on: #1251
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
Carlos Satorres 2025-01-20 11:11:48 +00:00
commit c333428389
1 changed files with 3 additions and 4 deletions

View File

@ -54,7 +54,6 @@ const transfer = ref({
});
const tableRef = ref([]);
const canProceed = ref();
const isLoading = ref(false);
watch(
() => route.params.id,
@ -197,6 +196,7 @@ const changeQuantity = async (sale) => {
try {
if (!rowToUpdate.value) return;
rowToUpdate.value = null;
sale.isNew = false;
await updateQuantity(sale);
} catch (e) {
const { quantity } = tableRef.value.CrudModelRef.originalData.find(
@ -214,9 +214,6 @@ const updateQuantity = async ({ quantity, id }) => {
};
const addSale = async (sale) => {
if (isLoading.value) return;
isLoading.value = true;
const params = {
barcode: sale.itemFk,
quantity: sale.quantity,
@ -237,6 +234,7 @@ const addSale = async (sale) => {
sale.item = newSale.item;
notify('globals.dataSaved', 'positive');
sale.isNew = false;
arrayData.fetch({});
};
@ -754,6 +752,7 @@ watch(
option-label="name"
option-value="id"
v-model="row.itemFk"
:use-like="false"
@update:model-value="updateItem(row)"
>
<template #option="scope">