summaryrefslogtreecommitdiff
path: root/src/pages/my/profile.jsx
diff options
context:
space:
mode:
authortrisusilo48 <tri.susilo@altama.co.id>2025-03-27 14:44:54 +0700
committertrisusilo48 <tri.susilo@altama.co.id>2025-03-27 14:44:54 +0700
commit969e193708e01ffb88c0d81d72d63dad200e0ef8 (patch)
tree59c44292727bdfecb2970cb1d8130c53c0075653 /src/pages/my/profile.jsx
parentf88f457fd1b91298ea8a7f9f396e49660a81e276 (diff)
parentd64f70fbc89e2cea6cbd95f5c3e3af437a3c2810 (diff)
Merge branch 'new-release' into feature/integrasi_biteship
# Conflicts: # src/lib/address/components/EditAddress.jsx
Diffstat (limited to 'src/pages/my/profile.jsx')
-rw-r--r--src/pages/my/profile.jsx54
1 files changed, 28 insertions, 26 deletions
diff --git a/src/pages/my/profile.jsx b/src/pages/my/profile.jsx
index eaf3341c..859b6960 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' />
@@ -97,7 +98,7 @@ export default function Profile() {
)} */}
<PersonalProfile />
<Divider />
- {auth?.parentId && <CompanyProfile />}
+ {(auth?.parentId || auth?.company) && <CompanyProfile />}
</AppLayout>
</MobileView>
@@ -108,18 +109,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' />
@@ -134,7 +136,7 @@ export default function Profile() {
)} */}
<PersonalProfile />
<Divider />
- {auth?.parentId && <CompanyProfile />}
+ {(auth?.parentId || auth?.company) && <CompanyProfile />}
</div>
</div>
</BasicLayout>