summaryrefslogtreecommitdiff
path: root/src/lib/auth
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-09-26 13:50:42 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-09-26 13:50:42 +0700
commit979b4556ab104767f677d0d5a328f7b414ca3b4c (patch)
treeb10e951dba185d2f1a7eb480c42e229c5fea187d /src/lib/auth
parent062e2caf344fedf504ad601a88aaab7a3764ec21 (diff)
<iman> add bisnis status badge
Diffstat (limited to 'src/lib/auth')
-rw-r--r--src/lib/auth/components/CompanyProfile.jsx15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/lib/auth/components/CompanyProfile.jsx b/src/lib/auth/components/CompanyProfile.jsx
index d066cef7..2daec766 100644
--- a/src/lib/auth/components/CompanyProfile.jsx
+++ b/src/lib/auth/components/CompanyProfile.jsx
@@ -12,6 +12,7 @@ import * as Yup from 'yup';
const CompanyProfile = () => {
const [changeConfirmation, setChangeConfirmation] = useState(false);
+ const [company_type, setCompany_type] = useState();
const auth = useAuth();
const [isOpen, setIsOpen] = useState(false);
const toggle = () => setIsOpen(!isOpen);
@@ -56,6 +57,7 @@ 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);
@@ -63,7 +65,7 @@ const CompanyProfile = () => {
setValue('npwp', dataProfile.npwp);
setValue('alamat_wajib_pajak', dataProfile.alamatWajibPajak);
setValue('alamat_bisnis', dataProfile.alamatBisnis);
- setValue('company_type', dataProfile.company_type);
+ setValue('company_type', dataProfile.companyType);
};
if (auth) loadProfile();
}, [auth, setValue]);
@@ -130,7 +132,10 @@ const CompanyProfile = () => {
className='p-4 flex items-center text-left w-full'
>
<div>
- <div className='font-semibold mb-2'>Informasi Usaha</div>
+ <div className='font-semibold mb-2 flex flex-row gap-x-2'>
+ <h2>Informasi Usaha</h2>
+ <div className='badge-red'>{company_type}</div>
+ </div>
<div className='text-gray_r-11'>
Dibawah ini adalah data usaha yang anda masukkan, periksa kembali
data usaha anda.
@@ -257,17 +262,17 @@ const validationSchema = Yup.object().shape({
alamat_wajib_pajak: Yup.string(),
company_type: Yup.string(),
taxName: Yup.string().when('company_type', {
- is: (company_type) => company_type !== 'PKP',
+ is: (company_type) => company_type !== 'Non PKP',
then: Yup.string().required('Harus di-isi'),
otherwise: Yup.string().notRequired(),
}),
npwp: Yup.string().when('company_type', {
- is: (company_type) => company_type !== 'PKP',
+ is: (company_type) => company_type !== 'Non PKP',
then: Yup.string().required('Harus di-isi'),
otherwise: Yup.string().notRequired(),
}),
alamat_wajib_pajak: Yup.string().when('company_type', {
- is: (company_type) => company_type !== 'PKP',
+ is: (company_type) => company_type !== 'Non PKP',
then: Yup.string().required('Harus di-isi'),
otherwise: Yup.string().notRequired(),
}),