From 51afc239b61ae8ac74764e46861f8b627614fe2a Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Wed, 18 Sep 2024 12:57:52 +0530 Subject: [PATCH] Improved: searching on draft detail page to make exact search using sku as when using like-wise searching, if the sku searched is a subset of another sku then the results are displayed as expected --- src/views/DraftDetail.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/DraftDetail.vue b/src/views/DraftDetail.vue index 661be8f9..abd6ef4f 100644 --- a/src/views/DraftDetail.vue +++ b/src/views/DraftDetail.vue @@ -396,7 +396,7 @@ async function findProduct() { try { const resp = await ProductService.fetchProducts({ - "filters": ['isVirtual: false', `sku: *${queryString.value}*`], + "filters": ['isVirtual: false', `sku: ${queryString.value}`], // Made exact searching as when using fuzzy searching the products are not searched as expected "viewSize": 1 // as we only need a single record }) if (!hasError(resp) && resp.data.response?.docs?.length) {