From 2c86fb17f14ccdb8383198f22cc1f7bbdee97511 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 24 Dec 2024 12:16:46 +0100 Subject: [PATCH] fix: fix some filters --- src/pages/Customer/CustomerList.vue | 45 ++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/src/pages/Customer/CustomerList.vue b/src/pages/Customer/CustomerList.vue index a8e5f1714..89a0f5986 100644 --- a/src/pages/Customer/CustomerList.vue +++ b/src/pages/Customer/CustomerList.vue @@ -2,15 +2,16 @@ import { ref, computed, markRaw } from 'vue'; import { useI18n } from 'vue-i18n'; import { useRouter } from 'vue-router'; +import { useSummaryDialog } from 'src/composables/useSummaryDialog'; +import { toDate } from 'src/filters'; + +import RightMenu from 'src/components/common/RightMenu.vue'; +import CustomerSummary from './Card/CustomerSummary.vue'; +import CustomerFilter from './CustomerFilter.vue'; import VnTable from 'components/VnTable/VnTable.vue'; import VnLocation from 'src/components/common/VnLocation.vue'; import VnSearchbar from 'components/ui/VnSearchbar.vue'; -import CustomerSummary from './Card/CustomerSummary.vue'; -import { useSummaryDialog } from 'src/composables/useSummaryDialog'; -import RightMenu from 'src/components/common/RightMenu.vue'; import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue'; -import { toDate } from 'src/filters'; -import CustomerFilter from './CustomerFilter.vue'; import VnSelectWorker from 'src/components/common/VnSelectWorker.vue'; const { t } = useI18n(); @@ -193,6 +194,9 @@ const columns = computed(() => [ name: 'businessTypeFk', create: true, component: 'select', + columnFilter: { + inWhere: true, + }, attrs: { url: 'BusinessTypes', fields: ['code', 'description'], @@ -221,7 +225,7 @@ const columns = computed(() => [ { align: 'left', label: t('customer.extendedList.tableVisibleColumns.sageTaxTypeFk'), - name: 'sageTaxTypeFk', + name: 'CodigoIva', columnFilter: { component: 'select', attrs: { @@ -236,7 +240,7 @@ const columns = computed(() => [ { align: 'left', label: t('customer.extendedList.tableVisibleColumns.sageTransactionTypeFk'), - name: 'sageTransactionTypeFk', + name: 'CodigoTransaccion', columnFilter: { component: 'select', attrs: { @@ -405,6 +409,7 @@ function handleLocation(data, location) { ref="tableRef" data-key="CustomerList" url="Clients/extendedListFilter" + order="id DESC" :create="{ urlCreate: 'Clients/createWithUser', title: t('globals.pageTitles.customerCreate'), @@ -414,10 +419,9 @@ function handleLocation(data, location) { isEqualizated: false, }, }" - order="id DESC" :columns="columns" - redirect="customer" :right-search="false" + redirect="customer" >