summaryrefslogtreecommitdiff
path: root/src/pages
diff options
context:
space:
mode:
authorIndoteknik . <andrifebriyadiputra@gmail.com>2025-08-16 14:46:48 +0700
committerIndoteknik . <andrifebriyadiputra@gmail.com>2025-08-16 14:46:48 +0700
commitc6b75363821e5c1153d8a9e2c1a4326568ab6026 (patch)
treed5940768d254d3aa6862c32012002d5274467227 /src/pages
parentba157d5e0cd30ae2ed13edba051038c2c7bb1a1f (diff)
parente3bf34095ac7571d04ebddba6f04815d7a71ed13 (diff)
fix merge
Diffstat (limited to 'src/pages')
-rw-r--r--src/pages/api/shop/search.js3
-rw-r--r--src/pages/my/profile.jsx11
2 files changed, 8 insertions, 6 deletions
diff --git a/src/pages/api/shop/search.js b/src/pages/api/shop/search.js
index e14b0ca2..3d258a97 100644
--- a/src/pages/api/shop/search.js
+++ b/src/pages/api/shop/search.js
@@ -90,7 +90,8 @@ export default async function handler(req, res) {
];
if (orderBy === 'stock') {
- filterQueries.push('stock_total_f:{0 TO *}');
+ filterQueries.push('stock_total_f:{1 TO *}&sort=stock_total_f desc');
+ // filterQueries.push(`stock_total_f DESC`)
}
if (fq && source != 'similar' && typeof fq != 'string') {
diff --git a/src/pages/my/profile.jsx b/src/pages/my/profile.jsx
index 887489e0..98e95b4f 100644
--- a/src/pages/my/profile.jsx
+++ b/src/pages/my/profile.jsx
@@ -18,6 +18,7 @@ import { useRouter } from 'next/router';
export default function Profile() {
const auth = useAuth();
+ console.log('auth', auth);
const [isChecked, setIsChecked] = useState(false);
const [ubahAkun, setUbahAkun] = useState(false);
const [isAprove, setIsAprove] = useState();
@@ -73,7 +74,7 @@ export default function Profile() {
<>
<BottomPopup
active={changeConfirmation}
- close={() => setChangeConfirmation(false)} // Menutup popup
+ close={() => setChangeConfirmation(false)} //Menutup popup
title="Ubah type akun"
>
<div className="leading-7 text-gray_r-12/80">
@@ -111,9 +112,9 @@ export default function Profile() {
<p className="ml-2">Ubah ke akun bisnis</p>
</div>
))}
- {isChecked && (
+ {isChecked && ubahAkun !== 'pending' && (
<div>
- <SwitchAccount company_type="nonpkp" />
+ <SwitchAccount company_type="nonpkp" setIsAprove={setIsAprove} setUbahAkun={setUbahAkun}/>
<Divider />
</div>
)}
@@ -148,9 +149,9 @@ export default function Profile() {
<p className="ml-2">Ubah ke akun bisnis</p>
</div>
))}
- {isChecked && (
+ {isChecked && ubahAkun !== 'pending' && (
<div>
- <SwitchAccount company_type="nonpkp" />
+ <SwitchAccount company_type="nonpkp" setIsAprove={setIsAprove} setUbahAkun={setUbahAkun}/>
<Divider />
</div>
)}