From a24caa939352fadfe8f80ae171d980ca79e33d91 Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 13 Aug 2024 12:56:39 +0200 Subject: [PATCH 1/7] fix: refs #7323 use global locale --- src/components/UserPanel.vue | 6 +----- src/i18n/locale/en.yml | 1 + src/i18n/locale/es.yml | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/components/UserPanel.vue b/src/components/UserPanel.vue index 2f191691a..98334460a 100644 --- a/src/components/UserPanel.vue +++ b/src/components/UserPanel.vue @@ -164,7 +164,7 @@ const isEmployee = computed(() => useRole().isEmployee()); class="q-mt-sm q-px-md" :to="`/worker/${user.id}`" color="primary" - :label="t('My account')" + :label="t('globals.myAccount')" dense />
@@ -270,7 +270,3 @@ const isEmployee = computed(() => useRole().isEmployee()); } } - -es: - My account: Mi cuenta - diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 12680d0cb..937140029 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -263,6 +263,7 @@ globals: title: Unsaved changes will be lost subtitle: Are you sure exit without saving? createInvoiceIn: Create invoice in + myAccount: My account 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 747a10d51..9979586f4 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -265,7 +265,7 @@ globals: title: Los cambios que no haya guardado se perderán subtitle: ¿Seguro que quiere salir sin guardar? createInvoiceIn: Crear factura recibida - + myAccount: Mi cuenta errors: statusUnauthorized: Acceso denegado statusInternalServerError: Ha ocurrido un error interno del servidor From e780dcda05837883a0571fe0edcadfd97a0701f9 Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 13 Aug 2024 16:45:30 +0200 Subject: [PATCH 2/7] fix: refs #7323 load all opts --- src/pages/Worker/Card/WorkerBasicData.vue | 54 +++++++---------------- 1 file changed, 17 insertions(+), 37 deletions(-) diff --git a/src/pages/Worker/Card/WorkerBasicData.vue b/src/pages/Worker/Card/WorkerBasicData.vue index 82203fc2a..d131fea3e 100644 --- a/src/pages/Worker/Card/WorkerBasicData.vue +++ b/src/pages/Worker/Card/WorkerBasicData.vue @@ -12,9 +12,12 @@ import VnSelect from 'src/components/common/VnSelect.vue'; const route = useRoute(); const { t } = useI18n(); -const workersOptions = ref([]); -const countriesOptions = ref([]); -const educationLevelsOptions = ref([]); +const educationLevels = ref([]); +const countries = ref([]); +const maritalStatus = [ + { code: 'M', name: t('Married') }, + { code: 'S', name: t('Single') }, +]; const workerFilter = { include: [ @@ -29,44 +32,21 @@ const workerFilter = { { relation: 'department', scope: { include: { relation: 'department' } } }, ], }; -const workersFilter = { - fields: ['id', 'nickname'], - order: 'nickname ASC', - limit: 30, -}; -const countriesFilter = { - fields: ['id', 'name', 'code'], - order: 'name ASC', - limit: 30, -}; -const educationLevelsFilter = { fields: ['id', 'name'], order: 'name ASC', limit: 30 }; - -const maritalStatus = [ - { code: 'M', name: t('Married') }, - { code: 'S', name: t('Single') }, -]; -