|
|
|
@ -35,33 +35,23 @@ const Register = ({ |
|
|
|
|
province, |
|
|
|
|
city, |
|
|
|
|
user, |
|
|
|
|
getUserInfo, |
|
|
|
|
}) => { |
|
|
|
|
const [steps, setSteps] = useState(0); |
|
|
|
|
|
|
|
|
|
console.log("user:&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"); |
|
|
|
|
console.log(user); |
|
|
|
|
const timeoutRef = useRef(null); |
|
|
|
|
const [activeStep, setActiveStep] = useState([true, false, false, false]); |
|
|
|
|
const [error, setError] = useState(""); |
|
|
|
|
useEffect(() => { |
|
|
|
|
getUserInfo(); |
|
|
|
|
getProvince(); |
|
|
|
|
getCity(); |
|
|
|
|
}, []); |
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
if (user?.firstName !== null) { |
|
|
|
|
setUserInfo({ |
|
|
|
|
...userInfo, |
|
|
|
|
firstName: user.firstName, |
|
|
|
|
lastName: user.lastName, |
|
|
|
|
nationalId: user.nationalId, |
|
|
|
|
// birthDate: user.birthDate.toLocaleDateString('fa-IR'),
|
|
|
|
|
gender: user.gender, |
|
|
|
|
previousSchoolName: user.previousSchoolName, |
|
|
|
|
previousSchoolType: user.previousSchoolType, |
|
|
|
|
zone: user.zone, |
|
|
|
|
familyMemberCount: user.familyMemberCount, |
|
|
|
|
phone: user.phone, |
|
|
|
|
address: user.address, |
|
|
|
|
}); |
|
|
|
|
setUserInfo(user); |
|
|
|
|
} |
|
|
|
|
}, [user]); |
|
|
|
|
useEffect(() => { |
|
|
|
@ -120,154 +110,157 @@ const Register = ({ |
|
|
|
|
personalPic: null, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const [userInfo, setUserInfo] = useState({ |
|
|
|
|
firstName: null, |
|
|
|
|
lastName: null, |
|
|
|
|
nationalId: null, |
|
|
|
|
birthDate: null, |
|
|
|
|
gender: null, |
|
|
|
|
gradeIds: null, |
|
|
|
|
previousSchoolName: null, |
|
|
|
|
previousSchoolType: null, |
|
|
|
|
cityId: null, |
|
|
|
|
provinceId: null, |
|
|
|
|
zone: null, |
|
|
|
|
fatherInfo: { |
|
|
|
|
firstName: null, |
|
|
|
|
nationalId: null, |
|
|
|
|
lastName: null, |
|
|
|
|
job: null, |
|
|
|
|
education: null, |
|
|
|
|
cellphone: null, |
|
|
|
|
workPlace: null, |
|
|
|
|
workPhone: null, |
|
|
|
|
}, |
|
|
|
|
motherInfo: { |
|
|
|
|
firstName: null, |
|
|
|
|
nationalId: null, |
|
|
|
|
lastName: null, |
|
|
|
|
job: null, |
|
|
|
|
education: null, |
|
|
|
|
cellphone: null, |
|
|
|
|
workPlace: null, |
|
|
|
|
workPhone: null, |
|
|
|
|
}, |
|
|
|
|
//ark added
|
|
|
|
|
const [userInfo, setUserInfo]=useState(user); |
|
|
|
|
//ark added
|
|
|
|
|
// const [userInfo, setUserInfo] = useState({
|
|
|
|
|
// firstName: null,
|
|
|
|
|
// lastName: null,
|
|
|
|
|
// nationalId: null,
|
|
|
|
|
// birthDate: null,
|
|
|
|
|
// gender: null,
|
|
|
|
|
// gradeIds: null,
|
|
|
|
|
// previousSchoolName: null,
|
|
|
|
|
// previousSchoolType: null,
|
|
|
|
|
// cityId: null,
|
|
|
|
|
// provinceId: null,
|
|
|
|
|
// zone: null,
|
|
|
|
|
// fatherInfo: {
|
|
|
|
|
// firstName: null,
|
|
|
|
|
// nationalId: null,
|
|
|
|
|
// lastName: null,
|
|
|
|
|
// job: null,
|
|
|
|
|
// education: null,
|
|
|
|
|
// cellphone: null,
|
|
|
|
|
// workPlace: null,
|
|
|
|
|
// workPhone: null,
|
|
|
|
|
// },
|
|
|
|
|
// motherInfo: {
|
|
|
|
|
// firstName: null,
|
|
|
|
|
// nationalId: null,
|
|
|
|
|
// lastName: null,
|
|
|
|
|
// job: null,
|
|
|
|
|
// education: null,
|
|
|
|
|
// cellphone: null,
|
|
|
|
|
// workPlace: null,
|
|
|
|
|
// workPhone: null,
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
|
|
familyMemberCount: null, |
|
|
|
|
address: null, |
|
|
|
|
phone: null, |
|
|
|
|
rulesAccepted: false, |
|
|
|
|
}); |
|
|
|
|
// familyMemberCount: null,
|
|
|
|
|
// address: null,
|
|
|
|
|
// phone: null,
|
|
|
|
|
// rulesAccepted: false,
|
|
|
|
|
// });
|
|
|
|
|
const finalViewInfo = [ |
|
|
|
|
{ |
|
|
|
|
title: "نام", |
|
|
|
|
value: userInfo.firstName, |
|
|
|
|
value: userInfo?.firstName, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "نام خانوادگی", |
|
|
|
|
value: userInfo.lastName, |
|
|
|
|
value: userInfo?.lastName, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "جنسیت", |
|
|
|
|
value: userInfo.gender, |
|
|
|
|
value: userInfo?.gender, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "کد ملی", |
|
|
|
|
value: userInfo.nationalId, |
|
|
|
|
value: userInfo?.nationalId, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "تاریخ تولد", |
|
|
|
|
value: userInfo.birthDate?.toLocaleDateString("fa-IR"), |
|
|
|
|
value: userInfo?.birthDate?.toLocaleDateString("fa-IR"), |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "نام مدرسه ", |
|
|
|
|
value: userInfo.previousSchoolName, |
|
|
|
|
value: userInfo?.previousSchoolName, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "شهر", |
|
|
|
|
value: userInfo.cityId, |
|
|
|
|
value: userInfo?.cityId, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "منطقه", |
|
|
|
|
value: userInfo.zone, |
|
|
|
|
value: userInfo?.zone, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "نام", |
|
|
|
|
value: userInfo.fatherInfo.firstName, |
|
|
|
|
value: userInfo?.fatherInfo?.firstName, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "نام خانوادگی", |
|
|
|
|
value: userInfo.fatherInfo.lastName, |
|
|
|
|
value: userInfo?.fatherInfo?.lastName, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "کدملی", |
|
|
|
|
value: userInfo.fatherInfo.nationalId, |
|
|
|
|
value: userInfo.fatherInfo?.nationalId, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "مدرک تحصیلی", |
|
|
|
|
value: madraks.find((itm) => itm.id == userInfo.fatherInfo.education) |
|
|
|
|
value: madraks.find((itm) => itm.id == userInfo?.fatherInfo?.education) |
|
|
|
|
?.title, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "تلفن همراه", |
|
|
|
|
value: userInfo.fatherInfo.cellphone, |
|
|
|
|
value: userInfo?.fatherInfo?.cellphone, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "شغل", |
|
|
|
|
value: userInfo.fatherInfo.job, |
|
|
|
|
value: userInfo?.fatherInfo?.job, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "محل کار", |
|
|
|
|
value: userInfo.fatherInfo.workPlace, |
|
|
|
|
value: userInfo?.fatherInfo?.workPlace, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "تلفن محل کار", |
|
|
|
|
value: userInfo.fatherInfo.workPhone, |
|
|
|
|
value: userInfo?.fatherInfo?.workPhone, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "نام", |
|
|
|
|
value: userInfo.motherInfo.firstName, |
|
|
|
|
value: userInfo?.motherInfo?.firstName, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "نام خانوادگی", |
|
|
|
|
value: userInfo.motherInfo.lastName, |
|
|
|
|
value: userInfo?.motherInfo?.lastName, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "کدملی", |
|
|
|
|
value: userInfo.motherInfo.nationalId, |
|
|
|
|
value: userInfo?.motherInfo?.nationalId, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "مدرک تحصیلی", |
|
|
|
|
value: madraks.find((itm) => itm.id == userInfo.motherInfo.education) |
|
|
|
|
value: madraks.find((itm) => itm.id == userInfo?.motherInfo?.education) |
|
|
|
|
?.title, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "تلفن همراه", |
|
|
|
|
value: userInfo.motherInfo.cellphone, |
|
|
|
|
value: userInfo?.motherInfo?.cellphone, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "شغل", |
|
|
|
|
value: userInfo.motherInfo.job, |
|
|
|
|
value: userInfo?.motherInfo?.job, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "محل کار", |
|
|
|
|
value: userInfo.motherInfo.workPlace, |
|
|
|
|
value: userInfo?.motherInfo?.workPlace, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "تلفن محل کار", |
|
|
|
|
value: userInfo.motherInfo.workPhone, |
|
|
|
|
value: userInfo?.motherInfo?.workPhone, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "تعداد افراد خانواده", |
|
|
|
|
value: userInfo.familyMemberCount, |
|
|
|
|
value: userInfo?.familyMemberCount, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "نشانی محل سکونت", |
|
|
|
|
value: userInfo.address, |
|
|
|
|
value: userInfo?.address, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: "تلفن ثابت", |
|
|
|
|
value: userInfo.phone, |
|
|
|
|
value: userInfo?.phone, |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
@ -401,7 +394,7 @@ const Register = ({ |
|
|
|
|
const [selectedState, setSelectedState] = useState(null); |
|
|
|
|
const [selectedCity, setSelectedCity] = useState(null); |
|
|
|
|
|
|
|
|
|
const firstStepSubmit=()=>{ |
|
|
|
|
const firstStepSubmit = () => { |
|
|
|
|
if ( |
|
|
|
|
userInfo.firstName && |
|
|
|
|
userInfo.lastName && |
|
|
|
@ -421,7 +414,7 @@ const Register = ({ |
|
|
|
|
} else { |
|
|
|
|
toast.warning("لطفا تمامی فیلد ها را پر کنید"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
return isMobile ? ( |
|
|
|
|
<MobileRegister /> |
|
|
|
@ -475,7 +468,7 @@ const Register = ({ |
|
|
|
|
gapSize="8" |
|
|
|
|
direction="rtl" |
|
|
|
|
id={0} |
|
|
|
|
value={userInfo.firstName} |
|
|
|
|
value={userInfo?.firstName} |
|
|
|
|
onChange={(e) => |
|
|
|
|
setUserInfo({ |
|
|
|
|
...userInfo, |
|
|
|
@ -716,12 +709,12 @@ const Register = ({ |
|
|
|
|
gapSize="8" |
|
|
|
|
direction="rtl" |
|
|
|
|
id={0} |
|
|
|
|
value={userInfo.fatherInfo.firstName} |
|
|
|
|
value={userInfo?.fatherInfo?.firstName} |
|
|
|
|
onChange={(e) => |
|
|
|
|
setUserInfo({ |
|
|
|
|
...userInfo, |
|
|
|
|
fatherInfo: { |
|
|
|
|
...userInfo.fatherInfo, |
|
|
|
|
...userInfo?.fatherInfo, |
|
|
|
|
firstName: _onInput.noNumber(e.target.value), |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
@ -733,12 +726,12 @@ const Register = ({ |
|
|
|
|
borderType="rounded" |
|
|
|
|
id={1} |
|
|
|
|
direction="rtl" |
|
|
|
|
value={userInfo.fatherInfo.lastName} |
|
|
|
|
value={userInfo?.fatherInfo?.lastName} |
|
|
|
|
onChange={(e) => |
|
|
|
|
setUserInfo({ |
|
|
|
|
...userInfo, |
|
|
|
|
fatherInfo: { |
|
|
|
|
...userInfo.fatherInfo, |
|
|
|
|
...userInfo?.fatherInfo, |
|
|
|
|
lastName: _onInput.noNumber(e.target.value), |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
@ -752,7 +745,7 @@ const Register = ({ |
|
|
|
|
id={2} |
|
|
|
|
type="text" |
|
|
|
|
max={10} |
|
|
|
|
value={userInfo.fatherInfo.nationalId} |
|
|
|
|
value={userInfo?.fatherInfo?.nationalId} |
|
|
|
|
onChange={(e) => |
|
|
|
|
setUserInfo({ |
|
|
|
|
...userInfo, |
|
|
|
@ -769,7 +762,7 @@ const Register = ({ |
|
|
|
|
setUserInfo({ |
|
|
|
|
...userInfo, |
|
|
|
|
fatherInfo: { |
|
|
|
|
...userInfo.fatherInfo, |
|
|
|
|
...userInfo?.fatherInfo, |
|
|
|
|
education: e.target.value, |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
@ -789,12 +782,12 @@ const Register = ({ |
|
|
|
|
borderType="rounded" |
|
|
|
|
max={11} |
|
|
|
|
id={3} |
|
|
|
|
value={userInfo.fatherInfo.cellphone} |
|
|
|
|
value={userInfo?.fatherInfo?.cellphone} |
|
|
|
|
onChange={(e) => |
|
|
|
|
setUserInfo({ |
|
|
|
|
...userInfo, |
|
|
|
|
fatherInfo: { |
|
|
|
|
...userInfo.fatherInfo, |
|
|
|
|
...userInfo?.fatherInfo, |
|
|
|
|
cellphone: _onInput.phonenumber(e.target.value), |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
@ -807,12 +800,12 @@ const Register = ({ |
|
|
|
|
direction="rtl" |
|
|
|
|
gapSize="8" |
|
|
|
|
id={4} |
|
|
|
|
value={userInfo.fatherInfo.job} |
|
|
|
|
value={userInfo?.fatherInfo?.job} |
|
|
|
|
onChange={(e) => |
|
|
|
|
setUserInfo({ |
|
|
|
|
...userInfo, |
|
|
|
|
fatherInfo: { |
|
|
|
|
...userInfo.fatherInfo, |
|
|
|
|
...userInfo?.fatherInfo, |
|
|
|
|
job: e.target.value, |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
@ -825,12 +818,12 @@ const Register = ({ |
|
|
|
|
borderType="rounded" |
|
|
|
|
id={5} |
|
|
|
|
direction="rtl" |
|
|
|
|
value={userInfo.fatherInfo.workPlace} |
|
|
|
|
value={userInfo?.fatherInfo?.workPlace} |
|
|
|
|
onChange={(e) => |
|
|
|
|
setUserInfo({ |
|
|
|
|
...userInfo, |
|
|
|
|
fatherInfo: { |
|
|
|
|
...userInfo.fatherInfo, |
|
|
|
|
...userInfo?.fatherInfo, |
|
|
|
|
workPlace: e.target.value, |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
@ -844,12 +837,12 @@ const Register = ({ |
|
|
|
|
id={6} |
|
|
|
|
type="text" |
|
|
|
|
max={11} |
|
|
|
|
value={userInfo.fatherInfo.workPhone} |
|
|
|
|
value={userInfo?.fatherInfo?.workPhone} |
|
|
|
|
onChange={(e) => |
|
|
|
|
setUserInfo({ |
|
|
|
|
...userInfo, |
|
|
|
|
fatherInfo: { |
|
|
|
|
...userInfo.fatherInfo, |
|
|
|
|
...userInfo?.fatherInfo, |
|
|
|
|
workPhone: _onInput.numberOnly(e.target.value), |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
@ -873,12 +866,12 @@ const Register = ({ |
|
|
|
|
gapSize="8" |
|
|
|
|
direction="rtl" |
|
|
|
|
id={7} |
|
|
|
|
value={userInfo.motherInfo.firstName} |
|
|
|
|
value={userInfo?.motherInfo?.firstName} |
|
|
|
|
onChange={(e) => |
|
|
|
|
setUserInfo({ |
|
|
|
|
...userInfo, |
|
|
|
|
motherInfo: { |
|
|
|
|
...userInfo.motherInfo, |
|
|
|
|
...userInfo?.motherInfo, |
|
|
|
|
firstName: _onInput.noNumber(e.target.value), |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
@ -891,12 +884,12 @@ const Register = ({ |
|
|
|
|
borderType="rounded" |
|
|
|
|
id={8} |
|
|
|
|
direction="rtl" |
|
|
|
|
value={userInfo.motherInfo.lastName} |
|
|
|
|
value={userInfo?.motherInfo?.lastName} |
|
|
|
|
onChange={(e) => |
|
|
|
|
setUserInfo({ |
|
|
|
|
...userInfo, |
|
|
|
|
motherInfo: { |
|
|
|
|
...userInfo.motherInfo, |
|
|
|
|
...userInfo?.motherInfo, |
|
|
|
|
lastName: _onInput.noNumber(e.target.value), |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
@ -910,12 +903,12 @@ const Register = ({ |
|
|
|
|
id={9} |
|
|
|
|
type="text" |
|
|
|
|
max={10} |
|
|
|
|
value={userInfo.motherInfo.nationalId} |
|
|
|
|
value={userInfo?.motherInfo?.nationalId} |
|
|
|
|
onChange={(e) => |
|
|
|
|
setUserInfo({ |
|
|
|
|
...userInfo, |
|
|
|
|
motherInfo: { |
|
|
|
|
...userInfo.motherInfo, |
|
|
|
|
...userInfo?.motherInfo, |
|
|
|
|
nationalId: _onInput.numberOnly(e.target.value), |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
@ -928,7 +921,7 @@ const Register = ({ |
|
|
|
|
setUserInfo({ |
|
|
|
|
...userInfo, |
|
|
|
|
motherInfo: { |
|
|
|
|
...userInfo.motherInfo, |
|
|
|
|
...userInfo?.motherInfo, |
|
|
|
|
education: e.target.value, |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
@ -949,12 +942,12 @@ const Register = ({ |
|
|
|
|
type="text" |
|
|
|
|
id={10} |
|
|
|
|
max={11} |
|
|
|
|
value={userInfo.motherInfo.cellphone} |
|
|
|
|
value={userInfo?.motherInfo?.cellphone} |
|
|
|
|
onChange={(e) => |
|
|
|
|
setUserInfo({ |
|
|
|
|
...userInfo, |
|
|
|
|
motherInfo: { |
|
|
|
|
...userInfo.motherInfo, |
|
|
|
|
...userInfo?.motherInfo, |
|
|
|
|
cellphone: _onInput.phonenumber(e.target.value), |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
@ -967,12 +960,12 @@ const Register = ({ |
|
|
|
|
direction="rtl" |
|
|
|
|
gapSize="8" |
|
|
|
|
id={11} |
|
|
|
|
value={userInfo.motherInfo.job} |
|
|
|
|
value={userInfo?.motherInfo?.job} |
|
|
|
|
onChange={(e) => |
|
|
|
|
setUserInfo({ |
|
|
|
|
...userInfo, |
|
|
|
|
motherInfo: { |
|
|
|
|
...userInfo.motherInfo, |
|
|
|
|
...userInfo?.motherInfo, |
|
|
|
|
job: e.target.value, |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
@ -985,12 +978,12 @@ const Register = ({ |
|
|
|
|
borderType="rounded" |
|
|
|
|
id={12} |
|
|
|
|
direction="rtl" |
|
|
|
|
value={userInfo.motherInfo.workPlace} |
|
|
|
|
value={userInfo?.motherInfo?.workPlace} |
|
|
|
|
onChange={(e) => |
|
|
|
|
setUserInfo({ |
|
|
|
|
...userInfo, |
|
|
|
|
motherInfo: { |
|
|
|
|
...userInfo.motherInfo, |
|
|
|
|
...userInfo?.motherInfo, |
|
|
|
|
workPlace: e.target.value, |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
@ -1004,12 +997,12 @@ const Register = ({ |
|
|
|
|
id={13} |
|
|
|
|
type="text" |
|
|
|
|
max={11} |
|
|
|
|
value={userInfo.motherInfo.workPhone} |
|
|
|
|
value={userInfo?.motherInfo?.workPhone} |
|
|
|
|
onChange={(e) => |
|
|
|
|
setUserInfo({ |
|
|
|
|
...userInfo, |
|
|
|
|
motherInfo: { |
|
|
|
|
...userInfo.motherInfo, |
|
|
|
|
...userInfo?.motherInfo, |
|
|
|
|
workPhone: _onInput.numberOnly(e.target.value), |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
@ -1035,7 +1028,7 @@ const Register = ({ |
|
|
|
|
gapSize="40" |
|
|
|
|
direction="rtl" |
|
|
|
|
id={14} |
|
|
|
|
value={userInfo.familyMemberCount} |
|
|
|
|
value={userInfo?.familyMemberCount} |
|
|
|
|
onChange={(e) => |
|
|
|
|
setUserInfo({ |
|
|
|
|
...userInfo, |
|
|
|
@ -1051,7 +1044,7 @@ const Register = ({ |
|
|
|
|
direction="rtl" |
|
|
|
|
id={15} |
|
|
|
|
max={11} |
|
|
|
|
value={userInfo.phone} |
|
|
|
|
value={userInfo?.phone} |
|
|
|
|
onChange={(e) => |
|
|
|
|
setUserInfo({ |
|
|
|
|
...userInfo, |
|
|
|
@ -1066,7 +1059,7 @@ const Register = ({ |
|
|
|
|
gapSize="40" |
|
|
|
|
id={16} |
|
|
|
|
direction="rtl" |
|
|
|
|
value={userInfo.address} |
|
|
|
|
value={userInfo?.address} |
|
|
|
|
onChange={(e) => |
|
|
|
|
setUserInfo({ ...userInfo, address: e.target.value }) |
|
|
|
|
} |
|
|
|
@ -1093,25 +1086,25 @@ const Register = ({ |
|
|
|
|
// const inputs = document.querySelectorAll('.Login-box-form-item-input')
|
|
|
|
|
|
|
|
|
|
if ( |
|
|
|
|
userInfo.motherInfo.cellphone && |
|
|
|
|
userInfo.motherInfo.education && |
|
|
|
|
userInfo.motherInfo.firstName && |
|
|
|
|
userInfo.motherInfo.job && |
|
|
|
|
userInfo.motherInfo.lastName && |
|
|
|
|
userInfo.motherInfo.nationalId && |
|
|
|
|
userInfo.motherInfo.workPhone && |
|
|
|
|
userInfo.motherInfo.workPlace && |
|
|
|
|
userInfo.fatherInfo.cellphone && |
|
|
|
|
userInfo.fatherInfo.education && |
|
|
|
|
userInfo.fatherInfo.firstName && |
|
|
|
|
userInfo.fatherInfo.job && |
|
|
|
|
userInfo.fatherInfo.lastName && |
|
|
|
|
userInfo.fatherInfo.nationalId && |
|
|
|
|
userInfo.fatherInfo.workPhone && |
|
|
|
|
userInfo.fatherInfo.workPlace && |
|
|
|
|
userInfo.familyMemberCount && |
|
|
|
|
userInfo.address && |
|
|
|
|
userInfo.phone |
|
|
|
|
userInfo?.motherInfo.cellphone && |
|
|
|
|
userInfo?.motherInfo.education && |
|
|
|
|
userInfo?.motherInfo.firstName && |
|
|
|
|
userInfo?.motherInfo.job && |
|
|
|
|
userInfo?.motherInfo.lastName && |
|
|
|
|
userInfo?.motherInfo.nationalId && |
|
|
|
|
userInfo?.motherInfo.workPhone && |
|
|
|
|
userInfo?.motherInfo.workPlace && |
|
|
|
|
userInfo?.fatherInfo.cellphone && |
|
|
|
|
userInfo?.fatherInfo.education && |
|
|
|
|
userInfo?.fatherInfo.firstName && |
|
|
|
|
userInfo?.fatherInfo.job && |
|
|
|
|
userInfo?.fatherInfo.lastName && |
|
|
|
|
userInfo?.fatherInfo.nationalId && |
|
|
|
|
userInfo?.fatherInfo.workPhone && |
|
|
|
|
userInfo?.fatherInfo.workPlace && |
|
|
|
|
userInfo?.familyMemberCount && |
|
|
|
|
userInfo?.address && |
|
|
|
|
userInfo?.phone |
|
|
|
|
) { |
|
|
|
|
setSteps(2); |
|
|
|
|
|
|
|
|
@ -1209,14 +1202,14 @@ const Register = ({ |
|
|
|
|
اینجانبان |
|
|
|
|
<span className="text-red52 font-bold"> |
|
|
|
|
{" "} |
|
|
|
|
{userInfo.fatherInfo.firstName}{" "} |
|
|
|
|
{userInfo.fatherInfo.lastName}{" "} |
|
|
|
|
{userInfo?.fatherInfo?.firstName}{" "} |
|
|
|
|
{userInfo?.fatherInfo?.lastName}{" "} |
|
|
|
|
</span> |
|
|
|
|
و |
|
|
|
|
<span className="text-red52 font-bold"> |
|
|
|
|
{" "} |
|
|
|
|
{userInfo.motherInfo.firstName}{" "} |
|
|
|
|
{userInfo.motherInfo.lastName}{" "} |
|
|
|
|
{userInfo?.motherInfo?.firstName}{" "} |
|
|
|
|
{userInfo?.motherInfo?.lastName}{" "} |
|
|
|
|
</span> |
|
|
|
|
سرپرست های دانش آموز |
|
|
|
|
<span className="text-red52 font-bold"> |
|
|
|
@ -1331,7 +1324,7 @@ const Register = ({ |
|
|
|
|
<Button |
|
|
|
|
borderType="rounded" |
|
|
|
|
title="تایید" |
|
|
|
|
to="/" |
|
|
|
|
// to="/"
|
|
|
|
|
onClick={async () => { |
|
|
|
|
// activeLogin()
|
|
|
|
|
try { |
|
|
|
@ -1397,6 +1390,7 @@ const mapDispatchToProps = { |
|
|
|
|
setProfile: user.setProfile, |
|
|
|
|
getProvince: publicApi.getProvince, |
|
|
|
|
getCity: publicApi.getCity, |
|
|
|
|
getUserInfo: user.getProfile, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(Register); |
|
|
|
|