From 34f33b1cba1e4fbb6faacc151a3b59a1ba221d60 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Tue, 10 Sep 2024 16:26:17 +0700
Subject: <iman>add feature switch account

---
 src/pages/my/profile.jsx | 68 ++++++++++++++++++++++++++++++++----------------
 1 file changed, 46 insertions(+), 22 deletions(-)

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

diff --git a/src/pages/my/profile.jsx b/src/pages/my/profile.jsx
index 25c3a608..ca6f4700 100644
--- a/src/pages/my/profile.jsx
+++ b/src/pages/my/profile.jsx
@@ -1,16 +1,23 @@
-import Divider from '@/core/components/elements/Divider/Divider'
-import AppLayout from '@/core/components/layouts/AppLayout'
-import BasicLayout from '@/core/components/layouts/BasicLayout'
-import DesktopView from '@/core/components/views/DesktopView'
-import MobileView from '@/core/components/views/MobileView'
-import useAuth from '@/core/hooks/useAuth'
-import CompanyProfile from '@/lib/auth/components/CompanyProfile'
-import IsAuth from '@/lib/auth/components/IsAuth'
-import Menu from '@/lib/auth/components/Menu'
-import PersonalProfile from '@/lib/auth/components/PersonalProfile'
+import Divider from '@/core/components/elements/Divider/Divider';
+import AppLayout from '@/core/components/layouts/AppLayout';
+import BasicLayout from '@/core/components/layouts/BasicLayout';
+import DesktopView from '@/core/components/views/DesktopView';
+import MobileView from '@/core/components/views/MobileView';
+import useAuth from '@/core/hooks/useAuth';
+import CompanyProfile from '@/lib/auth/components/CompanyProfile';
+import SwitchAccount from '@/lib/auth/components/SwitchAccount';
+import IsAuth from '@/lib/auth/components/IsAuth';
+import Menu from '@/lib/auth/components/Menu';
+import PersonalProfile from '@/lib/auth/components/PersonalProfile';
+import { Button, Checkbox, Spinner, Tooltip } from '@chakra-ui/react';
+import { useState } from 'react';
 
 export default function Profile() {
-  const auth = useAuth()
+  const auth = useAuth();
+  const [isChecked, setIsChecked] = useState(false);
+  const handleChange = async () => {
+    setIsChecked(!isChecked);
+  };
   return (
     <IsAuth>
       <MobileView>
@@ -23,19 +30,36 @@ export default function Profile() {
 
       <DesktopView>
         <BasicLayout>
-        <div className='container mx-auto flex py-10'>
-          <div className='w-3/12 pr-4'>
-            <Menu />
-          </div>
-          <div className='w-9/12 bg-white border border-gray_r-6 rounded'>
-            <PersonalProfile />
-            <Divider />
-            {auth?.parentId && <CompanyProfile />}
-
-          </div>
+          <div className='container mx-auto flex py-10'>
+            <div className='w-3/12 pr-4'>
+              <Menu />
+            </div>
+            <div className='w-9/12 bg-white border border-gray_r-6 rounded'>
+              {!auth?.parentId && (
+                <div className='text-sm p-4 flex items-center'>
+                  <Checkbox
+                    borderColor='gray.600'
+                    colorScheme='red'
+                    size='lg'
+                    isChecked={isChecked}
+                    onChange={handleChange}
+                  />
+                  <p className='ml-2'>Ubah ke akun bisnis</p>
+                </div>
+              )}
+              {isChecked && (
+                <div>
+                  <SwitchAccount />
+                  <Divider />
+                </div>
+              )}
+              <PersonalProfile />
+              <Divider />
+              {auth?.parentId && <CompanyProfile />}
+            </div>
           </div>
         </BasicLayout>
       </DesktopView>
     </IsAuth>
-  )
+  );
 }
-- 
cgit v1.2.3


From 752e55686dfee0d536f9e4e128336e91681ba794 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Wed, 11 Sep 2024 17:07:49 +0700
Subject: <iman> update switch account

---
 src/pages/my/profile.jsx | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

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

