From 72c8379b2011b48438a6c45f250fdeba7e57517e Mon Sep 17 00:00:00 2001 From: Jon Date: Mon, 12 Aug 2024 13:18:31 +0200 Subject: [PATCH 01/11] fix: new field's order in warehouse filter --- src/pages/Ticket/TicketList.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue index eda2b1b10..cbd102317 100644 --- a/src/pages/Ticket/TicketList.vue +++ b/src/pages/Ticket/TicketList.vue @@ -298,6 +298,7 @@ onMounted(() => (stateStore.rightDrawer = true));
Date: Tue, 13 Aug 2024 10:05:07 +0200 Subject: [PATCH 02/11] feat: refs #7323 add my account" btn & fix models log selectable --- src/components/UserPanel.vue | 12 ++++++++++++ src/components/common/VnLog.vue | 8 ++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/components/UserPanel.vue b/src/components/UserPanel.vue index 15d88d615..2f191691a 100644 --- a/src/components/UserPanel.vue +++ b/src/components/UserPanel.vue @@ -159,6 +159,14 @@ const isEmployee = computed(() => useRole().isEmployee()); size="xxl" color="transparent" /> +
{{ user.nickname }}
@@ -262,3 +270,7 @@ const isEmployee = computed(() => useRole().isEmployee()); } } + +es: + My account: Mi cuenta + diff --git a/src/components/common/VnLog.vue b/src/components/common/VnLog.vue index 72d3516c5..07bca4095 100644 --- a/src/components/common/VnLog.vue +++ b/src/components/common/VnLog.vue @@ -14,6 +14,7 @@ import VnJsonValue from '../common/VnJsonValue.vue'; import FetchData from '../FetchData.vue'; import VnSelect from './VnSelect.vue'; import VnUserLink from '../ui/VnUserLink.vue'; +import item from 'src/router/modules/item'; const stateStore = useStateStore(); const validationsStore = useValidator(); @@ -407,9 +408,12 @@ watch( @on-fetch=" (data) => (actions = data.map((item) => { + const changedModel = item.changedModel; return { - locale: useCapitalize(validations[item.changedModel].locale.name), - value: item.changedModel, + locale: useCapitalize( + validations[changedModel]?.locale?.name ?? changedModel + ), + value: changedModel, }; })) " From 81c70c95114de64c2c016d50e7b8c4620a0c36d5 Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 13 Aug 2024 10:06:58 +0200 Subject: [PATCH 03/11] chore: refs #7323 remove unused import --- src/components/common/VnLog.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/common/VnLog.vue b/src/components/common/VnLog.vue index 07bca4095..2163d54d4 100644 --- a/src/components/common/VnLog.vue +++ b/src/components/common/VnLog.vue @@ -14,7 +14,6 @@ import VnJsonValue from '../common/VnJsonValue.vue'; import FetchData from '../FetchData.vue'; import VnSelect from './VnSelect.vue'; import VnUserLink from '../ui/VnUserLink.vue'; -import item from 'src/router/modules/item'; const stateStore = useStateStore(); const validationsStore = useValidator(); From d276436bb3d3e1a318b7c4a7d6ecec711d76b18e Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 13 Aug 2024 10:42:15 +0200 Subject: [PATCH 04/11] chore: refs #7323 fix test --- test/cypress/integration/logout.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cypress/integration/logout.spec.js b/test/cypress/integration/logout.spec.js index af705223b..423189908 100644 --- a/test/cypress/integration/logout.spec.js +++ b/test/cypress/integration/logout.spec.js @@ -8,7 +8,7 @@ describe('Logout', () => { describe('by user', () => { it('should logout', () => { cy.get('#user').click(); - cy.get('.block').click(); + cy.get('#logout').click(); }); }); describe('not user', () => { From a24caa939352fadfe8f80ae171d980ca79e33d91 Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 13 Aug 2024 12:56:39 +0200 Subject: [PATCH 05/11] 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 06/11] 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') }, -]; -