From dd33dfc76615f773178c62616d38e813e39eef1c Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 10 Dec 2024 07:49:59 +0100 Subject: [PATCH 01/16] fix(VnSelect): hotFix handleKeyDown add next focus --- src/components/common/VnSelect.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue index e116be32a..e5ac05231 100644 --- a/src/components/common/VnSelect.vue +++ b/src/components/common/VnSelect.vue @@ -268,7 +268,7 @@ async function onScroll({ to, direction, from, index }) { defineExpose({ opts: myOptions }); function handleKeyDown(event) { - if (event.key === 'Tab') { + if (event.key === 'Tab' && !event.shiftKey) { event.preventDefault(); const inputValue = vnSelectRef.value?.inputValue; @@ -286,6 +286,17 @@ function handleKeyDown(event) { } vnSelectRef.value?.hidePopup(); } + + const focusableElements = document.querySelectorAll( + 'a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])' + ); + const currentIndex = Array.prototype.indexOf.call( + focusableElements, + event.target + ); + if (currentIndex >= 0 && currentIndex < focusableElements.length - 1) { + focusableElements[currentIndex + 1].focus(); + } } } From 8dcf272942228134b30829a728efac283fbb5d22 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Tue, 10 Dec 2024 08:34:48 +0100 Subject: [PATCH 02/16] fix: #8282 CustomerSummary email icon --- src/pages/Customer/Card/CustomerSummary.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Customer/Card/CustomerSummary.vue b/src/pages/Customer/Card/CustomerSummary.vue index f4c5e6e09..ae4c7f3ab 100644 --- a/src/pages/Customer/Card/CustomerSummary.vue +++ b/src/pages/Customer/Card/CustomerSummary.vue @@ -101,7 +101,7 @@ const sumRisk = ({ clientRisks }) => { Date: Tue, 10 Dec 2024 08:35:04 +0100 Subject: [PATCH 03/16] fix: replace useNotify by useQuasar --- src/pages/Account/Card/AccountDescriptorMenu.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/Account/Card/AccountDescriptorMenu.vue b/src/pages/Account/Card/AccountDescriptorMenu.vue index 6f1d2ca1f..1780b4247 100644 --- a/src/pages/Account/Card/AccountDescriptorMenu.vue +++ b/src/pages/Account/Card/AccountDescriptorMenu.vue @@ -8,7 +8,7 @@ import { useAcl } from 'src/composables/useAcl'; import { useArrayData } from 'src/composables/useArrayData'; import VnConfirm from 'src/components/ui/VnConfirm.vue'; import VnChangePassword from 'src/components/common/VnChangePassword.vue'; -import useNotify from 'src/composables/useNotify.js'; +import { useQuasar } from 'quasar'; const $props = defineProps({ hasAccount: { @@ -21,7 +21,7 @@ const { t } = useI18n(); const { hasAccount } = toRefs($props); const { openConfirmationModal } = useVnConfirm(); const route = useRoute(); -const { notify } = useNotify(); +const { notify } = useQuasar(); const account = computed(() => useArrayData('AccountId').store.data[0]); account.value.hasAccount = hasAccount.value; const entityId = computed(() => +route.params.id); From 4a6f859a867021ce6ee3da7169b732d38ee44872 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 10 Dec 2024 13:15:03 +0100 Subject: [PATCH 04/16] fix(RouteExtendedList): fix cloneRoutes --- src/pages/Route/RouteExtendedList.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pages/Route/RouteExtendedList.vue b/src/pages/Route/RouteExtendedList.vue index dbf646935..38e907ce0 100644 --- a/src/pages/Route/RouteExtendedList.vue +++ b/src/pages/Route/RouteExtendedList.vue @@ -223,10 +223,10 @@ function navigate(id) { router.push({ path: `/route/${id}` }); } -const cloneRoutes = () => { +const cloneRoutes = async () => { if (!selectedRows.value.length || !startingDate.value) return; - axios.post('Routes/clone', { - created: startingDate.value, + await axios.post('Routes/clone', { + dated: startingDate.value, ids: selectedRows.value.map((row) => row?.id), }); startingDate.value = null; @@ -274,7 +274,6 @@ const openTicketsDialog = (id) => {

{{ t('route.Select the starting date') }}

- Date: Tue, 10 Dec 2024 13:17:31 +0100 Subject: [PATCH 05/16] perf: emit options from VnSelectProvince --- src/components/CreateNewPostcodeForm.vue | 18 +++++------------- src/components/VnSelectProvince.vue | 3 ++- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/components/CreateNewPostcodeForm.vue b/src/components/CreateNewPostcodeForm.vue index d3d6708f0..c656fcb2f 100644 --- a/src/components/CreateNewPostcodeForm.vue +++ b/src/components/CreateNewPostcodeForm.vue @@ -25,7 +25,6 @@ const townsFetchDataRef = ref(false); const townFilter = ref({}); const countriesRef = ref(false); -const provincesFetchDataRef = ref(false); const provincesOptions = ref([]); const townsOptions = ref([]); const town = ref({}); @@ -71,9 +70,6 @@ async function setProvince(id, data) { await fetchTowns(); } async function onProvinceCreated(data) { - await provincesFetchDataRef.value.fetch({ - where: { countryFk: postcodeFormData.countryFk }, - }); postcodeFormData.provinceFk = data.id; } function provinceByCountry(countryFk = postcodeFormData.countryFk) { @@ -92,7 +88,6 @@ function setTown(newTown, data) { data.countryFk = newTown?.province?.countryFk ?? newTown; } async function onCityCreated(newTown, formData) { - await provincesFetchDataRef.value.fetch(); newTown.province = provincesOptions.value.find( (province) => province.id === newTown.provinceFk ); @@ -125,14 +120,6 @@ async function filterTowns(name) { diff --git a/src/pages/Ticket/TicketList.vue b/src/pages/Ticket/TicketList.vue index 6f6c556ca..c06dcfa39 100644 --- a/src/pages/Ticket/TicketList.vue +++ b/src/pages/Ticket/TicketList.vue @@ -455,6 +455,15 @@ function setReference(data) { data-key="TicketList" :label="t('Search ticket')" :info="t('You can search by ticket id or alias')" + :before-search=" + (filter) => { + if (filter.params.search) { + delete filter.params.from; + delete filter.params.to; + } + return filter; + } + " />