From 1cca7d45a062eba11e5f13acba5d351e81086603 Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Fri, 15 Dec 2023 16:16:43 +0700 Subject: [PATCH] feat: search in current position --- Services/client/src/components/PageLayout.vue | 9 ++++++++- .../src/modules/01_user/components/SearchBar.vue | 14 ++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Services/client/src/components/PageLayout.vue b/Services/client/src/components/PageLayout.vue index dc5ed29..8dcad38 100644 --- a/Services/client/src/components/PageLayout.vue +++ b/Services/client/src/components/PageLayout.vue @@ -105,7 +105,14 @@ const folderFormComponent = ref>() > - ผลการค้นหา + + ผลการค้นหา + {{ + mode === 'admin' && + currentInfo.path !== '/' && + currentInfo.path.split('/').join(' / ') + }} + ({ AND: [], OR: [], @@ -61,6 +65,12 @@ async function submitSearch() { value: mime.getType(searchData.value.value) || '', exact: true, }) + if (currentInfo.value.path !== '/') { + submitSearchData.value.AND.push({ + field: 'path', + value: currentInfo.value.path, + }) + } } else { submitSearchData.value.OR.push({ field: searchData.value.field,