|
|
@ -22,14 +22,16 @@ import Checkbox from "../../components/Checkbox"; |
|
|
|
import { ostan } from "../../constants/states"; |
|
|
|
import { ostan } from "../../constants/states"; |
|
|
|
import { cities } from "../../constants/cities"; |
|
|
|
import { cities } from "../../constants/cities"; |
|
|
|
import _onInput from "../../utils/onInput"; |
|
|
|
import _onInput from "../../utils/onInput"; |
|
|
|
import { publicApi, user } from "../../redux/actions"; |
|
|
|
import { file, publicApi, user } from "../../redux/actions"; |
|
|
|
import { VscDebugBreakpointUnsupported } from "react-icons/vsc"; |
|
|
|
import { VscDebugBreakpointUnsupported } from "react-icons/vsc"; |
|
|
|
|
|
|
|
import axios from "axios"; |
|
|
|
|
|
|
|
import { ApiConfig } from "../../constants/defaultValues"; |
|
|
|
|
|
|
|
import { toast } from "react-toastify"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Register = ({ activeLogin, isMobile, setProfile, getProvince, getCity, province, city, user }) => { |
|
|
|
const Register = ({ activeLogin, isMobile, setProfile, getProvince, getCity, province, city, user }) => { |
|
|
|
const [steps, setSteps] = useState(0); |
|
|
|
const [steps, setSteps] = useState(0); |
|
|
|
const [index, setIndex] = useState(1); |
|
|
|
|
|
|
|
const [register, setRegister] = useState(false); |
|
|
|
|
|
|
|
const timeoutRef = useRef(null); |
|
|
|
const timeoutRef = useRef(null); |
|
|
|
const [activeStep, setActiveStep] = useState([true, false, false, false]); |
|
|
|
const [activeStep, setActiveStep] = useState([true, false, false, false]); |
|
|
|
const [error, setError] = useState(''); |
|
|
|
const [error, setError] = useState(''); |
|
|
@ -37,9 +39,12 @@ const Register = ({ activeLogin, isMobile, setProfile, getProvince, getCity, pro |
|
|
|
getProvince(); |
|
|
|
getProvince(); |
|
|
|
getCity(); |
|
|
|
getCity(); |
|
|
|
}, []) |
|
|
|
}, []) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
if(user?.firstName !== null){ |
|
|
|
if (user?.firstName !== null) { |
|
|
|
setUserInfo({...userInfo, |
|
|
|
setUserInfo({ |
|
|
|
|
|
|
|
...userInfo, |
|
|
|
firstName: user.firstName, |
|
|
|
firstName: user.firstName, |
|
|
|
lastName: user.lastName, |
|
|
|
lastName: user.lastName, |
|
|
|
nationalId: user.nationalId, |
|
|
|
nationalId: user.nationalId, |
|
|
@ -47,7 +52,7 @@ const Register = ({ activeLogin, isMobile, setProfile, getProvince, getCity, pro |
|
|
|
gender: user.gender, |
|
|
|
gender: user.gender, |
|
|
|
previousSchoolName: user.previousSchoolName, |
|
|
|
previousSchoolName: user.previousSchoolName, |
|
|
|
previousSchoolType: user.previousSchoolType, |
|
|
|
previousSchoolType: user.previousSchoolType, |
|
|
|
zone:user.zone, |
|
|
|
zone: user.zone, |
|
|
|
familyMemberCount: user.familyMemberCount, |
|
|
|
familyMemberCount: user.familyMemberCount, |
|
|
|
phone: user.phone, |
|
|
|
phone: user.phone, |
|
|
|
address: user.address |
|
|
|
address: user.address |
|
|
@ -56,7 +61,7 @@ const Register = ({ activeLogin, isMobile, setProfile, getProvince, getCity, pro |
|
|
|
} |
|
|
|
} |
|
|
|
}, [user]) |
|
|
|
}, [user]) |
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
window.scrollTo(0,0); |
|
|
|
window.scrollTo(0, 0); |
|
|
|
}, [steps]) |
|
|
|
}, [steps]) |
|
|
|
|
|
|
|
|
|
|
|
const madraks = [ |
|
|
|
const madraks = [ |
|
|
@ -106,6 +111,10 @@ const Register = ({ activeLogin, isMobile, setProfile, getProvince, getCity, pro |
|
|
|
}, |
|
|
|
}, |
|
|
|
] |
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const [files, setFiles] = useState({ |
|
|
|
|
|
|
|
shenasNameh: null, |
|
|
|
|
|
|
|
personalPic: null |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const [userInfo, setUserInfo] = useState({ |
|
|
|
const [userInfo, setUserInfo] = useState({ |
|
|
|
firstName: null, |
|
|
|
firstName: null, |
|
|
@ -195,7 +204,7 @@ const Register = ({ activeLogin, isMobile, setProfile, getProvince, getCity, pro |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: 'مدرک تحصیلی', |
|
|
|
title: 'مدرک تحصیلی', |
|
|
|
value:madraks.find(itm => itm.id == userInfo.fatherInfo.education)?.title |
|
|
|
value: madraks.find(itm => itm.id == userInfo.fatherInfo.education)?.title |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: 'تلفن همراه', |
|
|
|
title: 'تلفن همراه', |
|
|
@ -386,6 +395,7 @@ const Register = ({ activeLogin, isMobile, setProfile, getProvince, getCity, pro |
|
|
|
|
|
|
|
|
|
|
|
const [selectedState, setSelectedState] = useState(null); |
|
|
|
const [selectedState, setSelectedState] = useState(null); |
|
|
|
const [selectedCity, setSelectedCity] = useState(null); |
|
|
|
const [selectedCity, setSelectedCity] = useState(null); |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
isMobile ? <MobileRegister /> : |
|
|
|
isMobile ? <MobileRegister /> : |
|
|
|
<div className="flex justify-center mb-4" style={{ direction: 'rtl', marginTop: '8.5%', marginRight: '6.5%', width: '93.5%', marginRight: '6.5%' }}> |
|
|
|
<div className="flex justify-center mb-4" style={{ direction: 'rtl', marginTop: '8.5%', marginRight: '6.5%', width: '93.5%', marginRight: '6.5%' }}> |
|
|
@ -451,13 +461,13 @@ const Register = ({ activeLogin, isMobile, setProfile, getProvince, getCity, pro |
|
|
|
<div className="flex justify-between"> |
|
|
|
<div className="flex justify-between"> |
|
|
|
<div className="flex w-3/5 flex-wrap justify-start"> |
|
|
|
<div className="flex w-3/5 flex-wrap justify-start"> |
|
|
|
|
|
|
|
|
|
|
|
<Input className={'w-52 mx-1'} title="نام" borderType="rounded" gapSize="8" direction='rtl' id={0} value={userInfo.firstName} onChange={(e) => setUserInfo({ ...userInfo, firstName: _onInput.noNumber(e.target.value)})} /> |
|
|
|
<Input className={'w-52 mx-1'} title="نام" borderType="rounded" gapSize="8" direction='rtl' id={0} value={userInfo.firstName} onChange={(e) => setUserInfo({ ...userInfo, firstName: _onInput.noNumber(e.target.value) })} /> |
|
|
|
<Input className={'w-52 mx-1'} title="نام خانوادگی" borderType="rounded" id={1} direction='rtl' value={userInfo.lastName} onChange={(e) => setUserInfo({ ...userInfo, lastName: _onInput.noNumber(e.target.value) })} /> |
|
|
|
<Input className={'w-52 mx-1'} title="نام خانوادگی" borderType="rounded" id={1} direction='rtl' value={userInfo.lastName} onChange={(e) => setUserInfo({ ...userInfo, lastName: _onInput.noNumber(e.target.value) })} /> |
|
|
|
<Input className={'w-52 mx-1'} title="کدملی" borderType="rounded" gapSize="12" id={2} type='textNumber' max={10} value={userInfo.nationalId} onChange={e => setUserInfo({ ...userInfo, nationalId: _onInput.numberOnly(e.target.value) })} /> |
|
|
|
<Input className={'w-52 mx-1'} title="کدملی" borderType="rounded" gapSize="12" id={2} type='textNumber' max={10} value={userInfo.nationalId} onChange={e => setUserInfo({ ...userInfo, nationalId: _onInput.numberOnly(e.target.value) })} /> |
|
|
|
{/* <Input className={'w-52'} title="تاریخ تولد" borderType="rounded" gapSize="16" id={3} type='number' /> */} |
|
|
|
{/* <Input className={'w-52'} title="تاریخ تولد" borderType="rounded" gapSize="16" id={3} type='number' /> */} |
|
|
|
<DatePicker |
|
|
|
<DatePicker |
|
|
|
format="YYYY/MM/DD" |
|
|
|
format="YYYY/MM/DD" |
|
|
|
onChange={(e) =>{ |
|
|
|
onChange={(e) => { |
|
|
|
// console.log(e)
|
|
|
|
// console.log(e)
|
|
|
|
var s = new Date(e.unix * 1000) |
|
|
|
var s = new Date(e.unix * 1000) |
|
|
|
// console.log(date)
|
|
|
|
// console.log(date)
|
|
|
@ -474,8 +484,7 @@ const Register = ({ activeLogin, isMobile, setProfile, getProvince, getCity, pro |
|
|
|
day: 1 |
|
|
|
day: 1 |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
renderButton={(direction, handleClick) =>
|
|
|
|
renderButton={(direction, handleClick) => { |
|
|
|
{ |
|
|
|
|
|
|
|
return <p className="text-red-500 cursor-pointer font-bold mx-2" |
|
|
|
return <p className="text-red-500 cursor-pointer font-bold mx-2" |
|
|
|
onClick={() => handleClick()} |
|
|
|
onClick={() => handleClick()} |
|
|
|
> |
|
|
|
> |
|
|
@ -488,11 +497,12 @@ const Register = ({ activeLogin, isMobile, setProfile, getProvince, getCity, pro |
|
|
|
|
|
|
|
|
|
|
|
/> |
|
|
|
/> |
|
|
|
<select |
|
|
|
<select |
|
|
|
onChange={e => setUserInfo({...userInfo, gender: e.target.value})} |
|
|
|
onChange={e => setUserInfo({ ...userInfo, gender: e.target.value })} |
|
|
|
className="bg-white border border-solid border-gray-200 w-52 px-3 mx-1 rounded text-gray-400 outline-red52 py-1 h-12 mt-6"> |
|
|
|
className="bg-white border border-solid border-gray-200 w-52 px-3 mx-1 rounded text-black outline-red52 py-1 h-12 mt-6"> |
|
|
|
{genders.map((item) => ( |
|
|
|
{genders.map((item) => ( |
|
|
|
<option key={`gender${item.id}`} value={item.id}>{item.title}</option> |
|
|
|
<option key={`gender${item.id}`} value={item.id}>{item.title}</option> |
|
|
|
))} |
|
|
|
))} |
|
|
|
|
|
|
|
|
|
|
|
</select> |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -504,10 +514,22 @@ const Register = ({ activeLogin, isMobile, setProfile, getProvince, getCity, pro |
|
|
|
<div className=" flex justify-between"> |
|
|
|
<div className=" flex justify-between"> |
|
|
|
|
|
|
|
|
|
|
|
<div className="mx-1 ml-2"> |
|
|
|
<div className="mx-1 ml-2"> |
|
|
|
<FileInput title="بارگزاری صفحه اول شناسنامه" id={1} /> |
|
|
|
<FileInput |
|
|
|
|
|
|
|
title="بارگزاری صفحه اول شناسنامه" |
|
|
|
|
|
|
|
id={1} |
|
|
|
|
|
|
|
file={files.shenasNameh} |
|
|
|
|
|
|
|
onChange={e => setFiles({ ...files, shenasNameh: e })} |
|
|
|
|
|
|
|
deleteHandler={e => setFiles({ ...files, shenasNameh: e })} |
|
|
|
|
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<FileInput title="بارگزاری عکس پرسنلی" id={2} /> |
|
|
|
<FileInput |
|
|
|
|
|
|
|
title="بارگزاری عکس پرسنلی" |
|
|
|
|
|
|
|
id={2} |
|
|
|
|
|
|
|
file={files.personalPic} |
|
|
|
|
|
|
|
onChange={e => setFiles({ ...files, personalPic: e })} |
|
|
|
|
|
|
|
deleteHandler={e => setFiles({ ...files, personalPic: e })} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
@ -520,8 +542,8 @@ const Register = ({ activeLogin, isMobile, setProfile, getProvince, getCity, pro |
|
|
|
<p className="font-bold text-gray-400 mt-2 leading-normal text-sm">لطفا پایه تحصیلی دانش آموز را وارد کنید</p> |
|
|
|
<p className="font-bold text-gray-400 mt-2 leading-normal text-sm">لطفا پایه تحصیلی دانش آموز را وارد کنید</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<select |
|
|
|
<select |
|
|
|
onChange={e => setUserInfo({...userInfo, gradeIds: e.target.value})} |
|
|
|
onChange={e => setUserInfo({ ...userInfo, gradeIds: e.target.value })} |
|
|
|
className="bg-white border border-solid border-gray-300 w-48 p-3 rounded-lg text-gray-400 outline-red52 mx-6"> |
|
|
|
className="bg-white border border-solid border-gray-300 w-48 p-3 rounded-lg text-black outline-red52 mx-6"> |
|
|
|
{grades.map((item) => ( |
|
|
|
{grades.map((item) => ( |
|
|
|
<option key={`Grade__${item.id}`} value={item.id}>{item.title}</option> |
|
|
|
<option key={`Grade__${item.id}`} value={item.id}>{item.title}</option> |
|
|
|
))} |
|
|
|
))} |
|
|
@ -536,7 +558,7 @@ const Register = ({ activeLogin, isMobile, setProfile, getProvince, getCity, pro |
|
|
|
<Input className={'w-64'} title="نام مدرسه" borderType="rounded" gapSize="20" direction='rtl' id={4} value={userInfo.previousSchoolName} onChange={e => setUserInfo({ ...userInfo, previousSchoolName: e.target.value })} /> |
|
|
|
<Input className={'w-64'} title="نام مدرسه" borderType="rounded" gapSize="20" direction='rtl' id={4} value={userInfo.previousSchoolName} onChange={e => setUserInfo({ ...userInfo, previousSchoolName: e.target.value })} /> |
|
|
|
|
|
|
|
|
|
|
|
<select |
|
|
|
<select |
|
|
|
className="bg-white border border-solid border-gray-200 w-48 p-3 rounded-md text-gray-400 outline-red52 mx-3 mt-6" |
|
|
|
className="bg-white border border-solid border-gray-200 w-48 p-3 rounded-md text-black outline-red52 mx-3 mt-6" |
|
|
|
onChange={e => { setSelectedState(e.target.value); setUserInfo({ ...userInfo, previousSchoolType: e.target.value }) }}> |
|
|
|
onChange={e => { setSelectedState(e.target.value); setUserInfo({ ...userInfo, previousSchoolType: e.target.value }) }}> |
|
|
|
<option value={null}>نوع مدرسه</option> |
|
|
|
<option value={null}>نوع مدرسه</option> |
|
|
|
<option value={1}>دولتی</option> |
|
|
|
<option value={1}>دولتی</option> |
|
|
@ -545,7 +567,7 @@ const Register = ({ activeLogin, isMobile, setProfile, getProvince, getCity, pro |
|
|
|
<option value={4}>تیزهوشان</option> |
|
|
|
<option value={4}>تیزهوشان</option> |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
<select |
|
|
|
<select |
|
|
|
className="bg-white border border-solid border-gray-200 w-48 p-3 rounded-md text-gray-400 outline-red52 mx-3 mr-0 mt-6" |
|
|
|
className="bg-white border border-solid border-gray-200 w-48 p-3 rounded-md text-black outline-red52 mx-3 mr-0 mt-6" |
|
|
|
onChange={e => { setSelectedState(e.target.value); setUserInfo({ ...userInfo, provinceId: e.target.value }) }}> |
|
|
|
onChange={e => { setSelectedState(e.target.value); setUserInfo({ ...userInfo, provinceId: e.target.value }) }}> |
|
|
|
<option value={null}>استان</option> |
|
|
|
<option value={null}>استان</option> |
|
|
|
{ |
|
|
|
{ |
|
|
@ -554,7 +576,7 @@ const Register = ({ activeLogin, isMobile, setProfile, getProvince, getCity, pro |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<select |
|
|
|
<select |
|
|
|
className="bg-white border border-solid border-gray-200 w-48 p-3 rounded-md text-gray-400 outline-red52 mx-3 mr-0 mt-6" |
|
|
|
className="bg-white border border-solid border-gray-200 w-48 p-3 rounded-md text-black outline-red52 mx-3 mr-0 mt-6" |
|
|
|
onChange={(e) => { setSelectedCity(e.target.value); setUserInfo({ ...userInfo, cityId: e.target.value }) }}> |
|
|
|
onChange={(e) => { setSelectedCity(e.target.value); setUserInfo({ ...userInfo, cityId: e.target.value }) }}> |
|
|
|
<option value={null}> |
|
|
|
<option value={null}> |
|
|
|
شهر |
|
|
|
شهر |
|
|
@ -572,12 +594,14 @@ const Register = ({ activeLogin, isMobile, setProfile, getProvince, getCity, pro |
|
|
|
<div className="w-40"> |
|
|
|
<div className="w-40"> |
|
|
|
<Button borderType='rounded' title='مرحله بعد' onClick={() => { |
|
|
|
<Button borderType='rounded' title='مرحله بعد' onClick={() => { |
|
|
|
const inputs = document.querySelectorAll('.Login-box-form-item-input') |
|
|
|
const inputs = document.querySelectorAll('.Login-box-form-item-input') |
|
|
|
if (inputs[0].value) { |
|
|
|
if (userInfo.firstName && userInfo.lastName && userInfo.birthDate && userInfo.gradeIds |
|
|
|
|
|
|
|
&& userInfo.nationalId && userInfo.gender && userInfo.previousSchoolName && userInfo.previousSchoolType |
|
|
|
|
|
|
|
&& userInfo.zone && files.personalPic && files.shenasNameh) { |
|
|
|
setSteps(1) |
|
|
|
setSteps(1) |
|
|
|
setActiveStep([true, true, false, false]) |
|
|
|
setActiveStep([true, true, false, false]) |
|
|
|
setError('') |
|
|
|
setError('') |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
alert('لطفا تمامی فیلد ها را پر کنید') |
|
|
|
toast.warning('لطفا تمامی فیلد ها را پر کنید') |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}} /> |
|
|
|
}} /> |
|
|
@ -608,17 +632,21 @@ const Register = ({ activeLogin, isMobile, setProfile, getProvince, getCity, pro |
|
|
|
} |
|
|
|
} |
|
|
|
})} /> |
|
|
|
})} /> |
|
|
|
<Input className={'w-52'} title="نام خانوادگی" borderType="rounded" id={1} direction='rtl' value={userInfo.fatherInfo.lastName} |
|
|
|
<Input className={'w-52'} title="نام خانوادگی" borderType="rounded" id={1} direction='rtl' value={userInfo.fatherInfo.lastName} |
|
|
|
onChange={e => setUserInfo({ ...userInfo, fatherInfo:{...userInfo.fatherInfo, lastName: _onInput.noNumber(e.target.value) }})} /> |
|
|
|
onChange={e => setUserInfo({ ...userInfo, fatherInfo: { ...userInfo.fatherInfo, lastName: _onInput.noNumber(e.target.value) } })} /> |
|
|
|
<Input className={'w-52'} title="کدملی" borderType="rounded" gapSize="12" id={2} type='text' max={10} value={userInfo.fatherInfo.nationalId} |
|
|
|
<Input className={'w-52'} title="کدملی" borderType="rounded" gapSize="12" id={2} type='text' max={10} value={userInfo.fatherInfo.nationalId} |
|
|
|
onChange={e => setUserInfo({ ...userInfo, fatherInfo: { |
|
|
|
onChange={e => setUserInfo({ |
|
|
|
|
|
|
|
...userInfo, fatherInfo: { |
|
|
|
...userInfo.fatherInfo, |
|
|
|
...userInfo.fatherInfo, |
|
|
|
nationalId : _onInput.numberOnly(e.target.value) |
|
|
|
nationalId: _onInput.numberOnly(e.target.value) |
|
|
|
} })} /> |
|
|
|
} |
|
|
|
<select className="bg-white border border-solid border-gray-200 w-52 px-3 rounded text-gray-400 outline-red52 py-1 h-12 mt-6"
|
|
|
|
})} /> |
|
|
|
onChange={e => setUserInfo({...userInfo, fatherInfo: { |
|
|
|
<select className="bg-white border border-solid border-gray-200 w-52 px-3 rounded text-black outline-red52 py-1 h-12 mt-6" |
|
|
|
|
|
|
|
onChange={e => setUserInfo({ |
|
|
|
|
|
|
|
...userInfo, fatherInfo: { |
|
|
|
...userInfo.fatherInfo, |
|
|
|
...userInfo.fatherInfo, |
|
|
|
education: e.target.value |
|
|
|
education: e.target.value |
|
|
|
}})}> |
|
|
|
} |
|
|
|
|
|
|
|
})}> |
|
|
|
{madraks.map((item) => ( |
|
|
|
{madraks.map((item) => ( |
|
|
|
<option key={`madraks${item.id}`} value={item.id}>{item.title}</option> |
|
|
|
<option key={`madraks${item.id}`} value={item.id}>{item.title}</option> |
|
|
|
))} |
|
|
|
))} |
|
|
@ -631,19 +659,21 @@ const Register = ({ activeLogin, isMobile, setProfile, getProvince, getCity, pro |
|
|
|
<div className="flex flex-wrap justify-between"> |
|
|
|
<div className="flex flex-wrap justify-between"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Input className={'w-52'} title="تلفن همراه" borderType="rounded" max={11} id={3} value={userInfo.fatherInfo.cellphone} onChange={e => setUserInfo({ ...userInfo, fatherInfo:{ |
|
|
|
<Input className={'w-52'} title="تلفن همراه" borderType="rounded" max={11} id={3} value={userInfo.fatherInfo.cellphone} onChange={e => setUserInfo({ |
|
|
|
|
|
|
|
...userInfo, fatherInfo: { |
|
|
|
...userInfo.fatherInfo, |
|
|
|
...userInfo.fatherInfo, |
|
|
|
cellphone: _onInput.phonenumber(e.target.value) |
|
|
|
cellphone: _onInput.phonenumber(e.target.value) |
|
|
|
}})} /> |
|
|
|
} |
|
|
|
|
|
|
|
})} /> |
|
|
|
<Input className={'w-52'} title="شغل" borderType="rounded" direction='rtl' gapSize="8" id={4} value={userInfo.fatherInfo.job} |
|
|
|
<Input className={'w-52'} title="شغل" borderType="rounded" direction='rtl' gapSize="8" id={4} value={userInfo.fatherInfo.job} |
|
|
|
onChange={e => setUserInfo({ ...userInfo, fatherInfo: { ...userInfo.fatherInfo, job:e.target.value }})} /> |
|
|
|
onChange={e => setUserInfo({ ...userInfo, fatherInfo: { ...userInfo.fatherInfo, job: e.target.value } })} /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Input className={'w-52'} title="محل کار" borderType="rounded" id={5} direction='rtl' value={userInfo.fatherInfo.workPlace} |
|
|
|
<Input className={'w-52'} title="محل کار" borderType="rounded" id={5} direction='rtl' value={userInfo.fatherInfo.workPlace} |
|
|
|
|
|
|
|
|
|
|
|
onChange={e => setUserInfo({ ...userInfo, fatherInfo:{...userInfo.fatherInfo, workPlace: e.target.value }})} /> |
|
|
|
onChange={e => setUserInfo({ ...userInfo, fatherInfo: { ...userInfo.fatherInfo, workPlace: e.target.value } })} /> |
|
|
|
<Input className={'w-52'} title="تلفن محل کار" borderType="rounded" gapSize="28" id={6} type='text' max={11} value={userInfo.fatherInfo.workPhone} |
|
|
|
<Input className={'w-52'} title="تلفن محل کار" borderType="rounded" gapSize="28" id={6} type='text' max={11} value={userInfo.fatherInfo.workPhone} |
|
|
|
onChange={e => setUserInfo({ ...userInfo, fatherInfo:{...userInfo.fatherInfo, workPhone: _onInput.numberOnly(e.target.value) }})} /> |
|
|
|
onChange={e => setUserInfo({ ...userInfo, fatherInfo: { ...userInfo.fatherInfo, workPhone: _onInput.numberOnly(e.target.value) } })} /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -662,20 +692,22 @@ const Register = ({ activeLogin, isMobile, setProfile, getProvince, getCity, pro |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Input className={'w-52'} title="نام" borderType="rounded" gapSize="8" direction='rtl' id={7} value={userInfo.motherInfo.firstName} |
|
|
|
<Input className={'w-52'} title="نام" borderType="rounded" gapSize="8" direction='rtl' id={7} value={userInfo.motherInfo.firstName} |
|
|
|
onChange={e => setUserInfo({ ...userInfo, motherInfo:{...userInfo.motherInfo, firstName: _onInput.noNumber(e.target.value) }})} /> |
|
|
|
onChange={e => setUserInfo({ ...userInfo, motherInfo: { ...userInfo.motherInfo, firstName: _onInput.noNumber(e.target.value) } })} /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Input className={'w-52'} title="نام خانوادگی" borderType="rounded" id={8} direction='rtl' value={userInfo.motherInfo.lastName} |
|
|
|
<Input className={'w-52'} title="نام خانوادگی" borderType="rounded" id={8} direction='rtl' value={userInfo.motherInfo.lastName} |
|
|
|
onChange={e => setUserInfo({ ...userInfo, motherInfo:{...userInfo.motherInfo, lastName: _onInput.noNumber(e.target.value) }})} /> |
|
|
|
onChange={e => setUserInfo({ ...userInfo, motherInfo: { ...userInfo.motherInfo, lastName: _onInput.noNumber(e.target.value) } })} /> |
|
|
|
<Input className={'w-52'} title="کدملی" borderType="rounded" gapSize="12" id={9} type='text' max={10} value={userInfo.motherInfo.nationalId} |
|
|
|
<Input className={'w-52'} title="کدملی" borderType="rounded" gapSize="12" id={9} type='text' max={10} value={userInfo.motherInfo.nationalId} |
|
|
|
onChange={e => setUserInfo({ ...userInfo, motherInfo:{...userInfo.motherInfo, nationalId: _onInput.numberOnly(e.target.value) }})} /> |
|
|
|
onChange={e => setUserInfo({ ...userInfo, motherInfo: { ...userInfo.motherInfo, nationalId: _onInput.numberOnly(e.target.value) } })} /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select className="bg-white border border-solid border-gray-200 w-52 px-3 rounded text-gray-400 outline-red52 py-1 h-12 mt-6" |
|
|
|
<select className="bg-white border border-solid border-gray-200 w-52 px-3 rounded text-black outline-red52 py-1 h-12 mt-6" |
|
|
|
onChange={e => setUserInfo({...userInfo, motherInfo: { |
|
|
|
onChange={e => setUserInfo({ |
|
|
|
|
|
|
|
...userInfo, motherInfo: { |
|
|
|
...userInfo.motherInfo, |
|
|
|
...userInfo.motherInfo, |
|
|
|
education: e.target.value |
|
|
|
education: e.target.value |
|
|
|
}})}> |
|
|
|
} |
|
|
|
|
|
|
|
})}> |
|
|
|
{madraks.map((item) => ( |
|
|
|
{madraks.map((item) => ( |
|
|
|
<option key={`madraks${item.id}`} value={item.id}>{item.title}</option> |
|
|
|
<option key={`madraks${item.id}`} value={item.id}>{item.title}</option> |
|
|
|
))} |
|
|
|
))} |
|
|
@ -689,29 +721,37 @@ const Register = ({ activeLogin, isMobile, setProfile, getProvince, getCity, pro |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Input className={'w-52'} title="تلفن همراه" borderType="rounded" type='text' id={10} max={11} value={userInfo.motherInfo.cellphone} |
|
|
|
<Input className={'w-52'} title="تلفن همراه" borderType="rounded" type='text' id={10} max={11} value={userInfo.motherInfo.cellphone} |
|
|
|
onChange={e => setUserInfo({ ...userInfo, motherInfo: { |
|
|
|
onChange={e => setUserInfo({ |
|
|
|
|
|
|
|
...userInfo, motherInfo: { |
|
|
|
...userInfo.motherInfo, |
|
|
|
...userInfo.motherInfo, |
|
|
|
cellphone: _onInput.phonenumber(e.target.value) |
|
|
|
cellphone: _onInput.phonenumber(e.target.value) |
|
|
|
}})} /> |
|
|
|
} |
|
|
|
|
|
|
|
})} /> |
|
|
|
<Input className={'w-52'} title="شغل" borderType="rounded" direction='rtl' gapSize="8" id={11} value={userInfo.motherInfo.job} |
|
|
|
<Input className={'w-52'} title="شغل" borderType="rounded" direction='rtl' gapSize="8" id={11} value={userInfo.motherInfo.job} |
|
|
|
onChange={e => setUserInfo({ ...userInfo, motherInfo:{ |
|
|
|
onChange={e => setUserInfo({ |
|
|
|
|
|
|
|
...userInfo, motherInfo: { |
|
|
|
...userInfo.motherInfo, |
|
|
|
...userInfo.motherInfo, |
|
|
|
job: e.target.value |
|
|
|
job: e.target.value |
|
|
|
} })} /> |
|
|
|
} |
|
|
|
|
|
|
|
})} /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Input className={'w-52'} title="محل کار" borderType="rounded" id={12} direction='rtl' |
|
|
|
<Input className={'w-52'} title="محل کار" borderType="rounded" id={12} direction='rtl' |
|
|
|
value={userInfo.motherInfo.workPlace} |
|
|
|
value={userInfo.motherInfo.workPlace} |
|
|
|
onChange={e => setUserInfo({ ...userInfo, motherInfo: { |
|
|
|
onChange={e => setUserInfo({ |
|
|
|
|
|
|
|
...userInfo, motherInfo: { |
|
|
|
...userInfo.motherInfo, |
|
|
|
...userInfo.motherInfo, |
|
|
|
workPlace: e.target.value |
|
|
|
workPlace: e.target.value |
|
|
|
} })} /> |
|
|
|
} |
|
|
|
|
|
|
|
})} /> |
|
|
|
<Input className={'w-52'} title="تلفن محل کار" borderType="rounded" gapSize="28" id={13} type='text' max={11} |
|
|
|
<Input className={'w-52'} title="تلفن محل کار" borderType="rounded" gapSize="28" id={13} type='text' max={11} |
|
|
|
value={userInfo.motherInfo.workPhone} |
|
|
|
value={userInfo.motherInfo.workPhone} |
|
|
|
onChange={e => setUserInfo({ ...userInfo, motherInfo: { |
|
|
|
onChange={e => setUserInfo({ |
|
|
|
|
|
|
|
...userInfo, motherInfo: { |
|
|
|
...userInfo.motherInfo, |
|
|
|
...userInfo.motherInfo, |
|
|
|
workPhone: _onInput.numberOnly(e.target.value) |
|
|
|
workPhone: _onInput.numberOnly(e.target.value) |
|
|
|
} })} /> |
|
|
|
} |
|
|
|
|
|
|
|
})} /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -751,14 +791,24 @@ const Register = ({ activeLogin, isMobile, setProfile, getProvince, getCity, pro |
|
|
|
|
|
|
|
|
|
|
|
<div className="w-40"> |
|
|
|
<div className="w-40"> |
|
|
|
<Button borderType='rounded' title='مرحله بعد' onClick={() => { |
|
|
|
<Button borderType='rounded' title='مرحله بعد' onClick={() => { |
|
|
|
const inputs = document.querySelectorAll('.Login-box-form-item-input') |
|
|
|
// const inputs = document.querySelectorAll('.Login-box-form-item-input')
|
|
|
|
if (inputs[0].value) { |
|
|
|
|
|
|
|
|
|
|
|
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) { |
|
|
|
setSteps(2); |
|
|
|
setSteps(2); |
|
|
|
|
|
|
|
|
|
|
|
setActiveStep([true, true, true, false]) |
|
|
|
setActiveStep([true, true, true, false]) |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
alert('لطفا تمامی فیلد ها را پر کنید') |
|
|
|
toast.warning('لطفا تمامی فیلد ها را پر کنید') |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -775,13 +825,13 @@ const Register = ({ activeLogin, isMobile, setProfile, getProvince, getCity, pro |
|
|
|
{ |
|
|
|
{ |
|
|
|
steps == 2 && |
|
|
|
steps == 2 && |
|
|
|
<> |
|
|
|
<> |
|
|
|
<div className="w-full px-10 pb-6 border-b border-solid border-gray-200"> |
|
|
|
<div className="w-full px-10 pb-6 border-bflex flex-col border-solid border-gray-200"> |
|
|
|
<div className="mb-4"> |
|
|
|
<div className="mb-4"> |
|
|
|
<h1 className="font-black">قوانین و مقررات ثبت نام</h1> |
|
|
|
<h1 className="font-black">قوانین و مقررات ثبت نام</h1> |
|
|
|
<p className="font-bold text-gray-400 mt-2 leading-normal text-sm">لطفا قوانین و مقررات را مطالعه فرمایید</p> |
|
|
|
<p className="font-bold text-gray-400 mt-2 leading-normal text-sm">لطفا قوانین و مقررات را مطالعه فرمایید</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<p className="text-gray-500 text-justify"> |
|
|
|
<div className="text-gray-500 text-justify"> |
|
|
|
بند اول: موارد مربوط به آموزش مخاطبین |
|
|
|
بند اول: موارد مربوط به آموزش مخاطبین |
|
|
|
پیر مردی هر روز تو محله می دید پسر کی با کفش های پاره و پای برهنه با توپ پلاستیکی فوتبال بازی می کند، روزی رفت ی کتانی نو خرید و اومد و به پسرک گفت بیا این کفشا رو بپوش…پسرک کفشا رو پوشید و خوشحال رو به پیر مرد کرد و گفت: شما خدایید؟! پیر مرد لبش را گزید و گفت نه! پسرک گفت پس دوست خدایی، چون من دیشب فقط به خدا گفتم كه کفش ندارم |
|
|
|
پیر مردی هر روز تو محله می دید پسر کی با کفش های پاره و پای برهنه با توپ پلاستیکی فوتبال بازی می کند، روزی رفت ی کتانی نو خرید و اومد و به پسرک گفت بیا این کفشا رو بپوش…پسرک کفشا رو پوشید و خوشحال رو به پیر مرد کرد و گفت: شما خدایید؟! پیر مرد لبش را گزید و گفت نه! پسرک گفت پس دوست خدایی، چون من دیشب فقط به خدا گفتم كه کفش ندارم |
|
|
|
هر نفسی که فرو می بریم، مرگی را که مدام به ما دست اندازی میکند پس میزند... در نهایت این مرگ است که باید پیروز شود، زیرا از هنگام تولد بخشی از سرنوشت ما شده و فقط مدت کوتاهی پیش از بلعیدن طعمه اش، با آن بازی می کند. با این همه، ما تا آنجا که ممکن است، با علاقه فراوان و دلواپسی زیاد به زندگی ادامه می دهیم، همان طور که تا آنجا که ممکن است طولانی تر در یک حباب صابون می دمیم تا بزرگتر شود، گر چه با قطعیتی تمام می دانیم که خواهد ترکید. |
|
|
|
هر نفسی که فرو می بریم، مرگی را که مدام به ما دست اندازی میکند پس میزند... در نهایت این مرگ است که باید پیروز شود، زیرا از هنگام تولد بخشی از سرنوشت ما شده و فقط مدت کوتاهی پیش از بلعیدن طعمه اش، با آن بازی می کند. با این همه، ما تا آنجا که ممکن است، با علاقه فراوان و دلواپسی زیاد به زندگی ادامه می دهیم، همان طور که تا آنجا که ممکن است طولانی تر در یک حباب صابون می دمیم تا بزرگتر شود، گر چه با قطعیتی تمام می دانیم که خواهد ترکید. |
|
|
@ -794,17 +844,17 @@ const Register = ({ activeLogin, isMobile, setProfile, getProvince, getCity, pro |
|
|
|
بند سوم: موارد مربوط به آموزش مخاطبین |
|
|
|
بند سوم: موارد مربوط به آموزش مخاطبین |
|
|
|
خالد حسینی تو رمان باد بادک باز مینویسه : ﻣﺮﺩ ﺁﻫﺴﺘﻪ ﺩﺭ ﮔﻮﺵ ﻓﺮﺯﻧﺪ ﺗﺎﺯﻩ ﺑﻪ ﺑﻠﻮﻍ ﺭﺳﯿﺪﻩ ﺍﺵ ﺑﺮﺍﯼ ﭘﻨﺪ ﭼﻨﯿﻦ ﻧﺠﻮﺍ ﮐﺮﺩ : ” ﭘﺴﺮﻡ ﺩﺭ ﺯﻧﺪﮔﯽ ﻫﺮﮔﺰ ﺩﺯﺩﯼ ﻧﮑﻦ ” ﭘﺴﺮ ﻣﺘﻌﺠﺐ ﻭ ﻣﺒﻬﻮﺕ ﺑﻪ ﭘﺪﺭ ﻧﮕﺎﻩ ﮐﺮﺩ ﺑﺪﯾﻦ ﻣﻌﻨﺎ ﮐﻪ ﺍﻭ ﻫﺮﮔﺰ ﺩﺳﺖ ﮐﺞ ﻧﺪﺍﺷﺘﻪ ﭘﺪﺭ ﺑﻪ ﻧﮕﺎﻩ ﻣﺘﻌﺠﺐ ﻓﺮﺯﻧﺪ ﻟﺒﺨﻨﺪﯼ ﺯﺩ ﻭ ﺍﺩﺍﻣﻪ ﺩﺍﺩ : ﺩﺭ ﺯﻧﺪﮔﯽ ﺩﺭﻭﻍ ﻧﮕﻮ ﭼﺮﺍ ﮐﻪ ﺍﮔﺮ ﮔﻔﺘﯽ ﺻﺪﺍﻗﺖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ ﺍﯼ، ﺧﯿﺎﻧﺖ ﻧﮑﻦ ﮐﻪ ﺍﮔﺮ ﮐﺮﺩﯼ ﻋﺸﻖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ ﺍﯼ، ﺧﺸﻮﻧﺖ ﻧﮑﻦ ﺍﮔﺮ ﮐﺮﺩﯼ ﻣﺤﺒﺖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ ﺍﯼ، ﻧﺎ ﺣﻖ ﻧﮕﻮ ﺍﮔﺮ ﮔﻔﺘﯽ ﺣﻖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ ﺍﯼ، ﺑﯽ ﺣﯿﺎﯾﯽ ﻧﮑﻦ ﺍﮔﺮ ﮐﺮﺩﯼ ﺷﺮﺍﻓﺖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ ﺍی... ﭘﺲ ﺩﺭ ﺯﻧﺪﮔﯽ ﻓﻘﻂ ﺩﺯﺩﯼ نکن |
|
|
|
خالد حسینی تو رمان باد بادک باز مینویسه : ﻣﺮﺩ ﺁﻫﺴﺘﻪ ﺩﺭ ﮔﻮﺵ ﻓﺮﺯﻧﺪ ﺗﺎﺯﻩ ﺑﻪ ﺑﻠﻮﻍ ﺭﺳﯿﺪﻩ ﺍﺵ ﺑﺮﺍﯼ ﭘﻨﺪ ﭼﻨﯿﻦ ﻧﺠﻮﺍ ﮐﺮﺩ : ” ﭘﺴﺮﻡ ﺩﺭ ﺯﻧﺪﮔﯽ ﻫﺮﮔﺰ ﺩﺯﺩﯼ ﻧﮑﻦ ” ﭘﺴﺮ ﻣﺘﻌﺠﺐ ﻭ ﻣﺒﻬﻮﺕ ﺑﻪ ﭘﺪﺭ ﻧﮕﺎﻩ ﮐﺮﺩ ﺑﺪﯾﻦ ﻣﻌﻨﺎ ﮐﻪ ﺍﻭ ﻫﺮﮔﺰ ﺩﺳﺖ ﮐﺞ ﻧﺪﺍﺷﺘﻪ ﭘﺪﺭ ﺑﻪ ﻧﮕﺎﻩ ﻣﺘﻌﺠﺐ ﻓﺮﺯﻧﺪ ﻟﺒﺨﻨﺪﯼ ﺯﺩ ﻭ ﺍﺩﺍﻣﻪ ﺩﺍﺩ : ﺩﺭ ﺯﻧﺪﮔﯽ ﺩﺭﻭﻍ ﻧﮕﻮ ﭼﺮﺍ ﮐﻪ ﺍﮔﺮ ﮔﻔﺘﯽ ﺻﺪﺍﻗﺖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ ﺍﯼ، ﺧﯿﺎﻧﺖ ﻧﮑﻦ ﮐﻪ ﺍﮔﺮ ﮐﺮﺩﯼ ﻋﺸﻖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ ﺍﯼ، ﺧﺸﻮﻧﺖ ﻧﮑﻦ ﺍﮔﺮ ﮐﺮﺩﯼ ﻣﺤﺒﺖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ ﺍﯼ، ﻧﺎ ﺣﻖ ﻧﮕﻮ ﺍﮔﺮ ﮔﻔﺘﯽ ﺣﻖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ ﺍﯼ، ﺑﯽ ﺣﯿﺎﯾﯽ ﻧﮑﻦ ﺍﮔﺮ ﮐﺮﺩﯼ ﺷﺮﺍﻓﺖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ ﺍی... ﭘﺲ ﺩﺭ ﺯﻧﺪﮔﯽ ﻓﻘﻂ ﺩﺯﺩﯼ نکن |
|
|
|
|
|
|
|
|
|
|
|
</p> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className="flex items-center px-10 py-6"> |
|
|
|
<div className="flex items-center px-10 py-6"> |
|
|
|
{/* <input type="checkbox" className="w-6 h-6" />*/} |
|
|
|
{/* <input type="checkbox" className="w-6 h-6" />*/} |
|
|
|
<Checkbox name={'PARENTS_CHECKED'} onChange={e => |
|
|
|
<Checkbox name={'PARENTS_CHECKED'} onChange={e => |
|
|
|
e.target.checked ? setUserInfo({...userInfo, rulesAccepted: true}) |
|
|
|
e.target.checked ? setUserInfo({ ...userInfo, rulesAccepted: true }) |
|
|
|
:setUserInfo({...userInfo, rulesAccepted: false}) |
|
|
|
: setUserInfo({ ...userInfo, rulesAccepted: false }) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}/> |
|
|
|
} /> |
|
|
|
<label className="mr-4 font-bold text-gray-500"> |
|
|
|
<label className="mr-4 font-bold text-gray-500"> |
|
|
|
اینجانبان |
|
|
|
اینجانبان |
|
|
|
<span className="text-red52 font-bold"> {userInfo.fatherInfo.firstName} {userInfo.fatherInfo.lastName} </span> |
|
|
|
<span className="text-red52 font-bold"> {userInfo.fatherInfo.firstName} {userInfo.fatherInfo.lastName} </span> |
|
|
@ -825,8 +875,12 @@ const Register = ({ activeLogin, isMobile, setProfile, getProvince, getCity, pro |
|
|
|
|
|
|
|
|
|
|
|
<div className="w-40"> |
|
|
|
<div className="w-40"> |
|
|
|
<Button borderType='rounded' title='مرحله بعد' onClick={() => { |
|
|
|
<Button borderType='rounded' title='مرحله بعد' onClick={() => { |
|
|
|
|
|
|
|
if(userInfo.rulesAccepted){ |
|
|
|
setSteps(3); |
|
|
|
setSteps(3); |
|
|
|
setActiveStep([true, true, true, true]) |
|
|
|
setActiveStep([true, true, true, true]) |
|
|
|
|
|
|
|
} else{ |
|
|
|
|
|
|
|
toast.warning('متاسفانه امکان رفتن به مرحله بعد در صورت عدم توافق با قوانین و مقررات نیست') |
|
|
|
|
|
|
|
} |
|
|
|
}} /> |
|
|
|
}} /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -897,10 +951,45 @@ const Register = ({ activeLogin, isMobile, setProfile, getProvince, getCity, pro |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div className="w-40"> |
|
|
|
<div className="w-40"> |
|
|
|
<Button borderType='rounded' title='تایید' to='/' onClick={() => |
|
|
|
<Button borderType='rounded' title='تایید' to='/' onClick={async () => { |
|
|
|
// activeLogin()
|
|
|
|
// activeLogin()
|
|
|
|
setProfile(userInfo) |
|
|
|
try { |
|
|
|
} /> |
|
|
|
let access = window.localStorage.getItem("access"); |
|
|
|
|
|
|
|
const formData = new FormData(); |
|
|
|
|
|
|
|
formData.append("file", files.shenasNameh); |
|
|
|
|
|
|
|
let res = await axios.post(ApiConfig.baseUrl + '/file/upload', formData, { |
|
|
|
|
|
|
|
headers: { |
|
|
|
|
|
|
|
'content-type': 'multipart/form-data',
|
|
|
|
|
|
|
|
Authorization: `Bearer ${access}` |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
if (res.data) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
const personalPic = new FormData(); |
|
|
|
|
|
|
|
personalPic.append("file", files.personalPic); |
|
|
|
|
|
|
|
let resp = await axios.post(ApiConfig.baseUrl + '/file/upload', personalPic, { |
|
|
|
|
|
|
|
headers: { |
|
|
|
|
|
|
|
'content-type': 'multipart/form-data',
|
|
|
|
|
|
|
|
Authorization: `Bearer ${access}` |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
if(resp.data){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setProfile({...userInfo,
|
|
|
|
|
|
|
|
shenasnamehFileId: res.data?.data?.id, |
|
|
|
|
|
|
|
personalPicFileId: resp.data?.data?.id |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} catch (err) { |
|
|
|
|
|
|
|
console.error(err) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
|
|
console.error(error) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}} /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|