0
0
Fork 0

fix: refs #7129 remove templates

This commit is contained in:
Pablo Natek 2024-07-22 17:50:58 +02:00
parent 5f0c4fea3c
commit 3ceb0771a7
2 changed files with 30 additions and 32 deletions

View File

@ -275,7 +275,7 @@ defineExpose({
/> />
<VnTableOrder <VnTableOrder
v-if=" v-if="
!(col?.columnFilter === false) && col?.columnFilter !== false &&
col?.name !== 'tableActions' col?.name !== 'tableActions'
" "
v-model="orders[col.name]" v-model="orders[col.name]"

View File

@ -37,23 +37,25 @@ const columns = computed(() => [
cardVisible: true, cardVisible: true,
}, },
{ {
align: 'left',
label: t('route.cmr.list.ticketFk'), label: t('route.cmr.list.ticketFk'),
name: 'ticketFk', name: 'ticketFk',
}, },
{ {
align: 'left',
label: t('route.cmr.list.routeFk'), label: t('route.cmr.list.routeFk'),
name: 'routeFk', name: 'routeFk',
}, },
{ {
align: 'left',
label: t('route.cmr.list.clientFk'), label: t('route.cmr.list.clientFk'),
name: 'clientFk', name: 'clientFk',
}, },
{ {
align: 'left', align: 'right',
label: t('route.cmr.list.country'), label: t('route.cmr.list.country'),
name: 'countryFk', name: 'countryFk',
cardVisible: true, cardVisible: true,
component: 'select',
attrs: { attrs: {
url: 'countries', url: 'countries',
fields: ['id', 'name'], fields: ['id', 'name'],
@ -62,30 +64,35 @@ const columns = computed(() => [
}, },
columnFilter: { columnFilter: {
inWhere: true, inWhere: true,
component: 'select',
}, },
}, format: ({ countryName }) => countryName,
{
align: 'center',
label: t('route.cmr.list.shipped'),
name: 'shipped',
cardVisible: true,
component: 'date',
columnFilter: {
inWhere: true,
},
format: ({ date }) => toDate(date),
},
{
align: 'center',
name: 'warehouseFk',
label: t('globals.warehouse'),
component: 'select',
attrs: {
options: warehouses.value,
},
}, },
{ {
align: 'right', align: 'right',
label: t('route.cmr.list.shipped'),
name: 'shipped',
cardVisible: true,
columnFilter: {
component: 'date',
inWhere: true,
},
format: ({ shipped }) => toDateHourMin(shipped),
},
{
align: 'right',
name: 'warehouseFk',
label: t('globals.warehouse'),
columnFilter: {
component: 'select',
},
attrs: {
options: warehouses.value,
},
format: ({ warehouseName }) => warehouseName,
},
{
align: 'center',
name: 'tableActions', name: 'tableActions',
actions: [ actions: [
{ {
@ -166,14 +173,5 @@ function downloadPdfs() {
<CustomerDescriptorProxy :id="row.clientFk" /> <CustomerDescriptorProxy :id="row.clientFk" />
</span> </span>
</template> </template>
<template #column-shipped="{ row }">
{{ toDateHourMin(row.shipped) }}
</template>
<template #column-warehouseFk="{ row }">
{{ row.warehouseName }}
</template>
<template #column-countryFk="{ row }">
{{ row.countryName }}
</template>
</VnTable> </VnTable>
</template> </template>