summaryrefslogtreecommitdiff
path: root/src/pages
diff options
context:
space:
mode:
authorMiqdad <ahmadmiqdad27@gmail.com>2025-05-31 21:39:53 +0700
committerMiqdad <ahmadmiqdad27@gmail.com>2025-05-31 21:39:53 +0700
commit77f976d3bd09d9e00d4d55bbd40579b439405d96 (patch)
treea8959bba3d8a51570c439789f92653409a0065ae /src/pages
parentca05a70e98e9066882de6394ffbd89db7af2cb9d (diff)
parent2a1dea70b8f0062fe8eebeb7139a7b77a24e220b (diff)
Merge branch 'new-release' of https://bitbucket.org/altafixco/next-indoteknik into biteship-merge
# Conflicts: # src/lib/checkout/components/Checkout.jsx # src/lib/transaction/components/Transaction.jsx
Diffstat (limited to 'src/pages')
-rw-r--r--src/pages/api/flashsale-header.js2
-rw-r--r--src/pages/api/shop/search.js5
-rw-r--r--src/pages/daftar-merchant.jsx2
3 files changed, 7 insertions, 2 deletions
diff --git a/src/pages/api/flashsale-header.js b/src/pages/api/flashsale-header.js
index 578801ae..916a9cd2 100644
--- a/src/pages/api/flashsale-header.js
+++ b/src/pages/api/flashsale-header.js
@@ -35,7 +35,7 @@ export default async function handler(req, res) {
}
return res.status(200).json({ data });
} else {
- const flashSale = await odooApi('GET', `/api/v1/flashsale/header`);
+ const flashSale = await odooApi('GET', `/api/v1/flashsale/header?is_show_program=true`);
if (flashSale.length === 0) {
return res.status(200).json({ data: [] });
} else {
diff --git a/src/pages/api/shop/search.js b/src/pages/api/shop/search.js
index 63ec7ca0..e14b0ca2 100644
--- a/src/pages/api/shop/search.js
+++ b/src/pages/api/shop/search.js
@@ -19,6 +19,7 @@ export default async function handler(req, res) {
source = '',
} = req.query;
+
let { stock = '' } = req.query;
let paramOrderBy = '';
switch (orderBy) {
@@ -88,6 +89,10 @@ export default async function handler(req, res) {
'price_tier1_v2_f:[1 TO *]',
];
+ if (orderBy === 'stock') {
+ filterQueries.push('stock_total_f:{0 TO *}');
+ }
+
if (fq && source != 'similar' && typeof fq != 'string') {
// filterQueries.push(fq);
fq.push(...filterQueries);
diff --git a/src/pages/daftar-merchant.jsx b/src/pages/daftar-merchant.jsx
index e1fa9bcb..945a0060 100644
--- a/src/pages/daftar-merchant.jsx
+++ b/src/pages/daftar-merchant.jsx
@@ -12,4 +12,4 @@ export default function DaftarMerchant() {
</BasicLayout>
</>
)
-}
+} \ No newline at end of file