From 4a6f859a867021ce6ee3da7169b732d38ee44872 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 10 Dec 2024 13:15:03 +0100 Subject: [PATCH 01/13] 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 02/13] 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; + } + " />