From c65f15d0f0e462e2b9e365ceb1c43be6f0b41dde Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 14 Nov 2024 12:18:39 +0100 Subject: [PATCH 1/9] fix(Zone): if route is null --- src/composables/useArrayData.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/composables/useArrayData.js b/src/composables/useArrayData.js index 30bcac66b..8b06363a0 100644 --- a/src/composables/useArrayData.js +++ b/src/composables/useArrayData.js @@ -247,6 +247,7 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) { } function updateStateParams() { + if (!route?.path) return; const newUrl = { path: route.path, query: { ...(route.query ?? {}) } }; newUrl.query[store.searchUrl] = JSON.stringify(store.currentFilter); From 55b4c07e80aa32d636d172a8e268109c00d42a2c Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 14 Nov 2024 12:33:44 +0100 Subject: [PATCH 2/9] fix(ZoneCard): fix ZoneLocations searchbar --- src/pages/Zone/Card/ZoneCard.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Zone/Card/ZoneCard.vue b/src/pages/Zone/Card/ZoneCard.vue index d61c61abf..80590d561 100644 --- a/src/pages/Zone/Card/ZoneCard.vue +++ b/src/pages/Zone/Card/ZoneCard.vue @@ -25,7 +25,7 @@ function notIsLocations(ifIsFalse, ifIsTrue) { :filter-panel="ZoneFilterPanel" :search-data-key="notIsLocations('ZoneList', 'ZoneLocations')" :searchbar-props="{ - url: 'Zones', + url: notIsLocations('ZoneList', 'ZoneLocations'), label: notIsLocations(t('list.searchZone'), t('list.searchLocation')), info: t('list.searchInfo'), whereFilter: notIsLocations((value) => { From 218d041000ac794fb6c3deccb22fabe9aa0019cd Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 14 Nov 2024 12:58:41 +0100 Subject: [PATCH 3/9] fix(ZoneCard): fix ZoneLocations redirections --- src/pages/Zone/Card/ZoneCard.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/Zone/Card/ZoneCard.vue b/src/pages/Zone/Card/ZoneCard.vue index 80590d561..fa9d6c2d0 100644 --- a/src/pages/Zone/Card/ZoneCard.vue +++ b/src/pages/Zone/Card/ZoneCard.vue @@ -20,10 +20,11 @@ function notIsLocations(ifIsFalse, ifIsTrue) { - + Date: Thu, 14 Nov 2024 16:18:22 +0100 Subject: [PATCH 9/9] fix: customerFilter sales person input --- src/pages/Customer/CustomerFilter.vue | 35 ++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/src/pages/Customer/CustomerFilter.vue b/src/pages/Customer/CustomerFilter.vue index 6c50cc9df..9741ed439 100644 --- a/src/pages/Customer/CustomerFilter.vue +++ b/src/pages/Customer/CustomerFilter.vue @@ -11,6 +11,20 @@ defineProps({ required: true, }, }); +const handleSalesModelValue = (val) => ({ + or: [ + { id: val }, + { name: val }, + { nickname: { like: '%' + val + '%' } }, + { code: { like: `${val}%` } }, + ], +}); + +const exprBuilder = (param, value) => { + return { + and: [{ active: { neq: false } }, handleSalesModelValue(value)], + }; +};