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