From 1a697aa018d3bfac296074b874a00b1d8bed8e44 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 1 Oct 2024 15:02:42 +0200 Subject: [PATCH 01/22] feat: refs #7679 #7679 add sortBy and limit --- src/components/CreateNewPostcodeForm.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/CreateNewPostcodeForm.vue b/src/components/CreateNewPostcodeForm.vue index 99cba5360..32e2e6f8b 100644 --- a/src/components/CreateNewPostcodeForm.vue +++ b/src/components/CreateNewPostcodeForm.vue @@ -125,16 +125,26 @@ async function handleCountries(data) { - + Date: Tue, 1 Oct 2024 21:56:12 +0200 Subject: [PATCH 02/22] perf: refs #7679 add sortBy & limit whe retrieve Autonomies --- src/components/CreateNewProvinceForm.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/CreateNewProvinceForm.vue b/src/components/CreateNewProvinceForm.vue index 4c1d96930..3c1f6b6f2 100644 --- a/src/components/CreateNewProvinceForm.vue +++ b/src/components/CreateNewProvinceForm.vue @@ -46,6 +46,8 @@ const onDataSaved = (dataSaved, requestResponse) => { }, }" url="Autonomies/location" + :sort-by="['name ASC']" + :limit="100" /> Date: Wed, 2 Oct 2024 09:29:05 +0200 Subject: [PATCH 03/22] perf: refs #7679 #7679 improve watch --- src/components/CreateNewPostcodeForm.vue | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/components/CreateNewPostcodeForm.vue b/src/components/CreateNewPostcodeForm.vue index 32e2e6f8b..c6bf8be10 100644 --- a/src/components/CreateNewPostcodeForm.vue +++ b/src/components/CreateNewPostcodeForm.vue @@ -79,14 +79,20 @@ async function onProvinceCreated(data) { watch( () => [postcodeFormData.countryFk], async (newCountryFk, oldValueFk) => { - if (!!oldValueFk[0] && newCountryFk[0] !== oldValueFk[0]) { + if (Array.isArray(newCountryFk)) { + newCountryFk = newCountryFk[0]; + } + if (Array.isArray(oldValueFk)) { + oldValueFk = oldValueFk[0]; + } + if (!!oldValueFk && newCountryFk !== oldValueFk) { postcodeFormData.provinceFk = null; postcodeFormData.townFk = null; } - if ((newCountryFk, newCountryFk !== postcodeFormData.countryFk)) { + if (oldValueFk !== newCountryFk) { await provincesFetchDataRef.value.fetch({ where: { - countryFk: newCountryFk[0], + countryFk: newCountryFk, }, }); await townsFetchDataRef.value.fetch({ @@ -103,9 +109,12 @@ watch( watch( () => postcodeFormData.provinceFk, async (newProvinceFk) => { - if (newProvinceFk[0] && newProvinceFk[0] !== postcodeFormData.provinceFk) { + if (Array.isArray(newProvinceFk)) { + newProvinceFk = newProvinceFk[0]; + } + if (newProvinceFk !== postcodeFormData.provinceFk) { await townsFetchDataRef.value.fetch({ - where: { provinceFk: newProvinceFk[0] }, + where: { provinceFk: newProvinceFk }, }); } } From bd3de77cbdde427945c1b201872ab70517df61ea Mon Sep 17 00:00:00 2001 From: Jon Date: Mon, 7 Oct 2024 09:10:20 +0200 Subject: [PATCH 04/22] fix: changes in list and filter to fix section --- src/pages/Ticket/TicketFilter.vue | 79 +++++++++++++++++++++++++++++++ src/pages/Ticket/TicketList.vue | 2 +- 2 files changed, 80 insertions(+), 1 deletion(-) diff --git a/src/pages/Ticket/TicketFilter.vue b/src/pages/Ticket/TicketFilter.vue index 8f71aad08..fee946ccf 100644 --- a/src/pages/Ticket/TicketFilter.vue +++ b/src/pages/Ticket/TicketFilter.vue @@ -20,11 +20,33 @@ const provinces = ref([]); const states = ref([]); const agencies = ref([]); const warehouses = ref([]); +const alertLevels = ref([]); +const groupedStates = ref([]); + +const getGroupedStates = () => { + for (const state of alertLevels.value) { + groupedStates.value.push({ + id: state.id, + name: t(`${state.code}`), + code: state.code, + }); + } + console.log(groupedStates.value); +}; @@ -255,6 +321,11 @@ en: provinceFk: Province agencyModeFk: Agency warehouseFk: Warehouse + FREE: Free + ON_PREPARATION: On preparation + PACKED: Packed + DELIVERED: Delivered + ON_PREVIOUS: ON_PREVIOUS es: params: search: Contiene @@ -288,4 +359,12 @@ es: Yes: Si No: No Days onward: Días adelante + Grouped state: Estado agrupado + FREE: Libre + ON_PREPARATION: En preparación + PACKED: Encajado + DELIVERED: Servido + ON_PREVIOUS: ON_PREVIOUS + Collection: Colección + Nickname: Nombre mostrado diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue index ad97e75c1..d71ad7dfe 100644 --- a/src/pages/Ticket/TicketList.vue +++ b/src/pages/Ticket/TicketList.vue @@ -548,7 +548,7 @@ function setReference(data) { From afc52f6ceaa41fe54459926d10398a25c4f5b56a Mon Sep 17 00:00:00 2001 From: Jon Date: Mon, 7 Oct 2024 13:29:43 +0200 Subject: [PATCH 05/22] fix: changes in sale and summary --- .../Ticket/Card/TicketDescriptorMenu.vue | 9 ++- src/pages/Ticket/Card/TicketEditMana.vue | 26 +++++++ src/pages/Ticket/Card/TicketSale.vue | 19 +++++ src/pages/Ticket/Card/TicketSummary.vue | 71 ++++++++++++++----- src/pages/Ticket/TicketFilter.vue | 12 ++-- 5 files changed, 110 insertions(+), 27 deletions(-) diff --git a/src/pages/Ticket/Card/TicketDescriptorMenu.vue b/src/pages/Ticket/Card/TicketDescriptorMenu.vue index 73104fe27..caf82ed24 100644 --- a/src/pages/Ticket/Card/TicketDescriptorMenu.vue +++ b/src/pages/Ticket/Card/TicketDescriptorMenu.vue @@ -3,7 +3,7 @@ import axios from 'axios'; import { ref, toRefs } from 'vue'; import { useQuasar } from 'quasar'; import { useI18n } from 'vue-i18n'; -import { useRouter } from 'vue-router'; +import { useRoute, useRouter } from 'vue-router'; import { usePrintService } from 'composables/usePrintService'; import SendEmailDialog from 'components/common/SendEmailDialog.vue'; import VnConfirm from 'components/ui/VnConfirm.vue'; @@ -23,6 +23,7 @@ const props = defineProps({ required: true, }, }); +const route = useRoute(); const { push, currentRoute } = useRouter(); const { dialog, notify } = useQuasar(); @@ -334,7 +335,11 @@ async function handleInvoiceOutData() { {{ toPercentage(row.discount / 100) }} diff --git a/src/pages/Ticket/Card/TicketSummary.vue b/src/pages/Ticket/Card/TicketSummary.vue index 2ca0b5727..ef5024e36 100644 --- a/src/pages/Ticket/Card/TicketSummary.vue +++ b/src/pages/Ticket/Card/TicketSummary.vue @@ -19,6 +19,7 @@ import VnTitle from 'src/components/common/VnTitle.vue'; import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue'; import ZoneDescriptorProxy from 'src/pages/Zone/Card/ZoneDescriptorProxy.vue'; import VnSelect from 'src/components/common/VnSelect.vue'; +import TicketDescriptorMenu from './TicketDescriptorMenu.vue'; const route = useRoute(); const { notify } = useNotify(); @@ -68,7 +69,7 @@ function isEditable() { async function changeState(value) { try { - stateBtnDropdownRef.value.hide(); + stateBtnDropdownRef.value?.hide(); const formData = { ticketFk: entityId.value, code: value, @@ -108,6 +109,10 @@ function getNoteValue(description) { function toTicketUrl(section) { return '#/ticket/' + entityId.value + '/' + section; } +function isOnTicketCard() { + const currentPath = route.path; + return currentPath.startsWith('/ticket'); +} From 0fbd5f45e1c929aaaa1c1918c346ee9e7fcb56eb Mon Sep 17 00:00:00 2001 From: jorgep Date: Mon, 21 Oct 2024 14:29:29 +0200 Subject: [PATCH 14/22] 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 15/22] 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(_) {