From 1ff15da8ca4ec1b5e39b2fb1c6cabe016d8eac5f Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 16 Sep 2024 16:33:09 +0200 Subject: [PATCH] fix: refs #7323 workerList --- src/i18n/locale/en.yml | 5 +++ src/i18n/locale/es.yml | 5 +++ src/pages/Worker/WorkerFilter.vue | 30 ++++++++++------- src/pages/Worker/WorkerList.vue | 53 ++++++++++++++++++++++++++++--- src/pages/Worker/locale/en.yml | 5 +++ src/pages/Worker/locale/es.yml | 5 +++ 6 files changed, 86 insertions(+), 17 deletions(-) diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index f99244d42..3b1cb20fa 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -286,6 +286,7 @@ globals: myAccount: My account noOne: No one params: + id: ID clientFk: Client id salesPersonFk: Sales person warehouseFk: Warehouse @@ -293,6 +294,10 @@ globals: from: From To: To stateFk: State + departmentFk: Department + email: Email + SSN: SSN + fi: FI errors: statusUnauthorized: Access denied statusInternalServerError: An internal server error has ocurred diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml index 360627fda..31010dfb0 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -290,6 +290,7 @@ globals: myAccount: Mi cuenta noOne: Nadie params: + id: Id clientFk: Id cliente salesPersonFk: Comercial warehouseFk: Almacén @@ -297,6 +298,10 @@ globals: from: Desde To: Hasta stateFk: Estado + departmentFk: Departamento + email: Correo + SSN: NSS + fi: NIF errors: statusUnauthorized: Acceso denegado statusInternalServerError: Ha ocurrido un error interno del servidor diff --git a/src/pages/Worker/WorkerFilter.vue b/src/pages/Worker/WorkerFilter.vue index 765241341..61120f448 100644 --- a/src/pages/Worker/WorkerFilter.vue +++ b/src/pages/Worker/WorkerFilter.vue @@ -7,7 +7,7 @@ import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue'; import VnInput from 'src/components/common/VnInput.vue'; import VnSelect from 'src/components/common/VnSelect.vue'; -const { t } = useI18n(); +const { t, te } = useI18n(); const props = defineProps({ dataKey: { type: String, @@ -16,6 +16,11 @@ const props = defineProps({ }); const departments = ref(); + +const getLocale = (label) => { + const globalLocale = `globals.params.${label}`; + return te(globalLocale) ? t(globalLocale) : t(`params.${label}`); +};