From 2b2ccbc6a105da40fb07f20fc012d4cb87589f9f Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 21 Oct 2024 12:14:54 +0200 Subject: [PATCH 1/3] feat: refs #7524 myTeam filter & default params --- src/i18n/locale/en.yml | 1 + src/i18n/locale/es.yml | 1 + src/pages/Ticket/TicketAdvance.vue | 3 +++ src/pages/Ticket/TicketAdvanceFilter.vue | 19 +++++++++++++++++-- src/pages/Ticket/locale/es.yml | 4 ++-- 5 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 7eb3829fe..17a3e097a 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -296,6 +296,7 @@ globals: from: From To: To stateFk: State + myTeam: My team 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 9d5cd53f3..fc61936d2 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -300,6 +300,7 @@ globals: from: Desde To: Hasta stateFk: Estado + myTeam: Mi equipo errors: statusUnauthorized: Acceso denegado statusInternalServerError: Ha ocurrido un error interno del servidor diff --git a/src/pages/Ticket/TicketAdvance.vue b/src/pages/Ticket/TicketAdvance.vue index 177b3a29b..2cce1dba8 100644 --- a/src/pages/Ticket/TicketAdvance.vue +++ b/src/pages/Ticket/TicketAdvance.vue @@ -462,6 +462,9 @@ onMounted(async () => { userParams.dateFuture = tomorrow; userParams.dateToAdvance = today; userParams.warehouseFk = user.value.warehouseFk; + userParams.ipt = 'H'; + userParams.futureIpt = 'H'; + userParams.isFullMovable = true; const filter = { limit: 0 }; await arrayData.addFilter({ filter, userParams }); }); diff --git a/src/pages/Ticket/TicketAdvanceFilter.vue b/src/pages/Ticket/TicketAdvanceFilter.vue index 209a1a307..38a0dd4c2 100644 --- a/src/pages/Ticket/TicketAdvanceFilter.vue +++ b/src/pages/Ticket/TicketAdvanceFilter.vue @@ -10,7 +10,7 @@ import VnInputDate from 'src/components/common/VnInputDate.vue'; import axios from 'axios'; import { onMounted } from 'vue'; -const { t } = useI18n(); +const { t, te } = useI18n(); const props = defineProps({ dataKey: { type: String, @@ -42,6 +42,11 @@ const getItemPackingTypes = async () => { } }; +const getLocale = (val) => { + const param = `params.${val}`; + return te(param) ? t(param) : t(`globals.${param}`); +}; + onMounted(async () => await getItemPackingTypes()); @@ -59,7 +64,7 @@ onMounted(async () => await getItemPackingTypes()); > @@ -142,6 +147,16 @@ onMounted(async () => await getItemPackingTypes()); + + + + + diff --git a/src/pages/Ticket/locale/es.yml b/src/pages/Ticket/locale/es.yml index 0a27519ad..d4ba1f26a 100644 --- a/src/pages/Ticket/locale/es.yml +++ b/src/pages/Ticket/locale/es.yml @@ -86,9 +86,9 @@ weeklyTickets: search: Buscar por tickets programados searchInfo: Buscar tickets programados por el identificador o el identificador del cliente advanceTickets: - preparation: PreparaciĆ³n + preparation: PreparaciĆ³n origin: Origen - destination: Destinatario + destination: Destino originAgency: 'Agencia origen: {agency}' destinationAgency: 'Agencia destino: {agency}' ticketId: ID -- 2.40.1 From a4358ec0edbcebd07fcf427c8a49097913b62dcb Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 21 Oct 2024 12:36:16 +0200 Subject: [PATCH 2/3] chore: refs #7524 refactor order --- src/pages/Ticket/TicketAdvanceFilter.vue | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/pages/Ticket/TicketAdvanceFilter.vue b/src/pages/Ticket/TicketAdvanceFilter.vue index 38a0dd4c2..07c745250 100644 --- a/src/pages/Ticket/TicketAdvanceFilter.vue +++ b/src/pages/Ticket/TicketAdvanceFilter.vue @@ -129,6 +129,12 @@ onMounted(async () => await getItemPackingTypes()); toggle-indeterminate @update:model-value="searchFn()" /> + @@ -147,16 +153,6 @@ onMounted(async () => await getItemPackingTypes()); - - - - - -- 2.40.1 From 0fbd5f45e1c929aaaa1c1918c346ee9e7fcb56eb Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 21 Oct 2024 14:29:29 +0200 Subject: [PATCH 3/3] fix: refs #7524 select department --- src/i18n/locale/en.yml | 1 + src/i18n/locale/es.yml | 1 + src/pages/Ticket/TicketAdvanceFilter.vue | 17 ++++++++++++----- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml index 17a3e097a..1c17e92f9 100644 --- a/src/i18n/locale/en.yml +++ b/src/i18n/locale/en.yml @@ -297,6 +297,7 @@ globals: To: To stateFk: State myTeam: My team + departmentFk: Department 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 fc61936d2..5d3d9d859 100644 --- a/src/i18n/locale/es.yml +++ b/src/i18n/locale/es.yml @@ -301,6 +301,7 @@ globals: To: Hasta stateFk: Estado myTeam: Mi equipo + departmentFk: Departamento errors: statusUnauthorized: Acceso denegado statusInternalServerError: Ha ocurrido un error interno del servidor diff --git a/src/pages/Ticket/TicketAdvanceFilter.vue b/src/pages/Ticket/TicketAdvanceFilter.vue index 07c745250..182f715a3 100644 --- a/src/pages/Ticket/TicketAdvanceFilter.vue +++ b/src/pages/Ticket/TicketAdvanceFilter.vue @@ -129,11 +129,18 @@ onMounted(async () => await getItemPackingTypes()); toggle-indeterminate @update:model-value="searchFn()" /> - + + + + -- 2.40.1