summaryrefslogtreecommitdiff
path: root/src/lib/auth/components/CompanyProfile.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/auth/components/CompanyProfile.jsx')
-rw-r--r--src/lib/auth/components/CompanyProfile.jsx22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/lib/auth/components/CompanyProfile.jsx b/src/lib/auth/components/CompanyProfile.jsx
index e1a604c2..6065efde 100644
--- a/src/lib/auth/components/CompanyProfile.jsx
+++ b/src/lib/auth/components/CompanyProfile.jsx
@@ -16,7 +16,7 @@ const CompanyProfile = () => {
const [changeConfirmation, setChangeConfirmation] = useState(false);
const [changeType, setChangeType] = useState(false);
const [isChecked, setIsChecked] = useState(false);
- const [company_type, setCompany_type] = useState('Non PKP');
+ const [company_type, setCompany_type] = useState('nonpkp');
const auth = useAuth();
const [isOpen, setIsOpen] = useState(false);
const toggle = () => setIsOpen(!isOpen);
@@ -61,15 +61,15 @@ const CompanyProfile = () => {
const dataProfile = await addressApi({
id: auth.parentId ? auth.parentId : auth.parent_id,
});
- setCompany_type(dataProfile.companyType);
- setValue('name', dataProfile.name);
- setValue('industry', dataProfile.industryId);
- setValue('companyType', dataProfile.companyTypeId);
- setValue('taxName', dataProfile.taxName);
- setValue('npwp', dataProfile.npwp);
- setValue('alamat_wajib_pajak', dataProfile.alamatWajibPajak);
- setValue('alamat_bisnis', dataProfile.alamatBisnis);
- setValue('company_type', dataProfile.companyType);
+ setCompany_type(dataProfile?.companyType);
+ setValue('name', dataProfile?.name);
+ setValue('industry', dataProfile?.industryId);
+ setValue('companyType', dataProfile?.companyTypeId);
+ setValue('taxName', dataProfile?.taxName);
+ setValue('npwp', dataProfile?.npwp);
+ setValue('alamat_wajib_pajak', dataProfile?.alamatWajibPajak);
+ setValue('alamat_bisnis', dataProfile?.alamatBisnis);
+ setValue('company_type', dataProfile?.companyType);
};
if (auth) loadProfile();
}, [auth, setValue]);
@@ -168,7 +168,7 @@ const CompanyProfile = () => {
</div>
</BottomPopup>
<div className='p-4 flex-row items-center text-left w-full'>
- {company_type === 'Non PKP' && (
+ {company_type === 'nonpkp' && (
<div className='text-sm mb-2 flex items-center'>
<Checkbox
borderColor='gray.600'