From d82372c0a98dc3571529263a3ad9e9293a551ca7 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 2 May 2024 17:13:53 +0200 Subject: [PATCH 01/28] feat: refs #6449 show summaryId --- src/components/common/VnLog.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/common/VnLog.vue b/src/components/common/VnLog.vue index 340a9e550..c8d69307e 100644 --- a/src/components/common/VnLog.vue +++ b/src/components/common/VnLog.vue @@ -49,6 +49,7 @@ const filter = { 'changedModelId', 'changedModelValue', 'description', + 'summaryId', ], include: [ { @@ -455,12 +456,12 @@ setLogTree(); :style="{ backgroundColor: useColor(modelLog.model), }" - :title="modelLog.model" + :title="`${modelLog.model} #${modelLog.id}`" > {{ t(modelLog.modelI18n) }} - #{{ modelLog.id }}#{{ modelLog.summaryId }} {{ modelLog.showValue }} From aaee96d6bb4ddcb693d9801b50b1af9fcc42e712 Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 26 Jun 2024 15:09:26 +0200 Subject: [PATCH 02/28] refs #7366 VnTable --- src/i18n/locale/en.yml | 10 ++ src/i18n/locale/es.yml | 10 ++ src/pages/Travel/TravelList.vue | 245 +++++++++++++++++--------------- 3 files changed, 147 insertions(+), 118 deletions(-) diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index fbab06966..5ebd50649 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -1144,6 +1144,16 @@ travel: basicData: Basic data history: Log thermographs: Thermograph + travelList: + tableVisibleColumns: + id: Id + ref: Reference + agency: Agency + shipped: Shipped + landed: Landed + warehouseIn: Warehouse in + warehouseOut: Warehouse out + totalEntries: Total entries summary: confirmed: Confirmed entryId: Entry Id diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index fec78d5e6..cecca86da 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -1132,6 +1132,16 @@ travel: basicData: Datos básicos history: Historial thermographs: Termógrafos + travelList: + tableVisibleColumns: + id: Id + ref: Referencia + agency: Agencia + shipped: Enviado + landed: Llegada + warehouseIn: Almacén de salida + warehouseOut: Almacén de entrada + totalEntries: Total de entradas summary: confirmed: Confirmado entryId: Id entrada diff --git a/src/pages/Travel/TravelList.vue b/src/pages/Travel/TravelList.vue index e6696b26f..eca79d690 100644 --- a/src/pages/Travel/TravelList.vue +++ b/src/pages/Travel/TravelList.vue @@ -2,19 +2,12 @@ import { onMounted, ref } from 'vue'; import { useI18n } from 'vue-i18n'; import { useRouter } from 'vue-router'; -import VnPaginate from 'src/components/ui/VnPaginate.vue'; -import CardList from 'src/components/ui/CardList.vue'; -import VnLv from 'src/components/ui/VnLv.vue'; -import TravelSummary from './Card/TravelSummary.vue'; -import TravelFilter from './TravelFilter.vue'; -import FetchData from 'components/FetchData.vue'; -import VnSearchbar from 'src/components/ui/VnSearchbar.vue'; - import { useStateStore } from 'stores/useStateStore'; -import { toDate } from 'src/filters/index'; +import VnTable from 'components/VnTable/VnTable.vue'; import { useSummaryDialog } from 'src/composables/useSummaryDialog'; -import { getDateQBadgeColor } from 'src/composables/getDateQBadgeColor.js'; -import RightMenu from 'src/components/common/RightMenu.vue'; + +import { computed } from 'vue'; +import TravelSummary from './Card/TravelSummary.vue'; const router = useRouter(); const { t } = useI18n(); @@ -47,118 +40,134 @@ const getWarehouseName = (id) => { onMounted(async () => { stateStore.rightDrawer = true; }); + +const columns = computed(() => [ + { + align: 'left', + name: 'id', + label: t('travel.travelList.tableVisibleColumns.id'), + isId: true, + field: 'id', + cardVisible: true, + }, + { + align: 'left', + name: 'ref', + label: t('travel.travelList.tableVisibleColumns.ref'), + field: 'ref', + component: 'input', + cardVisible: true, + create: true, + }, + { + align: 'left', + name: 'agencyModeFk', + label: t('travel.travelList.tableVisibleColumns.agency'), + field: 'agencyModeFk', + component: 'select', + attrs: { + url: 'agencyModes', + fields: ['id', 'name'], + }, + cardVisible: true, + create: true, + }, + { + align: 'left', + name: 'shipped', + label: t('travel.travelList.tableVisibleColumns.shipped'), + field: 'shipped', + component: 'date', + cardVisible: true, + create: true, + }, + { + align: 'left', + name: 'landed', + label: t('travel.travelList.tableVisibleColumns.landed'), + field: 'landed', + component: 'date', + cardVisible: true, + create: true, + }, + { + align: 'left', + name: 'warehouseInFk', + label: t('travel.travelList.tableVisibleColumns.warehouseIn'), + field: 'warehouseInFk', + component: 'select', + attrs: { + url: 'warehouses', + fields: ['id', 'name'], + }, + cardVisible: true, + create: true, + }, + { + align: 'left', + name: 'warehouseOutFk', + label: t('travel.travelList.tableVisibleColumns.warehouseOut'), + field: 'warehouseOutFk', + component: 'select', + attrs: { + url: 'warehouses', + fields: ['id', 'name'], + }, + cardVisible: true, + create: true, + }, + { + align: 'left', + name: 'totalEntries', + label: t('travel.travelList.tableVisibleColumns.totalEntries'), + field: 'totalEntries', + component: 'input', + cardVisible: true, + create: true, + }, + { + align: 'right', + label: '', + name: 'tableActions', + actions: [ + { + title: t('Clone'), + icon: 'vn:ticket', + action: cloneTravel, + isPrimary: true, + }, + { + title: t('Add entry'), + icon: 'preview', + action: (row) => viewSummary(row.id, TravelSummary), + }, + ], + }, +]); From 95a9805a842cc802059c33f65534cf32b3d60878 Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 27 Jun 2024 09:53:42 +0200 Subject: [PATCH 03/28] refs #7366 fix icons actions --- src/pages/Travel/TravelList.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/Travel/TravelList.vue b/src/pages/Travel/TravelList.vue index eca79d690..1e616a937 100644 --- a/src/pages/Travel/TravelList.vue +++ b/src/pages/Travel/TravelList.vue @@ -132,14 +132,14 @@ const columns = computed(() => [ actions: [ { title: t('Clone'), - icon: 'vn:ticket', + icon: 'vn:clone', action: cloneTravel, isPrimary: true, }, { title: t('Add entry'), - icon: 'preview', - action: (row) => viewSummary(row.id, TravelSummary), + icon: 'contact_support', + action: redirectCreateEntryView, }, ], }, From 99628d2cf83a7869a41387f556888ecf37a9766a Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 27 Jun 2024 10:08:17 +0200 Subject: [PATCH 04/28] refs #7366 remove code --- src/pages/Travel/TravelList.vue | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/pages/Travel/TravelList.vue b/src/pages/Travel/TravelList.vue index 1e616a937..e77c95ac2 100644 --- a/src/pages/Travel/TravelList.vue +++ b/src/pages/Travel/TravelList.vue @@ -7,19 +7,13 @@ import VnTable from 'components/VnTable/VnTable.vue'; import { useSummaryDialog } from 'src/composables/useSummaryDialog'; import { computed } from 'vue'; -import TravelSummary from './Card/TravelSummary.vue'; const router = useRouter(); const { t } = useI18n(); const stateStore = useStateStore(); -const { viewSummary } = useSummaryDialog(); const warehouses = ref([]); -const navigateToTravelId = (id) => { - router.push({ path: `/travel/${id}` }); -}; - const cloneTravel = (travelData) => { const stringifiedTravelData = JSON.stringify(travelData); redirectToCreateView(stringifiedTravelData); From 4dd1ed3a3dba69f8f06034b160055feadae79ed4 Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 27 Jun 2024 10:12:04 +0200 Subject: [PATCH 05/28] refs #7366 remove summary --- src/pages/Travel/TravelList.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/Travel/TravelList.vue b/src/pages/Travel/TravelList.vue index e77c95ac2..2b2af9dbf 100644 --- a/src/pages/Travel/TravelList.vue +++ b/src/pages/Travel/TravelList.vue @@ -4,7 +4,6 @@ import { useI18n } from 'vue-i18n'; import { useRouter } from 'vue-router'; import { useStateStore } from 'stores/useStateStore'; import VnTable from 'components/VnTable/VnTable.vue'; -import { useSummaryDialog } from 'src/composables/useSummaryDialog'; import { computed } from 'vue'; From f93929de6a52d243e5d7886c6aa167348f59e19c Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 27 Jun 2024 13:01:00 +0200 Subject: [PATCH 06/28] refs #6897 vnTable, columns --- src/pages/Entry/EntryList.vue | 166 +++++++++++++++++----------------- 1 file changed, 82 insertions(+), 84 deletions(-) diff --git a/src/pages/Entry/EntryList.vue b/src/pages/Entry/EntryList.vue index e5d37900c..715b4dcd2 100644 --- a/src/pages/Entry/EntryList.vue +++ b/src/pages/Entry/EntryList.vue @@ -1,15 +1,12 @@ From 8ec51ff8fdad3d335abb3506ee9881a7544e5a3e Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 28 Jun 2024 09:01:28 +0200 Subject: [PATCH 09/28] refs #6897 fix columns --- src/pages/Entry/EntryLatestBuys.vue | 515 +++++----------------------- 1 file changed, 93 insertions(+), 422 deletions(-) diff --git a/src/pages/Entry/EntryLatestBuys.vue b/src/pages/Entry/EntryLatestBuys.vue index ecb5b7f22..6b4b41dc4 100644 --- a/src/pages/Entry/EntryLatestBuys.vue +++ b/src/pages/Entry/EntryLatestBuys.vue @@ -4,29 +4,16 @@ import { useI18n } from 'vue-i18n'; import { useRouter } from 'vue-router'; import VnTable from 'components/VnTable/VnTable.vue'; -import VnInput from 'src/components/common/VnInput.vue'; -import VnSelect from 'src/components/common/VnSelect.vue'; import { useStateStore } from 'stores/useStateStore'; -import { toDate, toCurrency } from 'src/filters'; -// import { useSession } from 'composables/useSession'; -import { dashIfEmpty } from 'src/filters'; import { useArrayData } from 'composables/useArrayData'; const router = useRouter(); -// const { getTokenMultimedia } = useSession(); -// const token = getTokenMultimedia(); const stateStore = useStateStore(); const { t } = useI18n(); const rowsFetchDataRef = ref(null); -const itemTypesOptions = ref([]); -const originsOptions = ref([]); -const itemFamiliesOptions = ref([]); -const intrastatOptions = ref([]); -const packagingsOptions = ref([]); const editTableCellDialogRef = ref(null); -const visibleColumns = ref([]); const allColumnNames = ref([]); const exprBuilder = (param, value) => { @@ -88,470 +75,154 @@ const getInputEvents = (col) => { const columns = computed(() => [ { - label: t('entry.latestBuys.picture'), + label: t('entry.latestBuys.tableVisibleColumns.picture'), name: 'picture', - align: 'left', }, { - label: t('entry.latestBuys.itemFk'), + align: 'left', + label: t('entry.latestBuys.tableVisibleColumns.itemFk'), name: 'itemFk', - field: 'itemFk', - align: 'left', - sortable: true, - columnFilter: { - component: VnInput, - type: 'text', - filterValue: null, - event: getInputEvents, - attrs: { - dense: true, - }, - }, + isTitle: true, }, { - label: t('entry.latestBuys.packing'), - field: 'packing', + align: 'left', + label: t('entry.latestBuys.tableVisibleColumns.packing'), name: 'packing', - align: 'left', - sortable: true, - columnFilter: { - component: VnInput, - type: 'text', - filterValue: null, - event: getInputEvents, - attrs: { - dense: true, - }, - }, - format: (val) => dashIfEmpty(val), }, { - label: t('entry.latestBuys.grouping'), - field: 'grouping', + align: 'left', + label: t('entry.latestBuys.tableVisibleColumns.grouping'), name: 'grouping', - align: 'left', - sortable: true, - columnFilter: { - component: VnInput, - type: 'text', - filterValue: null, - event: getInputEvents, - attrs: { - dense: true, - }, - }, - format: (val) => dashIfEmpty(val), }, { - label: t('entry.latestBuys.quantity'), - field: 'quantity', + align: 'left', + label: t('entry.latestBuys.tableVisibleColumns.quantity'), name: 'quantity', - align: 'left', - sortable: true, - columnFilter: { - component: VnInput, - type: 'text', - filterValue: null, - event: getInputEvents, - attrs: { - dense: true, - }, - }, }, { - label: t('entry.latestBuys.description'), - field: 'description', + align: 'left', + label: t('entry.latestBuys.tableVisibleColumns.description'), name: 'description', - align: 'left', - sortable: true, - columnFilter: { - component: VnInput, - type: 'text', - filterValue: null, - event: getInputEvents, - attrs: { - dense: true, - }, - }, - format: (val) => dashIfEmpty(val), + }, { - label: t('entry.latestBuys.size'), - field: 'size', + align: 'left', + label: t('entry.latestBuys.tableVisibleColumns.size'), name: 'size', - align: 'left', - sortable: true, - columnFilter: { - component: VnInput, - type: 'text', - filterValue: null, - event: getInputEvents, - attrs: { - dense: true, - }, - }, + }, { - label: t('entry.latestBuys.tags'), + align: 'left', + label: t('entry.latestBuys.tableVisibleColumns.tags'), name: 'tags', - align: 'left', - columnFilter: { - component: VnInput, - type: 'text', - filterValue: null, - event: getInputEvents, - attrs: { - dense: true, - }, - }, + }, { - label: t('entry.latestBuys.type'), - field: 'code', + align: 'left', + label: t('entry.latestBuys.tableVisibleColumns.type'), name: 'type', - align: 'left', - sortable: true, - columnFilter: { - component: VnSelect, - type: 'select', - filterValue: null, - event: getInputEvents, - attrs: { - options: itemTypesOptions.value, - 'option-value': 'code', - 'option-label': 'code', - dense: true, - }, - }, + }, { - label: t('entry.latestBuys.intrastat'), - field: 'intrastat', + align: 'left', + label: t('entry.latestBuys.tableVisibleColumns.intrastat'), name: 'intrastat', - align: 'left', - sortable: true, - columnFilter: { - component: VnSelect, - type: 'select', - filterValue: null, - event: getInputEvents, - attrs: { - options: intrastatOptions.value, - 'option-value': 'description', - 'option-label': 'description', - dense: true, - }, - }, + }, { - label: t('entry.latestBuys.origin'), - field: 'origin', + align: 'left', + label: t('entry.latestBuys.tableVisibleColumns.origin'), name: 'origin', - align: 'left', - sortable: true, - columnFilter: { - component: VnSelect, - type: 'select', - filterValue: null, - event: getInputEvents, - attrs: { - options: originsOptions.value, - 'option-value': 'code', - 'option-label': 'code', - dense: true, - }, - }, }, { - label: t('entry.latestBuys.weightByPiece'), - field: 'weightByPiece', + + align: 'left', + label: t('entry.latestBuys.tableVisibleColumns.weightByPiece'), name: 'weightByPiece', - align: 'left', - sortable: true, - columnFilter: { - component: VnInput, - type: 'text', - filterValue: null, - event: getInputEvents, - attrs: { - dense: true, - }, - }, - - format: (val) => dashIfEmpty(val), }, { - label: t('entry.latestBuys.isActive'), - field: 'isActive', + align: 'left', + label: t('entry.latestBuys.tableVisibleColumns.isActive'), name: 'isActive', - align: 'left', - sortable: true, - columnFilter: { - component: VnInput, - type: 'text', - filterValue: null, - event: getInputEvents, - attrs: { - dense: true, - }, - }, - }, - { - label: t('entry.latestBuys.family'), - field: 'family', - name: 'family', - align: 'left', - sortable: true, - columnFilter: { - component: VnSelect, - type: 'select', - filterValue: null, - event: getInputEvents, - attrs: { - options: itemFamiliesOptions.value, - 'option-value': 'code', - 'option-label': 'code', - dense: true, - }, - }, - }, - { - label: t('entry.latestBuys.entryFk'), - field: 'entryFk', - name: 'entryFk', - align: 'left', - sortable: true, - columnFilter: { - component: VnInput, - type: 'text', - filterValue: null, - event: getInputEvents, - attrs: { - dense: true, - }, - }, - }, - { - label: t('entry.latestBuys.buyingValue'), - field: 'buyingValue', - name: 'buyingValue', - align: 'left', - sortable: true, - columnFilter: { - component: VnInput, - type: 'text', - filterValue: null, - event: getInputEvents, - attrs: { - dense: true, - }, - }, - format: (val) => toCurrency(val), - }, - { - label: t('entry.latestBuys.freightValue'), - field: 'freightValue', - name: 'freightValue', - align: 'left', - sortable: true, - columnFilter: { - component: VnInput, - type: 'text', - filterValue: null, - event: getInputEvents, - attrs: { - dense: true, - }, - }, - format: (val) => toCurrency(val), - }, - { - label: t('entry.latestBuys.comissionValue'), - field: 'comissionValue', - name: 'comissionValue', - align: 'left', - sortable: true, - columnFilter: { - component: VnInput, - type: 'text', - filterValue: null, - event: getInputEvents, - attrs: { - dense: true, - }, - }, - format: (val) => toCurrency(val), - }, - { - label: t('entry.latestBuys.packageValue'), - field: 'packageValue', - name: 'packageValue', - align: 'left', - sortable: true, - columnFilter: { - component: VnInput, - type: 'text', - filterValue: null, - event: getInputEvents, - attrs: { - dense: true, - }, - }, - format: (val) => toCurrency(val), - }, - { - label: t('entry.latestBuys.isIgnored'), - field: 'isIgnored', - name: 'isIgnored', - align: 'left', - sortable: true, - columnFilter: { - component: VnInput, - type: 'text', - filterValue: null, - event: getInputEvents, - attrs: { - dense: true, - }, - }, - }, - { - label: t('entry.latestBuys.price2'), - field: 'price2', - name: 'price2', - align: 'left', - sortable: true, - columnFilter: { - component: VnInput, - type: 'text', - filterValue: null, - event: getInputEvents, - attrs: { - dense: true, - }, - }, - format: (val) => toCurrency(val), }, { - label: t('entry.latestBuys.price3'), - field: 'price3', - name: 'price3', align: 'left', - sortable: true, - columnFilter: { - component: VnInput, - type: 'text', - filterValue: null, - event: getInputEvents, - attrs: { - dense: true, - }, - }, - format: (val) => toCurrency(val), + label: t('entry.latestBuys.tableVisibleColumns.family'), + name: 'family' + }, { - label: t('entry.latestBuys.minPrice'), - field: 'minPrice', - name: 'minPrice', align: 'left', - sortable: true, - columnFilter: { - component: VnInput, - type: 'text', - filterValue: null, - event: getInputEvents, - attrs: { - dense: true, - }, - }, - format: (val) => toCurrency(val), + label: t('entry.latestBuys.tableVisibleColumns.entryFk'), + name: 'entryFk' + }, { - label: t('entry.latestBuys.ektFk'), - field: 'ektFk', - name: 'ektFk', align: 'left', - sortable: true, - columnFilter: { - component: VnInput, - type: 'text', - filterValue: null, - event: getInputEvents, - attrs: { - dense: true, - }, - }, - format: (val) => dashIfEmpty(val), + label: t('entry.latestBuys.tableVisibleColumns.buyingValue'), + name: 'buyingValue' + }, { - label: t('entry.latestBuys.weight'), - field: 'weight', - name: 'weight', align: 'left', - sortable: true, - columnFilter: { - component: VnInput, - type: 'text', - filterValue: null, - event: getInputEvents, - attrs: { - dense: true, - }, - }, + label: t('entry.latestBuys.tableVisibleColumns.freightValue'), + name: 'freightValue' }, { - label: t('entry.latestBuys.packagingFk'), - field: 'packagingFk', - name: 'packagingFk', align: 'left', - sortable: true, - columnFilter: { - component: VnSelect, - type: 'select', - filterValue: null, - event: getInputEvents, - attrs: { - options: packagingsOptions.value, - 'option-value': 'id', - 'option-label': 'id', - dense: true, - }, - }, + label: t('entry.latestBuys.tableVisibleColumns.comissionValue'), + name: 'comissionValue' }, { - label: t('entry.latestBuys.packingOut'), - field: 'packingOut', - name: 'packingOut', align: 'left', - sortable: true, - columnFilter: { - component: VnInput, - type: 'text', - filterValue: null, - event: getInputEvents, - attrs: { - dense: true, - }, - }, - format: (val) => dashIfEmpty(val), + label: t('entry.latestBuys.tableVisibleColumns.packageValue'), + name: 'packageValue' }, { - label: t('entry.latestBuys.landing'), - field: 'landing', - name: 'landing', align: 'left', - sortable: true, - columnFilter: { - component: VnInput, - type: 'text', - filterValue: null, - event: getInputEvents, - attrs: { - dense: true, - }, - }, - format: (val) => toDate(val), + label: t('entry.latestBuys.tableVisibleColumns.isIgnored'), + name: 'isIgnored' + }, + { + align: 'left', + label: t('entry.latestBuys.tableVisibleColumns.price2'), + name: 'price2' + }, + { + align: 'left', + label: t('entry.latestBuys.tableVisibleColumns.price3'), + name: 'price3' + }, + { + align: 'left', + label: t('entry.latestBuys.tableVisibleColumns.minPrice'), + name: 'minPrice' + }, + { + align: 'left', + label: t('entry.latestBuys.tableVisibleColumns.ektFk'), + name: 'ektFk' + }, + { + align: 'left', + label: t('entry.latestBuys.tableVisibleColumns.weight'), + name: 'weight' + }, + { + align: 'left', + label: t('entry.latestBuys.tableVisibleColumns.packagingFk'), + name: 'packagingFk' + }, + { + align: 'left', + label: t('entry.latestBuys.tableVisibleColumns.packingOut'), + name: 'packingOut' + }, + { + align: 'left', + label: t('entry.latestBuys.tableVisibleColumns.landing'), + name: 'landing' }, ]); @@ -602,10 +273,10 @@ onUnmounted(() => (stateStore.rightDrawer = false)); diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 23ffddead..89e5b24df 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -442,6 +442,8 @@ entry: packagingFk: Package packingOut: Package out landing: Landing + isExcludedFromAvailable: Es inventory + isRaid: Raid ticket: pageTitles: tickets: Tickets diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index c3aca500f..5be1c5773 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -441,6 +441,8 @@ entry: packagingFk: Embalaje packingOut: Embalaje envíos landing: Llegada + isExcludedFromAvailable: Es inventario + isRaid: Redada ticket: pageTitles: tickets: Tickets diff --git a/src/pages/Entry/EntryLatestBuys.vue b/src/pages/Entry/EntryLatestBuys.vue index b591b107a..555155a4e 100644 --- a/src/pages/Entry/EntryLatestBuys.vue +++ b/src/pages/Entry/EntryLatestBuys.vue @@ -12,6 +12,8 @@ const router = useRouter(); const stateStore = useStateStore(); const { t } = useI18n(); import { toDate } from 'src/filters'; +import VnImg from 'src/components/ui/VnImg.vue'; +import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue'; const rowsFetchDataRef = ref(null); const editTableCellDialogRef = ref(null); const allColumnNames = ref([]); @@ -73,10 +75,20 @@ const getInputEvents = (col) => { }; }; -const columns = computed(() => [ +const columns = [ { - label: t('entry.latestBuys.tableVisibleColumns.picture'), - name: 'picture', + label: t('entry.latestBuys.tableVisibleColumns.image'), + name: 'image', + columnField: { + component: VnImg, + attrs: (id) => { + return { + id, + width: '50px', + } + }, + }, + columnFilter: false }, { align: 'left', @@ -229,7 +241,7 @@ const columns = computed(() => [ }, format: (row, dashIfEmpty) => dashIfEmpty(toDate(row.landing)) }, -]); +]; const editTableCellFormFieldsOptions = [ { field: 'packing', label: t('entry.latestBuys.packing') }, @@ -267,15 +279,16 @@ const applyColumnFilter = async (col) => { onMounted(async () => { stateStore.rightDrawer = true; - const filteredColumns = columns.value.filter((col) => col.name !== 'picture'); - allColumnNames.value = filteredColumns.map((col) => col.name); - await arrayData.fetch({ append: false }); + // const filteredColumns = columns.value.filter((col) => col.name !== 'picture'); + // allColumnNames.value = filteredColumns.map((col) => col.name); + // await arrayData.fetch({ append: false }); }); onUnmounted(() => (stateStore.rightDrawer = false));