From 455ebc5c02657a6c1c328977e08176e222c56ddd Mon Sep 17 00:00:00 2001
From: trisusilo48 <tri.susilo@altama.co.id>
Date: Mon, 5 Aug 2024 13:12:22 +0700
Subject: query filter

---
 src/lib/product/components/ProductSearch.jsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/lib/product/components/ProductSearch.jsx')

diff --git a/src/lib/product/components/ProductSearch.jsx b/src/lib/product/components/ProductSearch.jsx
index b1a5d409..fb9017f4 100644
--- a/src/lib/product/components/ProductSearch.jsx
+++ b/src/lib/product/components/ProductSearch.jsx
@@ -38,7 +38,7 @@ const ProductSearch = ({
   const [q, setQ] = useState(query?.q || '*');
   const [search, setSearch] = useState(query?.q || '*');
   const [limit, setLimit] = useState(query?.limit || 30);
-  const [orderBy, setOrderBy] = useState(router.query?.orderBy || 'popular');
+  const [orderBy, setOrderBy] = useState(router.query?.orderBy);
   if (defaultBrand) query.brand = defaultBrand.toLowerCase();
   const { productSearch } = useProductSearch({
     query: { ...query, q, limit, orderBy },
@@ -148,6 +148,7 @@ const ProductSearch = ({
   
 
   const orderOptions = [
+    { value: '', label: 'Pilih Filter' },
     { value: 'price-asc', label: 'Harga Terendah' },
     { value: 'price-desc', label: 'Harga Tertinggi' },
     { value: 'popular', label: 'Populer' },
-- 
cgit v1.2.3


From e9f3435ceb5d85e4926f26c3a893b96edb898918 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Sat, 24 Aug 2024 09:29:31 +0700
Subject: <iman> update ready stock search

---
 src/lib/product/components/ProductSearch.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/lib/product/components/ProductSearch.jsx')

diff --git a/src/lib/product/components/ProductSearch.jsx b/src/lib/product/components/ProductSearch.jsx
index 9f19aced..24cdc690 100644
--- a/src/lib/product/components/ProductSearch.jsx
+++ b/src/lib/product/components/ProductSearch.jsx
@@ -42,7 +42,7 @@ const ProductSearch = ({
   const [q, setQ] = useState(query?.q || '*');
   const [search, setSearch] = useState(query?.q || '*');
   const [limit, setLimit] = useState(router.query?.limit || 30);
-  const [orderBy, setOrderBy] = useState(router.query?.orderBy || 'popular');
+  const [orderBy, setOrderBy] = useState(router.query?.orderBy || 'stock');
   const [finalQuery, setFinalQuery] = useState({});
   const [queryFinal, setQueryFinal] = useState({});
   const [dataCategoriesProduct, setDataCategoriesProduct] = useState([])
-- 
cgit v1.2.3


From 49118c78bf93fbb4d35b163e4c4b6db0f0f8be27 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Sat, 24 Aug 2024 10:25:13 +0700
Subject: <iman> update search sort by stock on populer

---
 src/lib/product/components/ProductSearch.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/lib/product/components/ProductSearch.jsx')

diff --git a/src/lib/product/components/ProductSearch.jsx b/src/lib/product/components/ProductSearch.jsx
index 24cdc690..9f19aced 100644
--- a/src/lib/product/components/ProductSearch.jsx
+++ b/src/lib/product/components/ProductSearch.jsx
@@ -42,7 +42,7 @@ const ProductSearch = ({
   const [q, setQ] = useState(query?.q || '*');
   const [search, setSearch] = useState(query?.q || '*');
   const [limit, setLimit] = useState(router.query?.limit || 30);
-  const [orderBy, setOrderBy] = useState(router.query?.orderBy || 'stock');
+  const [orderBy, setOrderBy] = useState(router.query?.orderBy || 'popular');
   const [finalQuery, setFinalQuery] = useState({});
   const [queryFinal, setQueryFinal] = useState({});
   const [dataCategoriesProduct, setDataCategoriesProduct] = useState([])
-- 
cgit v1.2.3


From 24d28d7538d712dde9d0aa3570e7f4703b3e2f55 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Mon, 26 Aug 2024 10:55:34 +0700
Subject: <iman> update order by default product card

---
 src/lib/product/components/ProductSearch.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/lib/product/components/ProductSearch.jsx')

diff --git a/src/lib/product/components/ProductSearch.jsx b/src/lib/product/components/ProductSearch.jsx
index 9f19aced..eaeac71a 100644
--- a/src/lib/product/components/ProductSearch.jsx
+++ b/src/lib/product/components/ProductSearch.jsx
@@ -42,7 +42,7 @@ const ProductSearch = ({
   const [q, setQ] = useState(query?.q || '*');
   const [search, setSearch] = useState(query?.q || '*');
   const [limit, setLimit] = useState(router.query?.limit || 30);
-  const [orderBy, setOrderBy] = useState(router.query?.orderBy || 'popular');
+  const [orderBy, setOrderBy] = useState(router.query?.orderBy);
   const [finalQuery, setFinalQuery] = useState({});
   const [queryFinal, setQueryFinal] = useState({});
   const [dataCategoriesProduct, setDataCategoriesProduct] = useState([])
-- 
cgit v1.2.3

