0
0
Fork 0

feat: stateGroupedFilter

This commit is contained in:
Javier Segarra 2024-09-09 14:58:26 +02:00
parent 52d8ff8ae2
commit 67b2cd3a0b
2 changed files with 20 additions and 17 deletions

View File

@ -49,8 +49,8 @@ const exprBuilder = (param, value) => {
}; };
const userParams = reactive({ const userParams = reactive({
futureDated: Date.vnNew().toISOString(), futureScopeDays: Date.vnNew().toISOString(),
originDated: Date.vnNew().toISOString(), originScopeDays: Date.vnNew().toISOString(),
warehouseFk: user.value.warehouseFk, warehouseFk: user.value.warehouseFk,
}); });
@ -62,8 +62,8 @@ const arrayData = useArrayData('FutureTickets', {
const { store } = arrayData; const { store } = arrayData;
const params = reactive({ const params = reactive({
futureDated: Date.vnNew(), futureScopeDays: Date.vnNew(),
originDated: Date.vnNew(), originScopeDays: Date.vnNew(),
warehouseFk: user.value.warehouseFk, warehouseFk: user.value.warehouseFk,
}); });
@ -172,7 +172,7 @@ const ticketColumns = computed(() => [
label: t('futureTickets.availableLines'), label: t('futureTickets.availableLines'),
name: 'lines', name: 'lines',
field: 'lines', field: 'lines',
align: 'left', align: 'center',
sortable: true, sortable: true,
columnFilter: { columnFilter: {
component: VnInput, component: VnInput,
@ -234,7 +234,7 @@ const ticketColumns = computed(() => [
{ {
label: t('futureTickets.futureState'), label: t('futureTickets.futureState'),
name: 'futureState', name: 'futureState',
align: 'left', align: 'right',
sortable: true, sortable: true,
columnFilter: null, columnFilter: null,
format: (val) => dashIfEmpty(val), format: (val) => dashIfEmpty(val),
@ -458,7 +458,7 @@ onMounted(async () => {
</QTd> </QTd>
</template> </template>
<template #body-cell-shipped="{ row }"> <template #body-cell-shipped="{ row }">
<QTd> <QTd class="shipped">
<QBadge <QBadge
text-color="black" text-color="black"
:color="getDateQBadgeColor(row.shipped)" :color="getDateQBadgeColor(row.shipped)"
@ -505,7 +505,7 @@ onMounted(async () => {
</QTd> </QTd>
</template> </template>
<template #body-cell-futureShipped="{ row }"> <template #body-cell-futureShipped="{ row }">
<QTd> <QTd class="shipped">
<QBadge <QBadge
text-color="black" text-color="black"
:color="getDateQBadgeColor(row.futureShipped)" :color="getDateQBadgeColor(row.futureShipped)"
@ -532,6 +532,9 @@ onMounted(async () => {
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">
.shipped {
min-width: 132px;
}
.vertical-separator { .vertical-separator {
border-left: 4px solid white !important; border-left: 4px solid white !important;
} }

View File

@ -68,7 +68,7 @@ onMounted(async () => {
<VnFilterPanel <VnFilterPanel
:data-key="props.dataKey" :data-key="props.dataKey"
:hidden-tags="['search']" :hidden-tags="['search']"
:un-removable-params="['warehouseFk', 'originDated', 'futureDated']" :un-removable-params="['warehouseFk', 'originScopeDays ', 'futureScopeDays']"
> >
<template #tags="{ tag, formatFn }"> <template #tags="{ tag, formatFn }">
<div class="q-gutter-x-xs"> <div class="q-gutter-x-xs">
@ -80,8 +80,8 @@ onMounted(async () => {
<QItem class="q-my-sm"> <QItem class="q-my-sm">
<QItemSection> <QItemSection>
<VnInputDate <VnInputDate
v-model="params.originDated" v-model="params.originScopeDays"
:label="t('params.originDated')" :label="t('params.originScopeDays')"
is-outlined is-outlined
/> />
</QItemSection> </QItemSection>
@ -89,8 +89,8 @@ onMounted(async () => {
<QItem class="q-my-sm"> <QItem class="q-my-sm">
<QItemSection> <QItemSection>
<VnInputDate <VnInputDate
v-model="params.futureDated" v-model="params.futureScopeDays"
:label="t('params.futureDated')" :label="t('params.futureScopeDays')"
is-outlined is-outlined
/> />
</QItemSection> </QItemSection>
@ -214,8 +214,8 @@ onMounted(async () => {
en: en:
iptInfo: IPT iptInfo: IPT
params: params:
originDated: Origin date originScopeDays: Origin date
futureDated: Destination date futureScopeDays: Destination date
futureIpt: Destination IPT futureIpt: Destination IPT
ipt: Origin IPT ipt: Origin IPT
warehouseFk: Warehouse warehouseFk: Warehouse
@ -229,8 +229,8 @@ es:
Vertical: Vertical Vertical: Vertical
iptInfo: Encajado iptInfo: Encajado
params: params:
originDated: Fecha origen originScopeDays: Fecha origen
futureDated: Fecha destino futureScopeDays: Fecha destino
futureIpt: IPT destino futureIpt: IPT destino
ipt: IPT Origen ipt: IPT Origen
warehouseFk: Almacén warehouseFk: Almacén