From 3d13fc68642d0b9d0b88e3284f59d8a58a1427bb Mon Sep 17 00:00:00 2001 From: James Collins Date: Sun, 12 Mar 2023 13:51:12 +1000 Subject: [PATCH] use new filter option --- resources/js/views/EventList.vue | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/resources/js/views/EventList.vue b/resources/js/views/EventList.vue index 699ec3c..cbaac9f 100644 --- a/resources/js/views/EventList.vue +++ b/resources/js/views/EventList.vue @@ -95,11 +95,21 @@ const handleLoad = async () => { try { let query = {}; + /* + cats, dogs + (title:"cats, dogs",OR,content:"cats, dogs") + + "cats, dogs", mice + (title:""cats, dogs", mice",OR,content:"\"cats, dogs\", mice") + */ + if (filterKeywords.value && filterKeywords.value.length > 0) { - query["q"] = filterKeywords.value; + let value = filterKeywords.value.replace(/"/g, '\\"'); + + query["filter"] = `(title:"${value}",OR,content:"${value}")`; } if (filterLocation.value && filterLocation.value.length > 0) { - query["qlocation"] = filterLocation.value; + query["location"] = filterLocation.value; } if (filterDateRange.value && filterDateRange.value.length > 0) { let error = false;