feat: refs #7884 added default params and chip translations

This commit is contained in:
Jon Elias 2024-09-18 08:23:15 +02:00
parent 479f2a8e53
commit 566d657f70
2 changed files with 12 additions and 1 deletions

View File

@ -252,7 +252,7 @@ function sanitizer(params) {
> >
<slot name="tags" :tag="chip" :format-fn="formatValue"> <slot name="tags" :tag="chip" :format-fn="formatValue">
<div class="q-gutter-x-xs"> <div class="q-gutter-x-xs">
<strong>{{ chip.label }}:</strong> <strong>{{ t(`${chip.label}`) }}:</strong>
<span>"{{ formatValue(chip.value) }}"</span> <span>"{{ formatValue(chip.value) }}"</span>
</div> </div>
</slot> </slot>
@ -286,6 +286,9 @@ function sanitizer(params) {
</style> </style>
<i18n> <i18n>
en:
daysOnward: Days onward
daysAgo: Days ago
es: es:
No filters applied: No se han aplicado filtros No filters applied: No se han aplicado filtros
Applied filters: Filtros aplicados Applied filters: Filtros aplicados
@ -294,4 +297,6 @@ es:
Search: Buscar Search: Buscar
Yes: Si Yes: Si
No: No No: No
daysOnward: Días Adelante
daysAgo: Días Atrás
</i18n> </i18n>

View File

@ -9,6 +9,11 @@ import VnTable from 'components/VnTable/VnTable.vue';
const { t } = useI18n(); const { t } = useI18n();
const quasar = useQuasar(); const quasar = useQuasar();
const params = {
daysOnward: 7,
daysAgo: 3,
};
const columns = computed(() => [ const columns = computed(() => [
{ {
align: 'left', align: 'left',
@ -120,6 +125,7 @@ const printBuys = (rowId) => {
data-key="myEntriesList" data-key="myEntriesList"
url="Entries/filter" url="Entries/filter"
:columns="columns" :columns="columns"
:user-params="params"
default-mode="card" default-mode="card"
order="shipped DESC" order="shipped DESC"
auto-load auto-load