From 2b2ccbc6a105da40fb07f20fc012d4cb87589f9f Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 21 Oct 2024 12:14:54 +0200 Subject: [PATCH 01/18] 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 From a4358ec0edbcebd07fcf427c8a49097913b62dcb Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 21 Oct 2024 12:36:16 +0200 Subject: [PATCH 02/18] 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()); - - - - - From 0fbd5f45e1c929aaaa1c1918c346ee9e7fcb56eb Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 21 Oct 2024 14:29:29 +0200 Subject: [PATCH 03/18] 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()" /> - + + + + From f751408de2bfc1e34e6294f294de7365dd699a07 Mon Sep 17 00:00:00 2001 From: jorgep Date: Tue, 22 Oct 2024 13:22:43 +0200 Subject: [PATCH 04/18] feat: refs #8083 add change state btn --- src/components/VnTable/VnTable.vue | 3 + src/components/common/VnBtnSelect.vue | 19 + src/i18n/locale/en.yml | 2 +- src/i18n/locale/es.yml | 2 +- src/pages/Claim/Card/ClaimSummary.vue | 2 +- src/pages/Ticket/Card/TicketExpedition.vue | 338 +++++++----------- src/pages/Ticket/Card/TicketSummary.vue | 2 +- .../ticket/ticketExpedition.spec.js | 28 ++ test/cypress/support/commands.js | 8 + 9 files changed, 190 insertions(+), 214 deletions(-) create mode 100644 src/components/common/VnBtnSelect.vue create mode 100644 test/cypress/integration/ticket/ticketExpedition.spec.js diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index f18892a31..9d64591e9 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -127,6 +127,7 @@ const splittedColumns = ref({ columns: [] }); const columnsVisibilitySkipped = ref(); const createForm = ref(); const tableFilterRef = ref([]); +const tableRef = ref(); const tableModes = [ { @@ -308,6 +309,7 @@ defineExpose({ selected, CrudModelRef, params, + tableRef, }); function handleOnDataSaved(_) { @@ -398,6 +400,7 @@ function handleOnDataSaved(_) {