summaryrefslogtreecommitdiff
path: root/src-migrate/modules/register/components
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-08-22 16:48:03 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-08-22 16:48:03 +0700
commitfb346e50e06ed68508662ca3d004db2c2cc117eb (patch)
tree2e6b7d23847583bbace134a9c20c8000a91f42ee /src-migrate/modules/register/components
parent6623dba2f6cd4a4ca7b25f7086991afef092cd26 (diff)
<iman> update new register
Diffstat (limited to 'src-migrate/modules/register/components')
-rw-r--r--src-migrate/modules/register/components/Form.tsx26
-rw-r--r--src-migrate/modules/register/components/FormBisnis.tsx6
-rw-r--r--src-migrate/modules/register/components/RegistrasiBisnis.tsx3
-rw-r--r--src-migrate/modules/register/components/RegistrasiIndividu.tsx2
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}/>
</>
);
};