forked from verdnatura/salix-front
refactor: refs #7354 fix tableFilters
This commit is contained in:
parent
daa4a41f09
commit
e60f846464
|
@ -10,13 +10,12 @@ const { t } = useI18n();
|
|||
|
||||
<template>
|
||||
<VnCard
|
||||
data-key="Zone"
|
||||
data-key="zone"
|
||||
base-url="Zones"
|
||||
search-url="Zones"
|
||||
search-key="name"
|
||||
:descriptor="ZoneDescriptor"
|
||||
:filter-panel="ZoneFilterPanel"
|
||||
:search-data-key="'ZoneList'"
|
||||
search-data-key="ZoneList"
|
||||
search-url="Zones"
|
||||
:searchbar-label="t('list.searchZone')"
|
||||
:searchbar-info="t('list.searchInfo')"
|
||||
/>
|
||||
|
|
|
@ -44,6 +44,9 @@ const columns = computed(() => [
|
|||
condition: () => true,
|
||||
},
|
||||
isId: true,
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -51,6 +54,9 @@ const columns = computed(() => [
|
|||
label: t('list.name'),
|
||||
isTitle: true,
|
||||
create: true,
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -58,35 +64,42 @@ const columns = computed(() => [
|
|||
label: t('list.agency'),
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'AgencyModes',
|
||||
columnFilter: {
|
||||
component: 'select',
|
||||
inWhere: true,
|
||||
attrs: {
|
||||
url: 'AgencyModes',
|
||||
},
|
||||
},
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
format: (row, dashIfEmpty) => dashIfEmpty(row?.agencyMode?.name),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'hour',
|
||||
label: t('list.close'),
|
||||
cardVisible: true,
|
||||
format: (row) => toTimeFormat(row.hour),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'price',
|
||||
label: t('list.price'),
|
||||
cardVisible: true,
|
||||
format: (row) => toCurrency(row.price),
|
||||
columnFilter: {
|
||||
inWhere: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'hour',
|
||||
label: t('list.close'),
|
||||
cardVisible: true,
|
||||
format: (row) => toTimeFormat(row.hour),
|
||||
hidden: true,
|
||||
},
|
||||
{
|
||||
align: 'right',
|
||||
name: 'tableActions',
|
||||
actions: [
|
||||
{
|
||||
title: t('ZoneSummary'),
|
||||
title: t('list.zoneSummary'),
|
||||
icon: 'preview',
|
||||
action: (row) => viewSummary(row.id, ZoneSummary),
|
||||
},
|
||||
|
@ -116,15 +129,14 @@ const handleClone = (id) => {
|
|||
|
||||
<template>
|
||||
<VnSearchbar
|
||||
search-key="name"
|
||||
data-key="ZoneList"
|
||||
:label="t('Search claim')"
|
||||
:info="t('You can search by claim id or customer name')"
|
||||
data-key="Zones"
|
||||
:label="t('Search zone')"
|
||||
:info="t('You can search zones by id or name')"
|
||||
:is-query-filter="true"
|
||||
/>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="ZoneList"
|
||||
data-key="Zones"
|
||||
url="Zones"
|
||||
:create="{
|
||||
urlCreate: 'Zones',
|
||||
|
@ -136,7 +148,6 @@ const handleClone = (id) => {
|
|||
:columns="columns"
|
||||
default-mode="table"
|
||||
redirect="zone"
|
||||
:use-model="true"
|
||||
auto-load
|
||||
>
|
||||
<template #more-create-dialog="{ data }">
|
||||
|
@ -165,3 +176,9 @@ const handleClone = (id) => {
|
|||
</template>
|
||||
</VnTable>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
es:
|
||||
Search zone: Buscar zona
|
||||
You can search zones by id or name: Puedes buscar zonas por id o nombre
|
||||
</i18n>
|
||||
|
|
|
@ -26,6 +26,7 @@ list:
|
|||
bonus: Bonus
|
||||
isVolumetric: Volumetric
|
||||
createZone: Create zone
|
||||
zoneSummary: Summary
|
||||
create:
|
||||
name: Name
|
||||
warehouse: Warehouse
|
||||
|
|
|
@ -26,6 +26,7 @@ list:
|
|||
bonus: Bonus
|
||||
isVolumetric: Volumétrico
|
||||
createZone: Crear zona
|
||||
zoneSummary: Resumen
|
||||
create:
|
||||
name: Nombre
|
||||
warehouse: Almacén
|
||||
|
|
Loading…
Reference in New Issue