#7648 - Filter entries by days #547

Merged
jsegarra merged 9 commits from 7648_myEntries_filter into dev 2024-07-15 09:23:31 +00:00
1 changed files with 27 additions and 1 deletions
Showing only changes of commit 73049f7282 - Show all commits

View File

@ -7,6 +7,7 @@ import { toDate } from 'src/filters/index';
import { useQuasar } from 'quasar';
import EntryBuysTableDialog from './EntryBuysTableDialog.vue';
import VnTable from 'components/VnTable/VnTable.vue';
import VnInput from 'src/components/common/VnInput.vue';
const stateStore = useStateStore();
const { t } = useI18n();
@ -34,6 +35,10 @@ const columns = computed(() => [
isTitle: false,
create: true,
cardVisible: true,
component: 'date',
columnField: {
component: null,
},
format: ({ shipped }) => toDate(shipped),
},
{
@ -43,6 +48,10 @@ const columns = computed(() => [
isTitle: false,
create: true,
cardVisible: false,
component: 'date',
columnField: {
component: null,
},
format: ({ landed }) => toDate(landed),
},
{
@ -75,6 +84,7 @@ const printBuys = (rowId) => {
},
});
};
const DEFAULT_INTERVAL_DAYS = 3;
jsegarra marked this conversation as resolved Outdated

hemos visto este 3 en back y ahora en front, motivo sufiente para buscarle un sitio en la tabla entryConfig

hemos visto este 3 en back y ahora en front, motivo sufiente para buscarle un sitio en la tabla entryConfig

la tabla entryconfig no tiene campos para almacenar esa info

la tabla entryconfig no tiene campos para almacenar esa info

Eliminar en favor de usar params

Eliminar en favor de usar params
</script>
<template>
<VnSearchbar
@ -93,14 +103,30 @@ const printBuys = (rowId) => {
:columns="columns"
default-mode="card"
auto-load
:right-search="true"
:filter="{ days: DEFAULT_INTERVAL_DAYS }"
>
<template #moreFilterPanel="{ params }">
<VnInput
:label="t('params.scopeDays')"
v-model="params.days"
class="q-px-xs q-pb-xs q-pt-none fit"
dense
filled
outlined
></VnInput>
</template>
</VnTable>
</div>
</QPage>
</template>
<i18n>
en:
params:
scopeDays: Days onward
jsegarra marked this conversation as resolved Outdated

si en ingles es days onward, que la clave tambíen sea esa, de hecho pablo ya la uso creo..algunos filters la tienen..por si la quieres globalizar

si en ingles es days onward, que la clave tambíen sea esa, de hecho pablo ya la uso creo..algunos filters la tienen..por si la quieres globalizar

estandarizar

estandarizar

Finalmente he optado por daysOnward

Finalmente he optado por daysOnward
es:
Search entries: Buscar entradas
params:
scopeDays: Días adelante
You can search by entry reference: Puedes buscar por referencia de la entrada
</i18n>