summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2025-02-18 10:16:02 +0700
committerit-fixcomart <it@fixcomart.co.id>2025-02-18 10:16:02 +0700
commit77184327fd3490dd822d60b97f37052f3feec186 (patch)
treeca79e7198597691b16684156b19e312c7f1592fc /src
parent63ff83b83e87f6e9fb5974ed3e310ed1597d07c4 (diff)
<iman> bug profile get company
Diffstat (limited to 'src')
-rw-r--r--src/lib/auth/components/CompanyProfile.jsx3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/auth/components/CompanyProfile.jsx b/src/lib/auth/components/CompanyProfile.jsx
index c6ba1a81..6d4da1d1 100644
--- a/src/lib/auth/components/CompanyProfile.jsx
+++ b/src/lib/auth/components/CompanyProfile.jsx
@@ -59,9 +59,8 @@ const CompanyProfile = () => {
useEffect(() => {
const loadProfile = async () => {
const dataProfile = await addressApi({
- id: auth?.company ? auth.parentId : auth.partnerId,
+ id: auth?.company ? (auth.parentId ? auth.parentId : auth.partnerId) : auth.partnerId,
});
-
setCompany_type(dataProfile?.companyType);
setValue('name', dataProfile?.name);
setValue('industry', dataProfile?.industryId);