diff --git a/src/pages/my/profile.jsx b/src/pages/my/profile.jsx
index ca6f4700..c9742a14 100644
--- a/src/pages/my/profile.jsx
+++ b/src/pages/my/profile.jsx
@@ -10,14 +10,25 @@ import IsAuth from '@/lib/auth/components/IsAuth';
 import Menu from '@/lib/auth/components/Menu';
 import PersonalProfile from '@/lib/auth/components/PersonalProfile';
 import { Button, Checkbox, Spinner, Tooltip } from '@chakra-ui/react';
-import { useState } from 'react';
-
+import { useState, useEffect } from 'react';
+import switchAccountProgresApi from '@/lib/auth/api/switchAccountProgresApi.js';
 export default function Profile() {
   const auth = useAuth();
   const [isChecked, setIsChecked] = useState(false);
+  const [isAprove, setIsAprove] = useState(false);
   const handleChange = async () => {
     setIsChecked(!isChecked);
   };
+  useEffect(() => {
+    const loadPromo = async () => {
+      const progresSwitchAccount = await switchAccountProgresApi();
+      if (progresSwitchAccount) {
+        setIsAprove(true);
+      }
+      console.log('progresSwitchAccount', progresSwitchAccount);
+    };
+    loadPromo();
+  }, []);
   return (
     <IsAuth>
       <MobileView>
@@ -35,7 +46,7 @@ export default function Profile() {
               <Menu />
             </div>
             <div className='w-9/12 bg-white border border-gray_r-6 rounded'>
-              {!auth?.parentId && (
+              {!auth?.parentId && !isAprove && (
                 <div className='text-sm p-4 flex items-center'>
                   <Checkbox
                     borderColor='gray.600'
-- 
cgit v1.2.3


From ab0782b5cf7b65930b0b40528b9205f3f0dfc3a0 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Thu, 12 Sep 2024 10:11:02 +0700
Subject: <iman> update switch account

---
 src/pages/my/profile.jsx | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

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

diff --git a/src/pages/my/profile.jsx b/src/pages/my/profile.jsx
index c9742a14..4beaae5f 100644
--- a/src/pages/my/profile.jsx
+++ b/src/pages/my/profile.jsx
@@ -9,13 +9,14 @@ import SwitchAccount from '@/lib/auth/components/SwitchAccount';
 import IsAuth from '@/lib/auth/components/IsAuth';
 import Menu from '@/lib/auth/components/Menu';
 import PersonalProfile from '@/lib/auth/components/PersonalProfile';
+import StatusSwitchAccount from '@/lib/auth/components/StatusSwitchAccount';
 import { Button, Checkbox, Spinner, Tooltip } from '@chakra-ui/react';
 import { useState, useEffect } from 'react';
 import switchAccountProgresApi from '@/lib/auth/api/switchAccountProgresApi.js';
 export default function Profile() {
   const auth = useAuth();
   const [isChecked, setIsChecked] = useState(false);
-  const [isAprove, setIsAprove] = useState(false);
+  const [isAprove, setIsAprove] = useState('unknown');
   const handleChange = async () => {
     setIsChecked(!isChecked);
   };
@@ -23,12 +24,13 @@ export default function Profile() {
     const loadPromo = async () => {
       const progresSwitchAccount = await switchAccountProgresApi();
       if (progresSwitchAccount) {
-        setIsAprove(true);
+        setIsAprove(progresSwitchAccount.status);
       }
       console.log('progresSwitchAccount', progresSwitchAccount);
     };
     loadPromo();
   }, []);
+  console.log('isAprove', isAprove);
   return (
     <IsAuth>
       <MobileView>
@@ -46,7 +48,7 @@ export default function Profile() {
               <Menu />
             </div>
             <div className='w-9/12 bg-white border border-gray_r-6 rounded'>
-              {!auth?.parentId && !isAprove && (
+              {!auth?.parentId && isAprove == 'unknown' && (
                 <div className='text-sm p-4 flex items-center'>
                   <Checkbox
                     borderColor='gray.600'
@@ -64,6 +66,12 @@ export default function Profile() {
                   <Divider />
                 </div>
               )}
+              {!auth?.parentId
+                ? auth?.parentId
+                : auth?.parent_id &&
+                  isAprove != 'unknown' && (
+                    <StatusSwitchAccount status={isAprove} />
+                  )}
               <PersonalProfile />
               <Divider />
               {auth?.parentId && <CompanyProfile />}
-- 
cgit v1.2.3


From f0f002ff77481db91d264069d09f580d58001a8c Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Mon, 23 Sep 2024 13:15:02 +0700
Subject: <iman> update switch account

---
 src/pages/my/profile.jsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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

diff --git a/src/pages/my/profile.jsx b/src/pages/my/profile.jsx
index 4beaae5f..13cab06d 100644
--- a/src/pages/my/profile.jsx
+++ b/src/pages/my/profile.jsx
@@ -16,6 +16,7 @@ import switchAccountProgresApi from '@/lib/auth/api/switchAccountProgresApi.js';
 export default function Profile() {
   const auth = useAuth();
   const [isChecked, setIsChecked] = useState(false);
+  const [ubahAkun, setUbahAkun] = useState(false);
   const [isAprove, setIsAprove] = useState('unknown');
   const handleChange = async () => {
     setIsChecked(!isChecked);
@@ -25,6 +26,7 @@ export default function Profile() {
       const progresSwitchAccount = await switchAccountProgresApi();
       if (progresSwitchAccount) {
         setIsAprove(progresSwitchAccount.status);
+        setUbahAkun(progresSwitchAccount.status === 'unknown');
       }
       console.log('progresSwitchAccount', progresSwitchAccount);
     };
@@ -48,7 +50,7 @@ export default function Profile() {
               <Menu />
             </div>
             <div className='w-9/12 bg-white border border-gray_r-6 rounded'>
-              {!auth?.parentId && isAprove == 'unknown' && (
+              {!auth?.parentId && ubahAkun && (
                 <div className='text-sm p-4 flex items-center'>
                   <Checkbox
                     borderColor='gray.600'
-- 
cgit v1.2.3


From f404f9801db1f234ae03ec9c9542ba5d4aa1bf46 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Mon, 23 Sep 2024 14:17:52 +0700
Subject: <iman> delete console.log

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

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

diff --git a/src/pages/my/profile.jsx b/src/pages/my/profile.jsx
index 13cab06d..0eeec6cf 100644
--- a/src/pages/my/profile.jsx
+++ b/src/pages/my/profile.jsx
@@ -28,11 +28,9 @@ export default function Profile() {
         setIsAprove(progresSwitchAccount.status);
         setUbahAkun(progresSwitchAccount.status === 'unknown');
       }
-      console.log('progresSwitchAccount', progresSwitchAccount);
     };
     loadPromo();
   }, []);
-  console.log('isAprove', isAprove);
   return (
     <IsAuth>
       <MobileView>
-- 
cgit v1.2.3


From c0a72c10864ee5e70ebfba4718be25eba910ccf0 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Mon, 23 Sep 2024 16:13:10 +0700
Subject: <iman> update mobile view

---
 src/pages/my/profile.jsx | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

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

diff --git a/src/pages/my/profile.jsx b/src/pages/my/profile.jsx
index 0eeec6cf..b87aa69a 100644
--- a/src/pages/my/profile.jsx
+++ b/src/pages/my/profile.jsx
@@ -35,6 +35,30 @@ export default function Profile() {
     <IsAuth>
       <MobileView>
         <AppLayout title='Akun Saya'>
+          {!auth?.parentId && ubahAkun && (
+            <div className='text-sm p-4 flex items-center'>
+              <Checkbox
+                borderColor='gray.600'
+                colorScheme='red'
+                size='lg'
+                isChecked={isChecked}
+                onChange={handleChange}
+              />
+              <p className='ml-2'>Ubah ke akun bisnis</p>
+            </div>
+          )}
+          {isChecked && (
+            <div>
+              <SwitchAccount />
+              <Divider />
+            </div>
+          )}
+          {!auth?.parentId
+            ? auth?.parentId
+            : auth?.parent_id &&
+              isAprove != 'unknown' && (
+                <StatusSwitchAccount status={isAprove} />
+              )}
           <PersonalProfile />
           <Divider />
           {auth?.parentId && <CompanyProfile />}
-- 
cgit v1.2.3


From 461d2786935c5c9b3cf627c44fc06fcd1c3e8075 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Thu, 26 Sep 2024 11:13:15 +0700
Subject: <iman> add pop up yakin ubah type akun

---
 src/pages/my/profile.jsx | 181 ++++++++++++++++++++++++++++-------------------
 1 file changed, 109 insertions(+), 72 deletions(-)

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

diff --git a/src/pages/my/profile.jsx b/src/pages/my/profile.jsx
index b87aa69a..f6063ff2 100644
--- a/src/pages/my/profile.jsx
+++ b/src/pages/my/profile.jsx
@@ -10,16 +10,22 @@ import IsAuth from '@/lib/auth/components/IsAuth';
 import Menu from '@/lib/auth/components/Menu';
 import PersonalProfile from '@/lib/auth/components/PersonalProfile';
 import StatusSwitchAccount from '@/lib/auth/components/StatusSwitchAccount';
-import { Button, Checkbox, Spinner, Tooltip } from '@chakra-ui/react';
+import { Checkbox } from '@chakra-ui/react';
 import { useState, useEffect } from 'react';
 import switchAccountProgresApi from '@/lib/auth/api/switchAccountProgresApi.js';
+import BottomPopup from '@/core/components/elements/Popup/BottomPopup';
 export default function Profile() {
   const auth = useAuth();
   const [isChecked, setIsChecked] = useState(false);
   const [ubahAkun, setUbahAkun] = useState(false);
   const [isAprove, setIsAprove] = useState('unknown');
+  const [changeConfirmation, setChangeConfirmation] = useState(false);
   const handleChange = async () => {
-    setIsChecked(!isChecked);
+    if (isChecked) {
+      setIsChecked(!isChecked);
+    } else {
+      setChangeConfirmation(true);
+    }
   };
   useEffect(() => {
     const loadPromo = async () => {
@@ -31,78 +37,109 @@ export default function Profile() {
     };
     loadPromo();
   }, []);
+  const handleConfirmSubmit = () => {
+    setChangeConfirmation(false);
+    setIsChecked(true);
+  };
   return (
-    <IsAuth>
-      <MobileView>
-        <AppLayout title='Akun Saya'>
-          {!auth?.parentId && ubahAkun && (
-            <div className='text-sm p-4 flex items-center'>
-              <Checkbox
-                borderColor='gray.600'
-                colorScheme='red'
-                size='lg'
-                isChecked={isChecked}
-                onChange={handleChange}
-              />
-              <p className='ml-2'>Ubah ke akun bisnis</p>
-            </div>
-          )}
-          {isChecked && (
-            <div>
-              <SwitchAccount />
-              <Divider />
-            </div>
-          )}
-          {!auth?.parentId
-            ? auth?.parentId
-            : auth?.parent_id &&
-              isAprove != 'unknown' && (
-                <StatusSwitchAccount status={isAprove} />
-              )}
-          <PersonalProfile />
-          <Divider />
-          {auth?.parentId && <CompanyProfile />}
-        </AppLayout>
-      </MobileView>
+    <>
+      <BottomPopup
+        active={changeConfirmation}
+        close={() => setChangeConfirmation(false)} // Menutup popup
+        title='Ubah type akun'
+      >
+        <div className='leading-7 text-gray_r-12/80'>
+          Anda akan mengubah type akun anda?
+        </div>
+        <div className='flex mt-6 gap-x-4 md:justify-end'>
+          <button
+            className='btn-solid-red flex-1 md:flex-none'
+            type='button'
+            onClick={handleConfirmSubmit}
+          >
+            Yakin
+          </button>
+          <button
+            className='btn-light flex-1 md:flex-none'
+            type='button'
+            onClick={() => setChangeConfirmation(false)}
+          >
+            Batal
+          </button>
+        </div>
+      </BottomPopup>
+      <IsAuth>
+        <MobileView>
+          <AppLayout title='Akun Saya'>
+            {!auth?.parentId && ubahAkun && (
+              <div className='text-sm p-4 flex items-center'>
+                <Checkbox
+                  borderColor='gray.600'
+                  colorScheme='red'
+                  size='lg'
+                  isChecked={isChecked}
+                  onChange={handleChange}
+                />
+                <p className='ml-2'>Ubah ke akun bisnis</p>
+              </div>
+            )}
+            {isChecked && (
+              <div>
+                <SwitchAccount />
+                <Divider />
+              </div>
+            )}
+            {!auth?.parentId
+              ? auth?.parentId
+              : auth?.parent_id &&
+                isAprove != 'unknown' && (
+                  <StatusSwitchAccount status={isAprove} />
+                )}
+            <PersonalProfile />
+            <Divider />
+            {auth?.parentId && <CompanyProfile />}
+          </AppLayout>
+        </MobileView>
 
-      <DesktopView>
-        <BasicLayout>
-          <div className='container mx-auto flex py-10'>
-            <div className='w-3/12 pr-4'>
-              <Menu />
-            </div>
-            <div className='w-9/12 bg-white border border-gray_r-6 rounded'>
-              {!auth?.parentId && ubahAkun && (
-                <div className='text-sm p-4 flex items-center'>
-                  <Checkbox
-                    borderColor='gray.600'
-                    colorScheme='red'
-                    size='lg'
-                    isChecked={isChecked}
-                    onChange={handleChange}
-                  />
-                  <p className='ml-2'>Ubah ke akun bisnis</p>
-                </div>
-              )}
-              {isChecked && (
-                <div>
-                  <SwitchAccount />
-                  <Divider />
-                </div>
-              )}
-              {!auth?.parentId
-                ? auth?.parentId
-                : auth?.parent_id &&
-                  isAprove != 'unknown' && (
-                    <StatusSwitchAccount status={isAprove} />
-                  )}
-              <PersonalProfile />
-              <Divider />
-              {auth?.parentId && <CompanyProfile />}
+        <DesktopView>
+          <BasicLayout>
+            <div className='container mx-auto flex py-10'>
+              <div className='w-3/12 pr-4'>
+                <Menu />
+              </div>
+              <div className='w-9/12 bg-white border border-gray_r-6 rounded'>
+                {!auth?.parentId && ubahAkun && (
+                  <div className='text-sm p-4 flex items-center'>
+                    <Checkbox
+                      borderColor='gray.600'
+                      colorScheme='red'
+                      size='lg'
+                      isChecked={isChecked}
+                      onChange={handleChange}
+                    />
+                    <p className='ml-2'>Ubah ke akun bisnis</p>
+                  </div>
+                )}
+                {isChecked && (
+                  <div>
+                    <SwitchAccount />
+                    <Divider />
+                  </div>
+                )}
+                {!auth?.parentId
+                  ? auth?.parentId
+                  : auth?.parent_id &&
+                    isAprove != 'unknown' && (
+                      <StatusSwitchAccount status={isAprove} />
+                    )}
+                <PersonalProfile />
+                <Divider />
+                {auth?.parentId && <CompanyProfile />}
+              </div>
             </div>
-          </div>
-        </BasicLayout>
-      </DesktopView>
-    </IsAuth>
+          </BasicLayout>
+        </DesktopView>
+      </IsAuth>
+    </>
   );
 }
-- 
cgit v1.2.3


From 3eb78e21b89bd0bdddb803767ea6ec983794994b Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Sat, 28 Sep 2024 10:01:30 +0700
Subject: <iman> update temp switch account

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

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

diff --git a/src/pages/my/profile.jsx b/src/pages/my/profile.jsx
index f6063ff2..ee0cd907 100644
--- a/src/pages/my/profile.jsx
+++ b/src/pages/my/profile.jsx
@@ -9,7 +9,7 @@ import SwitchAccount from '@/lib/auth/components/SwitchAccount';
 import IsAuth from '@/lib/auth/components/IsAuth';
 import Menu from '@/lib/auth/components/Menu';
 import PersonalProfile from '@/lib/auth/components/PersonalProfile';
-import StatusSwitchAccount from '@/lib/auth/components/StatusSwitchAccount';
+// import StatusSwitchAccount from '@/lib/auth/components/StatusSwitchAccount';
 import { Checkbox } from '@chakra-ui/react';
 import { useState, useEffect } from 'react';
 import switchAccountProgresApi from '@/lib/auth/api/switchAccountProgresApi.js';
@@ -89,12 +89,12 @@ export default function Profile() {
                 <Divider />
               </div>
             )}
-            {!auth?.parentId
+            {/* {!auth?.parentId
               ? auth?.parentId
               : auth?.parent_id &&
                 isAprove != 'unknown' && (
                   <StatusSwitchAccount status={isAprove} />
-                )}
+                )} */}
             <PersonalProfile />
             <Divider />
             {auth?.parentId && <CompanyProfile />}
@@ -126,12 +126,12 @@ export default function Profile() {
                     <Divider />
                   </div>
                 )}
-                {!auth?.parentId
+                {/* {!auth?.parentId
                   ? auth?.parentId
                   : auth?.parent_id &&
                     isAprove != 'unknown' && (
                       <StatusSwitchAccount status={isAprove} />
-                    )}
+                    )} */}
                 <PersonalProfile />
                 <Divider />
                 {auth?.parentId && <CompanyProfile />}
-- 
cgit v1.2.3


From 2dc7f7ae3eb62f9821f8ae1fb87db2e7b9234e1b Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Tue, 1 Oct 2024 10:57:08 +0700
Subject: <iman> update logic switch account

---
 src/pages/my/profile.jsx | 8 ++++----
 1 file changed, 4 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 ee0cd907..f44a44f3 100644
--- a/src/pages/my/profile.jsx
+++ b/src/pages/my/profile.jsx
@@ -18,7 +18,7 @@ export default function Profile() {
   const auth = useAuth();
   const [isChecked, setIsChecked] = useState(false);
   const [ubahAkun, setUbahAkun] = useState(false);
-  const [isAprove, setIsAprove] = useState('unknown');
+  const [isAprove, setIsAprove] = useState();
   const [changeConfirmation, setChangeConfirmation] = useState(false);
   const handleChange = async () => {
     if (isChecked) {
@@ -32,7 +32,7 @@ export default function Profile() {
       const progresSwitchAccount = await switchAccountProgresApi();
       if (progresSwitchAccount) {
         setIsAprove(progresSwitchAccount.status);
-        setUbahAkun(progresSwitchAccount.status === 'unknown');
+        setUbahAkun(progresSwitchAccount.status);
       }
     };
     loadPromo();
@@ -71,7 +71,7 @@ export default function Profile() {
       <IsAuth>
         <MobileView>
           <AppLayout title='Akun Saya'>
-            {!auth?.parentId && ubahAkun && (
+            {!auth?.parentId && !ubahAkun && (
               <div className='text-sm p-4 flex items-center'>
                 <Checkbox
                   borderColor='gray.600'
@@ -108,7 +108,7 @@ export default function Profile() {
                 <Menu />
               </div>
               <div className='w-9/12 bg-white border border-gray_r-6 rounded'>
-                {!auth?.parentId && ubahAkun && (
+                {!auth?.parentId && !ubahAkun && (
                   <div className='text-sm p-4 flex items-center'>
                     <Checkbox
                       borderColor='gray.600'
-- 
cgit v1.2.3


From a32fa70ab3271e94a9c2b9004f872360dcb7d1c5 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Wed, 2 Oct 2024 13:21:25 +0700
Subject: <iman> update switch account

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

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

diff --git a/src/pages/my/profile.jsx b/src/pages/my/profile.jsx
index f44a44f3..eaf3341c 100644
--- a/src/pages/my/profile.jsx
+++ b/src/pages/my/profile.jsx
@@ -85,7 +85,7 @@ export default function Profile() {
             )}
             {isChecked && (
               <div>
-                <SwitchAccount />
+                <SwitchAccount company_type='nonpkp' />
                 <Divider />
               </div>
             )}
@@ -122,7 +122,7 @@ export default function Profile() {
                 )}
                 {isChecked && (
                   <div>
-                    <SwitchAccount />
+                    <SwitchAccount company_type='nonpkp' />
                     <Divider />
                   </div>
                 )}
-- 
cgit v1.2.3

