diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index cfb0ea1d9..9327dcd39 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -684,8 +684,10 @@ const handleHeaderSelection = (evt, data) => { ref="CrudModelRef" @on-fetch=" (...args) => { - selectAll = false; - selected = []; + if ($props.multiCheck.expand) { + selectAll = false; + selected = []; + } emit('onFetch', ...args); } " diff --git a/src/components/common/VnCheckboxMenu.vue b/src/components/common/VnCheckboxMenu.vue index 1752897c6..5870facd2 100644 --- a/src/components/common/VnCheckboxMenu.vue +++ b/src/components/common/VnCheckboxMenu.vue @@ -30,7 +30,7 @@ const onClick = async () => { params: { filter: JSON.stringify(filter) }, }; try { - const { data } = axios.get(props.url, params); + const { data } = await axios.get(props.url, params); rows.value = data; } catch (error) { const response = error.response; @@ -83,7 +83,7 @@ defineEmits(['update:selected', 'select:all']); /> diff --git a/src/components/ui/VnUserLink.vue b/src/components/ui/VnUserLink.vue index 9a25852b3..893d2d31a 100644 --- a/src/components/ui/VnUserLink.vue +++ b/src/components/ui/VnUserLink.vue @@ -12,6 +12,7 @@ const $props = defineProps({ const isWorker = ref(false); onMounted(async () => { + if (!$props.workerId) return; try { const { data: { exists }, diff --git a/src/pages/Customer/Card/CustomerConsumption.vue b/src/pages/Customer/Card/CustomerConsumption.vue index 8ae76acec..290af3f8a 100644 --- a/src/pages/Customer/Card/CustomerConsumption.vue +++ b/src/pages/Customer/Card/CustomerConsumption.vue @@ -165,7 +165,6 @@ const updateDateParams = (value, params) => { v-if="campaignList" data-key="CustomerConsumption" url="Clients/consumption" - :order="['itemTypeFk', 'itemName', 'itemSize', 'description']" :filter="{ where: { clientFk: route.params.id } }" :columns="columns" search-url="consumption" diff --git a/src/pages/Customer/components/CustomerNewPayment.vue b/src/pages/Customer/components/CustomerNewPayment.vue index b41b1ce8c..eb56f5fd2 100644 --- a/src/pages/Customer/components/CustomerNewPayment.vue +++ b/src/pages/Customer/components/CustomerNewPayment.vue @@ -130,20 +130,22 @@ async function onDataSaved(formData, { id }) { } } -async function getSupplierClientReferences(value) { - if (!value) return (initialData.description = ''); - const params = { bankAccount: value }; - const { data } = await axios(`Clients/getClientOrSupplierReference`, { params }); - if (!data.clientId) { - initialData.description = t('Supplier Compensation Reference', { - supplierId: data.supplierId, - supplierName: data.supplierName, +async function getSupplierClientReferences(data) { + if (!data) return (initialData.description = ''); + const params = { bankAccount: data.compensationAccount }; + const { data: reference } = await axios(`Clients/getClientOrSupplierReference`, { + params, + }); + if (reference.supplierId) { + data.description = t('Supplier Compensation Reference', { + supplierId: reference.supplierId, + supplierName: reference.supplierName, }); return; } - initialData.description = t('Client Compensation Reference', { - clientId: data.clientId, - clientName: data.clientName, + data.description = t('Client Compensation Reference', { + clientId: reference.clientId, + clientName: reference.clientName, }); } @@ -252,7 +254,7 @@ async function getAmountPaid() { :label="t('Compensation account')" clearable v-model="data.compensationAccount" - @blur="getSupplierClientReferences(data.compensationAccount)" + @blur="getSupplierClientReferences(data)" /> @@ -288,6 +290,9 @@ async function getAmountPaid() { +en: + Supplier Compensation Reference: ({supplierId}) Ntro Proveedor {supplierName} + Client Compensation Reference: ({clientId}) Ntro Cliente {clientName} es: New payment: AƱadir pago Date: Fecha