diff options
Diffstat (limited to 'src-migrate/modules/register/components/Form.tsx')
| -rw-r--r-- | src-migrate/modules/register/components/Form.tsx | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src-migrate/modules/register/components/Form.tsx b/src-migrate/modules/register/components/Form.tsx index 78566fae..ba28b32f 100644 --- a/src-migrate/modules/register/components/Form.tsx +++ b/src-migrate/modules/register/components/Form.tsx @@ -12,9 +12,10 @@ import Link from "next/link"; interface FormProps { type: string; required: boolean; + isPKP: boolean; } -const Form: React.FC<FormProps> = ({ type, required }) => { +const Form: React.FC<FormProps> = ({ type, required, isPKP }) => { const { form, isCheckedTNC, @@ -25,6 +26,7 @@ const Form: React.FC<FormProps> = ({ type, required }) => { } = useRegisterStore() const isFormValid = useMemo(() => Object.keys(errors).length === 0, [errors]) + console.log("errors",errors) const router = useRouter() const toast = useToast() @@ -33,6 +35,17 @@ const Form: React.FC<FormProps> = ({ type, required }) => { const { name, value } = event.target; updateForm(name, value) 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({ @@ -77,6 +90,7 @@ const Form: React.FC<FormProps> = ({ type, required }) => { break } } + console.log(!isFormValid,!isCheckedTNC,mutation.isLoading,!isValidCaptcha) return ( <form className="mt-6 grid grid-cols-1 gap-y-4" onSubmit={handleSubmit}> @@ -152,7 +166,7 @@ const Form: React.FC<FormProps> = ({ type, required }) => { {type==='individu' && ( <> - {/* <FormCaptcha /> */} + <FormCaptcha /> <TermCondition /> <button |
