forked from verdnatura/salix-front
feat: refs #7524 myTeam filter & default params
This commit is contained in:
parent
e47cdff4ca
commit
2b2ccbc6a1
|
@ -296,6 +296,7 @@ globals:
|
||||||
from: From
|
from: From
|
||||||
To: To
|
To: To
|
||||||
stateFk: State
|
stateFk: State
|
||||||
|
myTeam: My team
|
||||||
errors:
|
errors:
|
||||||
statusUnauthorized: Access denied
|
statusUnauthorized: Access denied
|
||||||
statusInternalServerError: An internal server error has ocurred
|
statusInternalServerError: An internal server error has ocurred
|
||||||
|
|
|
@ -300,6 +300,7 @@ globals:
|
||||||
from: Desde
|
from: Desde
|
||||||
To: Hasta
|
To: Hasta
|
||||||
stateFk: Estado
|
stateFk: Estado
|
||||||
|
myTeam: Mi equipo
|
||||||
errors:
|
errors:
|
||||||
statusUnauthorized: Acceso denegado
|
statusUnauthorized: Acceso denegado
|
||||||
statusInternalServerError: Ha ocurrido un error interno del servidor
|
statusInternalServerError: Ha ocurrido un error interno del servidor
|
||||||
|
|
|
@ -462,6 +462,9 @@ onMounted(async () => {
|
||||||
userParams.dateFuture = tomorrow;
|
userParams.dateFuture = tomorrow;
|
||||||
userParams.dateToAdvance = today;
|
userParams.dateToAdvance = today;
|
||||||
userParams.warehouseFk = user.value.warehouseFk;
|
userParams.warehouseFk = user.value.warehouseFk;
|
||||||
|
userParams.ipt = 'H';
|
||||||
|
userParams.futureIpt = 'H';
|
||||||
|
userParams.isFullMovable = true;
|
||||||
const filter = { limit: 0 };
|
const filter = { limit: 0 };
|
||||||
await arrayData.addFilter({ filter, userParams });
|
await arrayData.addFilter({ filter, userParams });
|
||||||
});
|
});
|
||||||
|
|
|
@ -10,7 +10,7 @@ import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t, te } = useI18n();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
dataKey: {
|
dataKey: {
|
||||||
type: String,
|
type: String,
|
||||||
|
@ -42,6 +42,11 @@ const getItemPackingTypes = async () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const getLocale = (val) => {
|
||||||
|
const param = `params.${val}`;
|
||||||
|
return te(param) ? t(param) : t(`globals.${param}`);
|
||||||
|
};
|
||||||
|
|
||||||
onMounted(async () => await getItemPackingTypes());
|
onMounted(async () => await getItemPackingTypes());
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -59,7 +64,7 @@ onMounted(async () => await getItemPackingTypes());
|
||||||
>
|
>
|
||||||
<template #tags="{ tag, formatFn }">
|
<template #tags="{ tag, formatFn }">
|
||||||
<div class="q-gutter-x-xs">
|
<div class="q-gutter-x-xs">
|
||||||
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
<strong>{{ getLocale(tag.label) }}: </strong>
|
||||||
<span>{{ formatFn(tag.value) }}</span>
|
<span>{{ formatFn(tag.value) }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -142,6 +147,16 @@ onMounted(async () => await getItemPackingTypes());
|
||||||
</VnSelect>
|
</VnSelect>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
<QItem>
|
||||||
|
<QItemSection>
|
||||||
|
<QCheckbox
|
||||||
|
:label="t('globals.params.myTeam')"
|
||||||
|
v-model="params.myTeam"
|
||||||
|
toggle-indeterminate
|
||||||
|
@update:model-value="searchFn()"
|
||||||
|
/>
|
||||||
|
</QItemSection>
|
||||||
|
</QItem>
|
||||||
</template>
|
</template>
|
||||||
</VnFilterPanel>
|
</VnFilterPanel>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -88,7 +88,7 @@ weeklyTickets:
|
||||||
advanceTickets:
|
advanceTickets:
|
||||||
preparation: Preparación
|
preparation: Preparación
|
||||||
origin: Origen
|
origin: Origen
|
||||||
destination: Destinatario
|
destination: Destino
|
||||||
originAgency: 'Agencia origen: {agency}'
|
originAgency: 'Agencia origen: {agency}'
|
||||||
destinationAgency: 'Agencia destino: {agency}'
|
destinationAgency: 'Agencia destino: {agency}'
|
||||||
ticketId: ID
|
ticketId: ID
|
||||||
|
|
Loading…
Reference in New Issue