0
0
Fork 0

Merge pull request '#7884 added new filter field' (!720) from 7884-AddLabelerField into dev

Reviewed-on: verdnatura/salix-front#720
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
Jon Elias 2024-10-02 08:46:55 +00:00
commit e6dc2f16b8
5 changed files with 56 additions and 25 deletions

View File

@ -50,6 +50,7 @@ globals:
summary: summary:
basicData: Basic data basicData: Basic data
daysOnward: Days onward daysOnward: Days onward
daysAgo: Days ago
today: Today today: Today
yesterday: Yesterday yesterday: Yesterday
dateFormat: en-GB dateFormat: en-GB

View File

@ -49,6 +49,7 @@ globals:
summary: summary:
basicData: Datos básicos basicData: Datos básicos
daysOnward: Días adelante daysOnward: Días adelante
daysAgo: Días atras
today: Hoy today: Hoy
yesterday: Ayer yesterday: Ayer
dateFormat: es-ES dateFormat: es-ES

View File

@ -9,22 +9,27 @@ 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',
name: 'id', name: 'id',
label: t('customer.extendedList.tableVisibleColumns.id'), label: t('myEntries.id'),
columnFilter: false, columnFilter: false,
isTitle: true, isTitle: true,
}, },
{ {
visible: false, visible: false,
align: 'right', align: 'right',
label: t('shipped'), label: t('myEntries.shipped'),
name: 'shipped', name: 'shipped',
columnFilter: { columnFilter: {
name: 'fromShipped', name: 'fromShipped',
label: t('fromShipped'), label: t('myEntries.fromShipped'),
component: 'date', component: 'date',
}, },
format: ({ shipped }) => toDate(shipped), format: ({ shipped }) => toDate(shipped),
@ -32,11 +37,11 @@ const columns = computed(() => [
{ {
visible: false, visible: false,
align: 'left', align: 'left',
label: t('shipped'), label: t('myEntries.shipped'),
name: 'shipped', name: 'shipped',
columnFilter: { columnFilter: {
name: 'toShipped', name: 'toShipped',
label: t('toShipped'), label: t('myEntries.toShipped'),
component: 'date', component: 'date',
}, },
format: ({ shipped }) => toDate(shipped), format: ({ shipped }) => toDate(shipped),
@ -44,14 +49,14 @@ const columns = computed(() => [
}, },
{ {
align: 'right', align: 'right',
label: t('shipped'), label: t('myEntries.shipped'),
name: 'shipped', name: 'shipped',
columnFilter: false, columnFilter: false,
format: ({ shipped }) => toDate(shipped), format: ({ shipped }) => toDate(shipped),
}, },
{ {
align: 'right', align: 'right',
label: t('landed'), label: t('myEntries.landed'),
name: 'landed', name: 'landed',
columnFilter: false, columnFilter: false,
format: ({ landed }) => toDate(landed), format: ({ landed }) => toDate(landed),
@ -59,26 +64,36 @@ const columns = computed(() => [
{ {
align: 'right', align: 'right',
label: t('globals.wareHouseIn'), label: t('myEntries.wareHouseIn'),
name: 'warehouseInFk', name: 'warehouseInFk',
format: (row) => row.warehouseInName, format: (row) => {
row.warehouseInName;
},
cardVisible: true, cardVisible: true,
columnFilter: { columnFilter: {
name: 'warehouseInFk',
label: t('myEntries.warehouseInFk'),
component: 'select', component: 'select',
attrs: { attrs: {
url: 'warehouses', url: 'warehouses',
fields: ['id', 'name'], fields: ['id', 'name'],
optionLabel: 'name', optionLabel: 'name',
optionValue: 'id', optionValue: 'id',
alias: 't',
}, },
alias: 't',
inWhere: true, inWhere: true,
}, },
}, },
{ {
align: 'left', align: 'left',
label: t('globals.daysOnward'), label: t('myEntries.daysOnward'),
name: 'days', name: 'daysOnward',
visible: false,
},
{
align: 'left',
label: t('myEntries.daysAgo'),
name: 'daysAgo',
visible: false, visible: false,
}, },
{ {
@ -88,6 +103,7 @@ const columns = computed(() => [
{ {
title: t('printLabels'), title: t('printLabels'),
icon: 'print', icon: 'print',
isPrimary: true,
action: (row) => printBuys(row.id), action: (row) => printBuys(row.id),
}, },
], ],
@ -114,9 +130,11 @@ 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
chip-locale="myEntries"
/> />
</template> </template>

View File

@ -6,9 +6,15 @@ entryFilter:
filter: filter:
search: General search search: General search
reference: Reference reference: Reference
landed: Landed myEntries:
shipped: Shipped id: ID
fromShipped: Shipped(from) landed: Landed
toShipped: Shipped(to) shipped: Shipped
printLabels: Print stickers fromShipped: Shipped(from)
viewLabel: View sticker toShipped: Shipped(to)
printLabels: Print stickers
viewLabel: View sticker
wareHouseIn: Warehouse in
warehouseInFk: Warehouse in
daysOnward: Days onward
daysAgo: Days ago

View File

@ -9,10 +9,15 @@ entryFilter:
filter: filter:
search: Búsqueda general search: Búsqueda general
reference: Referencia reference: Referencia
myEntries:
landed: F. llegada id: ID
shipped: F. salida landed: F. llegada
fromShipped: F. salida(desde) shipped: F. salida
toShipped: F. salida(hasta) fromShipped: F. salida(desde)
printLabels: Imprimir etiquetas toShipped: F. salida(hasta)
viewLabel: Ver etiqueta printLabels: Imprimir etiquetas
viewLabel: Ver etiqueta
wareHouseIn: Alm. entrada
warehouseInFk: Alm. entrada
daysOnward: Días adelante
daysAgo: Días atras