diff options
Diffstat (limited to 'src-migrate/modules/register')
4 files changed, 20 insertions, 17 deletions
diff --git a/src-migrate/modules/register/components/Form.tsx b/src-migrate/modules/register/components/Form.tsx index ba28b32f..76601866 100644 --- a/src-migrate/modules/register/components/Form.tsx +++ b/src-migrate/modules/register/components/Form.tsx @@ -12,10 +12,11 @@ import Link from "next/link"; interface FormProps { type: string; required: boolean; - isPKP: boolean; + isBisnisRegist: boolean; } -const Form: React.FC<FormProps> = ({ type, required, isPKP }) => { +const Form: React.FC<FormProps> = ({ type, required, isBisnisRegist=false }) => { + console.log("isBisnisRegist",isBisnisRegist) const { form, isCheckedTNC, @@ -34,18 +35,17 @@ const Form: React.FC<FormProps> = ({ type, required, isPKP }) => { const handleInputChange = (event: ChangeEvent<HTMLInputElement>) => { const { name, value } = event.target; updateForm(name, value) + // if(!isBisnisRegist){ + updateForm('business_name','Iman') + updateForm('companyType','iman') + updateForm('email_partner','it@fixcomart.co.id') + updateForm('industry','1') + updateForm('nama_wajib_pajak','Iman') + updateForm('npwp','958666666688888') + updateForm('npwp_document','adsdad.pdf') + updateForm('sppkp_document','fdddwedw.pdf') + // } validate() - if(isPKP){ - updateForm('nama_wajib_pajak','') - updateForm('sppkp_document','') - updateForm('npwp_document','') - updateForm('industry','') - updateForm('badanUsaha','') - updateForm('email_partner','') - updateForm('business_name','') - updateForm('companyType','') - updateForm('npwp','') - } } const mutation = useMutation({ diff --git a/src-migrate/modules/register/components/FormBisnis.tsx b/src-migrate/modules/register/components/FormBisnis.tsx index 8b666ad7..932083df 100644 --- a/src-migrate/modules/register/components/FormBisnis.tsx +++ b/src-migrate/modules/register/components/FormBisnis.tsx @@ -37,7 +37,7 @@ const FormBisnis: React.FC<FormProps> = ({ type, required, isPKP }) => { updateFormBisnis, validateFormBisnis, } = useRegisterStore() - + console.log("errors bisnis",errors) const { control, watch, setValue } = useForm(); const [selectedCategory, setSelectedCategory] = useState<string>(''); const [selectedCompanyId, setSelectedCompanyId] = useState<string>(''); @@ -86,6 +86,10 @@ const FormBisnis: React.FC<FormProps> = ({ type, required, isPKP }) => { const handleInputChange = (event: ChangeEvent<HTMLInputElement>) => { const { name, value } = event.target; updateFormBisnis(name, value); + updateFormBisnis('name','iman'); + updateFormBisnis('email','it@fixcomart.co.id'); + updateFormBisnis('password','Fixcomart378'); + updateFormBisnis('phone','082339129611'); validateFormBisnis(); }; diff --git a/src-migrate/modules/register/components/RegistrasiBisnis.tsx b/src-migrate/modules/register/components/RegistrasiBisnis.tsx index 55180297..12ec7ba2 100644 --- a/src-migrate/modules/register/components/RegistrasiBisnis.tsx +++ b/src-migrate/modules/register/components/RegistrasiBisnis.tsx @@ -33,7 +33,6 @@ const RegistrasiBisnis = () => { isCheckedTNC, isValidCaptcha, errors, - updateForm, updateFormBisnis, validateFormBisnis, validate, @@ -108,7 +107,7 @@ const RegistrasiBisnis = () => { {isDropIndividu && ( <div> <Divider my={4} /> - <Form type="bisnis" required={true} isPKP={isPKP} /> + <Form type="bisnis" required={true} isBisnisRegist={true} /> </div> )} </div> diff --git a/src-migrate/modules/register/components/RegistrasiIndividu.tsx b/src-migrate/modules/register/components/RegistrasiIndividu.tsx index eff86124..b32f2f7b 100644 --- a/src-migrate/modules/register/components/RegistrasiIndividu.tsx +++ b/src-migrate/modules/register/components/RegistrasiIndividu.tsx @@ -3,7 +3,7 @@ const RegistrasiIndividu = () => { return ( <> - <Form type='individu' required={false}/> + <Form type='individu' required={false} isBisnisRegist={false}/> </> ); }; |
