From b66ff783be7e0d354c56a254e78a4d9ee4f468c5 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 29 Aug 2024 15:29:57 +0200 Subject: [PATCH] feat: CustomerBalance --- src/components/ui/VnUserLink.vue | 12 +++--- src/pages/Customer/Card/CustomerBalance.vue | 7 +--- src/pages/Customer/CustomerList.vue | 42 +++++++++++++++++-- .../components/CustomerSummaryTable.vue | 4 +- 4 files changed, 46 insertions(+), 19 deletions(-) diff --git a/src/components/ui/VnUserLink.vue b/src/components/ui/VnUserLink.vue index b04ea7476..8fb571c80 100644 --- a/src/components/ui/VnUserLink.vue +++ b/src/components/ui/VnUserLink.vue @@ -1,20 +1,18 @@ diff --git a/src/pages/Customer/Card/CustomerBalance.vue b/src/pages/Customer/Card/CustomerBalance.vue index 346e76681..52edecea5 100644 --- a/src/pages/Customer/Card/CustomerBalance.vue +++ b/src/pages/Customer/Card/CustomerBalance.vue @@ -95,12 +95,7 @@ const columns = computed(() => [ label: t('Employee'), columnField: { component: 'userLink', - attrs: ({ row }) => { - return { - workerId: row.workerFk, - name: row.userName, - }; - }, + attrs: ({ row }) => ({ workerId: row.workerFk, tag: row.userName }), }, cardVisible: true, }, diff --git a/src/pages/Customer/CustomerList.vue b/src/pages/Customer/CustomerList.vue index 25cac5361..e0a786174 100644 --- a/src/pages/Customer/CustomerList.vue +++ b/src/pages/Customer/CustomerList.vue @@ -2,6 +2,7 @@ import { ref, computed, markRaw } from 'vue'; import { useI18n } from 'vue-i18n'; import { useRouter } from 'vue-router'; +import VnSelect from 'src/components/common/VnSelect.vue'; import VnTable from 'components/VnTable/VnTable.vue'; import VnLocation from 'src/components/common/VnLocation.vue'; import VnSearchbar from 'components/ui/VnSearchbar.vue'; @@ -69,7 +70,7 @@ const columns = computed(() => [ optionFilter: 'firstName', useLike: false, }, - create: true, + create: false, columnField: { component: null, }, @@ -195,6 +196,8 @@ const columns = computed(() => [ component: 'select', attrs: { url: 'BusinessTypes', + fields: ['code', 'description'], + sortBy: 'description ASC ', optionLabel: 'description', optionValue: 'code', }, @@ -357,7 +360,7 @@ const columns = computed(() => [ isPrimary: true, }, { - title: t('Client ticket list'), + title: t('Preview'), icon: 'preview', isPrimary: true, action: (row) => viewSummary(row.id, CustomerSummary), @@ -400,7 +403,7 @@ function handleLocation(data, location) { url="Clients/filter" :create="{ urlCreate: 'Clients/createWithUser', - title: 'Create client', + title: t('globals.pageTitles.customerCreate'), onDataSaved: ({ id }) => tableRef.redirect(id), formInitialData: { active: true, @@ -413,6 +416,39 @@ function handleLocation(data, location) { auto-load >