From cb1c0503430d520c7ad8c586fbf86e62e9989979 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 14 Nov 2024 16:18:22 +0100 Subject: [PATCH] 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)], + }; +};