From b1bdfbb9f780a1a1305e02c4b9c338b98c7a4556 Mon Sep 17 00:00:00 2001
From: "Indoteknik ." <andrifebriyadiputra@gmail.com>
Date: Fri, 15 Aug 2025 13:58:59 +0700
Subject: (andri) fix switch account

---
 src/pages/my/profile.jsx | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

(limited to 'src/pages/my/profile.jsx')

diff --git a/src/pages/my/profile.jsx b/src/pages/my/profile.jsx
index 887489e0..b65a5e4d 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();
@@ -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>
                 )}
-- 
cgit v1.2.3


From 1d072f532c5c24436ca05d9707eeeb910bb4c756 Mon Sep 17 00:00:00 2001
From: "Indoteknik ." <andrifebriyadiputra@gmail.com>
Date: Sat, 16 Aug 2025 13:24:26 +0700
Subject: fix

---
 src/pages/my/profile.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/pages/my/profile.jsx')

diff --git a/src/pages/my/profile.jsx b/src/pages/my/profile.jsx
index 887489e0..5187cdca 100644
--- a/src/pages/my/profile.jsx
+++ b/src/pages/my/profile.jsx
@@ -73,7 +73,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">
-- 
cgit v1.2.3

