fix: params.departmentFk i18n and ticketFilter.groupedStates

This commit is contained in:
Javier Segarra 2025-03-28 10:22:08 +01:00
parent 69da78b655
commit a49c8891a7
6 changed files with 19 additions and 21 deletions

View File

@ -122,6 +122,7 @@ const props = defineProps({
<i18n> <i18n>
en: en:
params: params:
departmentFk: Department
search: Contains search: Contains
clientFk: Customer clientFk: Customer
clientName: Customer clientName: Customer
@ -134,6 +135,7 @@ en:
zoneFk: Zone zoneFk: Zone
es: es:
params: params:
departmentFk: Departamento
search: Contiene search: Contiene
clientFk: Cliente clientFk: Cliente
clientName: Cliente clientName: Cliente

View File

@ -163,6 +163,7 @@ en:
email: Email email: Email
isToBeMailed: Mailed isToBeMailed: Mailed
isEqualizated: Equailized isEqualizated: Equailized
departmentFk: Department
businessTypeFk: Business type businessTypeFk: Business type
sageTaxTypeFk: Sage Tax Type sageTaxTypeFk: Sage Tax Type
sageTransactionTypeFk: Sage Tax Type sageTransactionTypeFk: Sage Tax Type
@ -173,6 +174,7 @@ en:
postcode: Postcode postcode: Postcode
es: es:
params: params:
departmentFk: Departamento
search: Contiene search: Contiene
fi: NIF fi: NIF
isActive: Activo isActive: Activo

View File

@ -196,8 +196,10 @@ en:
date: L. O. Date date: L. O. Date
credit: Credit I. credit: Credit I.
defaulterSinced: From defaulterSinced: From
departmentFk: Department
es: es:
params: params:
departmentFk: Departamento
clientFk: Cliente clientFk: Cliente
countryFk: País countryFk: País
paymentMethod: F. Pago paymentMethod: F. Pago

View File

@ -141,8 +141,10 @@ en:
myTeam: My Team myTeam: My Team
isConfirmed: Order Confirmed isConfirmed: Order Confirmed
showEmpty: Show Empty showEmpty: Show Empty
departmentFk: Department
es: es:
params: params:
departmentFk: Departamento
search: Búsqueda search: Búsqueda
clientFk: Cliente clientFk: Cliente
agencyModeFk: Agencia agencyModeFk: Agencia

View File

@ -22,16 +22,6 @@ const states = ref([]);
const agencies = ref([]); const agencies = ref([]);
const warehouses = ref([]); const warehouses = ref([]);
const groupedStates = ref([]); const groupedStates = ref([]);
const getGroupedStates = (data) => {
for (const state of data) {
groupedStates.value.push({
id: state.id,
name: t(`${state.code}`),
code: state.code,
});
}
};
</script> </script>
<template> <template>
@ -39,12 +29,11 @@ const getGroupedStates = (data) => {
<FetchData url="States" @on-fetch="(data) => (states = data)" auto-load /> <FetchData url="States" @on-fetch="(data) => (states = data)" auto-load />
<FetchData <FetchData
url="AlertLevels" url="AlertLevels"
@on-fetch="
(data) => {
getGroupedStates(data);
}
"
auto-load auto-load
@on-fetch="
(data) =>
(groupedStates = data.map((x) => Object.assign(x, { code: t(x.code) })))
"
/> />
<FetchData <FetchData
url="AgencyModes" url="AgencyModes"
@ -136,19 +125,17 @@ const getGroupedStates = (data) => {
</QItemSection> </QItemSection>
<QItemSection v-if="groupedStates"> <QItemSection v-if="groupedStates">
<VnSelect <VnSelect
:label="t('Grouped state')" :label="t('params.groupedStates')"
v-model="params.groupedStates" v-model="params.groupedStates"
@update:model-value="searchFn()" @update:model-value="searchFn()"
:options="groupedStates" :options="groupedStates"
option-value="id" option-label="code"
option-label="name"
emit-value emit-value
map-options map-options
use-input use-input
dense dense
outlined outlined
rounded rounded
sort-by="name ASC"
/> />
</QItemSection> </QItemSection>
</QItem> </QItem>
@ -326,7 +313,7 @@ en:
ON_PREPARATION: On preparation ON_PREPARATION: On preparation
PACKED: Packed PACKED: Packed
DELIVERED: Delivered DELIVERED: Delivered
ON_PREVIOUS: ON_PREVIOUS ON_PREVIOUS: On previous
es: es:
params: params:
search: Contiene search: Contiene
@ -371,7 +358,7 @@ es:
ON_PREPARATION: En preparación ON_PREPARATION: En preparación
PACKED: Encajado PACKED: Encajado
DELIVERED: Servido DELIVERED: Servido
ON_PREVIOUS: ON_PREVIOUS ON_PREVIOUS: En previa
Collection: Colección Collection: Colección
Nickname: Nombre mostrado Nickname: Nombre mostrado
</i18n> </i18n>

View File

@ -119,8 +119,11 @@ en:
lastName: Last name lastName: Last name
userName: User userName: User
extension: Extension extension: Extension
departmentFk: Department
es: es:
params: params:
departmentFk: Departamento
search: Contiene search: Contiene
firstName: Nombre firstName: Nombre
lastName: Apellidos lastName: Apellidos