From 8efe9fb6dd906431dcaed1818aae07692aeaa094 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Tue, 4 Feb 2025 15:16:37 +0700
Subject: <iman> update logic switch account

---
 src/pages/my/profile.jsx | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

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

diff --git a/src/pages/my/profile.jsx b/src/pages/my/profile.jsx
index eaf3341c..77c108cb 100644
--- a/src/pages/my/profile.jsx
+++ b/src/pages/my/profile.jsx
@@ -108,18 +108,19 @@ export default function Profile() {
                 <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>
-                )}
+                {auth?.company ||
+                  (!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 company_type='nonpkp' />
-- 
cgit v1.2.3


From 5187f40005dd2e391ae601c11886b539dffe4dd7 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Tue, 4 Feb 2025 15:19:14 +0700
Subject: <iman> update mobile

---
 src/pages/my/profile.jsx | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

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

diff --git a/src/pages/my/profile.jsx b/src/pages/my/profile.jsx
index 77c108cb..54e9024a 100644
--- a/src/pages/my/profile.jsx
+++ b/src/pages/my/profile.jsx
@@ -71,18 +71,19 @@ 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>
-            )}
+            {auth?.company ||
+              (!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 company_type='nonpkp' />
-- 
cgit v1.2.3


From 7dd2b66958fbe63c1fa68a9c3fb5eab7ee389342 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Tue, 4 Feb 2025 17:02:17 +0700
Subject: <iman> munculin company profile

---
 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 54e9024a..859b6960 100644
--- a/src/pages/my/profile.jsx
+++ b/src/pages/my/profile.jsx
@@ -98,7 +98,7 @@ export default function Profile() {
                 )} */}
             <PersonalProfile />
             <Divider />
-            {auth?.parentId && <CompanyProfile />}
+            {(auth?.parentId || auth?.company) && <CompanyProfile />}
           </AppLayout>
         </MobileView>
 
@@ -136,7 +136,7 @@ export default function Profile() {
                     )} */}
                 <PersonalProfile />
                 <Divider />
-                {auth?.parentId && <CompanyProfile />}
+                {(auth?.parentId || auth?.company) && <CompanyProfile />}
               </div>
             </div>
           </BasicLayout>
-- 
cgit v1.2.3

