From 18ea23adf16afa52668a4d0750a0024bbe6f0b42 Mon Sep 17 00:00:00 2001 From: jorgep Date: Thu, 26 Sep 2024 15:03:22 +0200 Subject: [PATCH] refactor: refs #7323 pr request --- src/i18n/locale/en.yml | 1 + src/i18n/locale/es.yml | 2 ++ src/pages/Monitor/MonitorOrders.vue | 2 +- src/pages/Monitor/locale/en.yml | 1 - src/pages/Monitor/locale/es.yml | 1 - src/pages/Worker/Card/WorkerBalance.vue | 2 +- src/pages/Worker/Card/WorkerTimeControl.vue | 7 +++---- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 05ce8dcdf..6134f8c9e 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -303,6 +303,7 @@ globals: email: Email SSN: SSN fi: FI + deleteConfirmTitle: Delete selected elements 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 7e299f70a..db9e3b578 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -307,6 +307,8 @@ globals: email: Correo SSN: NSS fi: NIF + deleteConfirmTitle: Eliminar los elementos seleccionados + errors: statusUnauthorized: Acceso denegado statusInternalServerError: Ha ocurrido un error interno del servidor diff --git a/src/pages/Monitor/MonitorOrders.vue b/src/pages/Monitor/MonitorOrders.vue index 853a6edc9..fac601735 100644 --- a/src/pages/Monitor/MonitorOrders.vue +++ b/src/pages/Monitor/MonitorOrders.vue @@ -159,7 +159,7 @@ const openTab = (id) => color="primary" @click=" openConfirmationModal( - $t('salesOrdersTable.deleteConfirmTitle'), + $t('globals.deleteConfirmTitle'), $t('salesOrdersTable.deleteConfirmMessage'), removeOrders ) diff --git a/src/pages/Monitor/locale/en.yml b/src/pages/Monitor/locale/en.yml index 4cdd245aa..b8082f02a 100644 --- a/src/pages/Monitor/locale/en.yml +++ b/src/pages/Monitor/locale/en.yml @@ -15,7 +15,6 @@ salesOrdersTable: dateMake: Make date client: Client salesPerson: Salesperson - deleteConfirmTitle: Delete selected elements deleteConfirmMessage: All the selected elements will be deleted. Are you sure you want to continue? agency: Agency import: Import diff --git a/src/pages/Monitor/locale/es.yml b/src/pages/Monitor/locale/es.yml index 8087bb444..4ee5b90a9 100644 --- a/src/pages/Monitor/locale/es.yml +++ b/src/pages/Monitor/locale/es.yml @@ -15,7 +15,6 @@ salesOrdersTable: dateMake: Fecha de realización client: Cliente salesPerson: Comercial - deleteConfirmTitle: Eliminar los elementos seleccionados deleteConfirmMessage: Todos los elementos seleccionados serán eliminados. ¿Seguro que quieres continuar? agency: Agencia import: Importe diff --git a/src/pages/Worker/Card/WorkerBalance.vue b/src/pages/Worker/Card/WorkerBalance.vue index 88fc7c1df..c5367a281 100644 --- a/src/pages/Worker/Card/WorkerBalance.vue +++ b/src/pages/Worker/Card/WorkerBalance.vue @@ -82,7 +82,7 @@ const columns = computed(() => [ :create="{ urlCreate: 'workerIncomes', title: t('Create balance'), - onDataSaved: () => $refs.tableRef.reload(), + onDataSaved: () => tableRef.reload(), formInitialData: { workerFk: entityId, }, diff --git a/src/pages/Worker/Card/WorkerTimeControl.vue b/src/pages/Worker/Card/WorkerTimeControl.vue index c6ca9d74a..39fb536b6 100644 --- a/src/pages/Worker/Card/WorkerTimeControl.vue +++ b/src/pages/Worker/Card/WorkerTimeControl.vue @@ -329,16 +329,15 @@ const getMailStates = async (date) => { const url = `WorkerTimeControls/${route.params.id}/getMailStates`; const month = date.getMonth() + 1; const prevMonth = month == 1 ? 12 : month - 1; - let prevMonthStates = []; - const params = { month, year: date.getFullYear(), }; const curMonthStates = (await axios.get(url, { params })).data; - prevMonthStates = (await axios.get(url, { params: { ...params, month: prevMonth } })) - .data; + const prevMonthStates = ( + await axios.get(url, { params: { ...params, month: prevMonth } }) + ).data; workerTimeControlMails.value = curMonthStates.concat(prevMonthStates); };