Various Changes

main
Pedram Keshavarzi 3 years ago
parent 736d0d4dbf
commit 19f0edea4e
  1. 7
      .vscode/launch.json
  2. 4
      src/components/Product/index.js
  3. 37
      src/components/fileInput/index.js
  4. 12
      src/components/input/index.js
  5. 1
      src/constants/cities.js
  6. 6
      src/constants/defaultValues.js
  7. 4
      src/constants/states.js
  8. 2
      src/redux/reducers/public.js
  9. 1
      src/view/addProduct/Main/editor.css
  10. 4
      src/view/chatPage/index.js
  11. 289
      src/view/register/index.js

@ -0,0 +1,7 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": []
}

@ -104,10 +104,10 @@ const ProductDesign = ({
<div className="flex p-4 justify-between items-center">
<h1 className="font-black text-xl text-red52">{productPrice} تومان</h1>
<div
className={`bg-pinkF5 text-red26 rounded-md w-32 border-2 z-10 border-red52 px-1 py-2 text-xs flex justify-center hover:bg-red52 hover:text-white
className={`bg-pinkF5 text-red26 rounded-md w-32 border-2 border-red52 px-1 py-2 text-xs flex justify-center hover:bg-red52 hover:text-white
`}
>
<button className="z-10" onClick={btnOnClick}>افزودن به سبد خرید</button>
<button className="" onClick={btnOnClick}>افزودن به سبد خرید</button>
</div>
</div>

@ -10,18 +10,44 @@ const FileInput = ({
const [focus, setFocus] = useState('border-gray-300 border-dotted');
const [selectedImage, setSelectedImage] = useState(null);
const [imageUrl, setImageUrl] = useState(null);
const [del, setDelete] = useState(false);
useEffect(() => {
if (selectedImage) {
setImageUrl(URL.createObjectURL(selectedImage));
}
}, [selectedImage]);
function overrideEventDefaults(event) {
event.preventDefault();
event.stopPropagation();
};
function handleDragAndDropFiles(event) {
overrideEventDefaults(event);
if (!event.dataTransfer) return;
handleFiles(event.dataTransfer.files);
}
const handleFiles = (fileList) => {
if (fileList) {
let files = Array.from(fileList);
// setFiles(files);
console.log(files);
setSelectedImage(files[0]);
}
};
return (
<div >
<div onDrop={overrideEventDefaults}
onDragEnter={overrideEventDefaults}
onDragLeave={overrideEventDefaults}
onDragOver={overrideEventDefaults}>
<input type='file' className="hidden" id={`file` + id} accept="image/*" onFocus={() => setFocus('border-red52')} onChange={e => { setSelectedImage(e.target.files[0]); setFocus('border-red52 border-solid') }} />
<label for={"file" + id} className={`flex flex-col text-center justify-center items-center border-2 ${focus} rounded-lg p-4 cursor-pointer`} style={{maxHeight: '200px'}}>
<label
onDrop={handleDragAndDropFiles}
onDragEnter={overrideEventDefaults}
onDragLeave={overrideEventDefaults}
onDragOver={overrideEventDefaults}
for={"file" + id} className={`flex flex-col text-center justify-center items-center border-2 ${focus} rounded-lg p-4 cursor-pointer`} style={{ maxHeight: '200px' }}>
{imageUrl == null ?
<>
<div>
@ -36,8 +62,11 @@ const FileInput = ({
</>
:
<>
<div className="h-40">
<div className="h-40" onMouseEnter={() => setDelete(true)} onMouseLeave={() => setDelete(false)}>
<img src={imageUrl} className="rounded-lg h-full" />
{del && <div className=" top-0 -mt-20 relative bg-red-500 w-full h-12 flex items-center justify-center text-white rounded-lg" onClick={() => setSelectedImage(null)}>
<button>حذف</button>
</div>}
</div>
</>
}

@ -11,8 +11,10 @@ const Input = ({
className,
onChange,
style,
bg
bg,
value,
max,
onFocus
}) => {
const focusHandler = (id) => {
@ -53,11 +55,15 @@ const Input = ({
id={`Login-box-form-item-input-name${id}`}
className={`Login-box-form-item-input w-full h-full px-4 outline-0 rounded-lg text-gray-700 focus:text-red52`}
style={{ direction: direction ? direction : "ltr", backgroundColor: bg }}
onFocus={() => focusHandler(id ? id : 0)}
onFocus={() => {if(onFocus){onFocus();} focusHandler(id ? id : 0)}}
onBlur={() => blurHandler(id ? id : 0)}
onChange={onChange}
value={value}
maxLength={max}
/>
</div>
)
}

File diff suppressed because one or more lines are too long

@ -1,7 +1,7 @@
export const ApiConfig = {
apiKey: 'AIzaSyBBksq-Asxq2M4Ot-75X19IyrEYJqNBPcg',
authDomain: 'dnvn.ir',
baseUrl: 'https://dnvn.ir/api/v1',
// apiKey: 'AIzaSyBBksq-Asxq2M4Ot-75X19IyrEYJqNBPcg',
// authDomain: 'dnvn.ir',
// baseUrl: 'https://dnvn.ir/api/v1',
//baseUrl: 'http://localhost:3030/api/v1',
loginURL: 'user/login',
otploginURL: 'user/otp/login',

@ -0,0 +1,4 @@
const states = [{"id":1,"name":"آذربایجان شرقی"},{"id":2,"name":"آذربایجان غربی"},{"id":3,"name":"اردبیل"},{"id":4,"name":"اصفهان"},{"id":5,"name":"البرز"},{"id":6,"name":"ایلام"},{"id":7,"name":"بوشهر"},{"id":8,"name":"تهران"},{"id":9,"name":"چهارمحال وبختیاری"},{"id":10,"name":"خراسان جنوبی"},{"id":11,"name":"خراسان رضوی"},{"id":12,"name":"خراسان شمالی"},{"id":13,"name":"خوزستان"},{"id":14,"name":"زنجان"},{"id":15,"name":"سمنان"},{"id":16,"name":"سیستان وبلوچستان"},{"id":17,"name":"فارس"},{"id":18,"name":"قزوین"},{"id":19,"name":"قم"},{"id":20,"name":"کردستان"},{"id":21,"name":"کرمان"},{"id":22,"name":"کرمانشاه"},{"id":23,"name":"کهگیلویه وبویراحمد"},{"id":24,"name":"گلستان"},{"id":25,"name":"گیلان"},{"id":26,"name":"لرستان"},{"id":27,"name":"مازندران"},{"id":28,"name":"مرکزی"},{"id":29,"name":"هرمزگان"},{"id":30,"name":"همدان"},{"id":31,"name":"یزد"}]
export const ostan = states;

@ -1,3 +1,4 @@
import { ostan } from "../../constants/states";
import location from "../../utils/location";
const initialState = {
@ -114,6 +115,7 @@ const grades = [
"دوازدهم",
];
export default function publicApi(state = initialState, action) {
let { type, data } = action;
switch (type) {

@ -407,6 +407,7 @@
top: 35px;
left: 5px;
right:40px;
display: flex;
flex-direction: column;
width: 235px;

@ -192,7 +192,7 @@ const ChatPage = ({
thisMessages.map((message) => (
<div className={`w-full p-5 flex ${message.userId !== user.id && 'ltr'}`}>
{message.userId == contact.id && <img src={message.userId == contact.id ? contact.avatar : user.avatar} className={`w-12 h-12 rounded-full ${message.userId == user.id ? 'ml-2' : 'mr-2'}`}/>}
<div className={`${message.userId == user.id ? 'bg-blue-200 text-gray-500 text-sm rounded-tr-none' : 'bg-blue-400 text-gray-100 text-sm rounded-tl-none'} p-3 rounded-xl text-right flex flex-col `} style={{maxWidth: '50%'}}>
<div className={`${message.userId == user.id ? 'bg-blue-300 text-gray-700 text-sm rounded-tr-none' : 'bg-blue-400 text-gray-100 text-sm rounded-tl-none'} p-3 rounded-xl text-right flex flex-col `} style={{maxWidth: '50%'}}>
<p>{message.value}</p>
<div className={` mt-2 w-full flex items-center ${message.userId == user.id ?'justify-end' : 'justify-start'} text-xs`}>
{
@ -201,7 +201,7 @@ const ChatPage = ({
<BsCheck2All
className="text-lg "
style={
{ color: "#979797" }
{ color: "#404040" }
}

@ -14,6 +14,12 @@ import Stepper from "../../components/Stepper";
import UserInfo from "../dashboard2/UserInfo";
import { connect } from "react-redux";
import MobileRegister from './mobile'
import persian from "react-date-object/calendars/persian"
import persian_fa from "react-date-object/locales/persian_fa"
import DatePicker from "react-multi-date-picker";
import Checkbox from "../../components/Checkbox";
import { ostan } from "../../constants/states";
import { cities } from "../../constants/cities";
const Register = ({ activeLogin, isMobile }) => {
@ -213,10 +219,7 @@ const Register = ({ activeLogin, isMobile }) => {
},
]
const grades = [
{
id: 0,
title: ''
},
{
id: 1,
title: 'پایه اول'
@ -269,6 +272,66 @@ const Register = ({ activeLogin, isMobile }) => {
]
const genders = [
{
id: 0,
title: 'جنسیت'
},
{
id: 1,
title: 'مذکر',
},
{
id: 2,
title: 'مونث',
}
]
const CostumeDatePickerInput = ({ openCalendar, value, handleValueChange, title }) => {
return (
<Input
onFocus={openCalendar}
value={value}
onChange={handleValueChange}
title={title}
className="w-52"
id={3}
/>
)
}
const madraks = [
{
id: 0,
title: 'مدرک تحصیلی'
},
{
id: 1,
title: 'ابتدایی'
},
{
id: 2,
title: 'دیپلم'
},
{
id: 3,
title: 'فوق دیپلم'
},
{
id: 4,
title: 'کارشناسی'
},
{
id: 5,
title: 'کارشناسی ارشد'
},
{
id: 6,
title: 'دکتری'
},
]
const [selectedState, setSelectedState] = useState(null);
const [selectedCity, setSelectedCity] = useState(null);
return (
isMobile ? <MobileRegister /> :
<div className="flex justify-center mb-4" style={{ direction: 'rtl', marginTop: '8.5%', marginRight: '6.5%', width: '93.5%', marginRight: '6.5%' }}>
@ -328,23 +391,43 @@ const Register = ({ activeLogin, isMobile }) => {
<div className="w-full px-10 pb-6 border-b border-solid border-gray-200">
<div className="mb-4">
<h1 className="font-black">مشخصات هویتی دانش آموز</h1>
<p className="font-bold text-gray-300 text-sm">اطلاعات هویتی دانش آموز را با دقت تکمیل و عکس مدارک را بارگزاری نمایید</p>
<p className="font-bold text-gray-400 mt-2 leading-normal text-sm">اطلاعات هویتی دانش آموز را با دقت تکمیل و عکس مدارک را بارگزاری نمایید</p>
</div>
<div className="flex">
<div className="flex w-2/5 ">
<div className="ml-2">
<Input title="نام" borderType="rounded" gapSize="8" direction='rtl' id={0} />
<Input title="کدملی" borderType="rounded" gapSize="12" id={1} type='number' />
<Input title="جنسیت" borderType="rounded" gapSize="16" id={2} />
</div>
<div className="mr-2">
<Input title="نام خانوادگی" borderType="rounded" id={3} direction='rtl' />
<Input title="تاریخ تولد" borderType="rounded" gapSize="16" id={4} type='number' />
<div className="flex w-2/5 flex-wrap justify-between">
<Input className={'w-52'} title="نام" borderType="rounded" gapSize="8" direction='rtl' id={0} value={userInfo.name} onChange={(e) => setUserInfo({ ...userInfo, name: e.target.value })} />
<Input className={'w-52'} title="نام خانوادگی" borderType="rounded" id={1} direction='rtl' value={userInfo.familyName} onChange={(e) => setUserInfo({ ...userInfo, familyName: e.target.value })} />
<Input className={'w-52'} title="کدملی" borderType="rounded" gapSize="12" id={2} type='textNumber' max={10} value={userInfo.nationalId} onChange={e => setUserInfo({ ...userInfo, nationalId: e.target.value })} />
{/* <Input className={'w-52'} title="تاریخ تولد" borderType="rounded" gapSize="16" id={3} type='number' /> */}
<DatePicker
format="YYYY/MM/DD"
onChange={(e) => setUserInfo({ ...userInfo, birthDate: e.day})}
calendar={persian}
locale={persian_fa}
renderButton={(direction, handleClick) => (
<button className="text-blue-500 font-bold mx-2" onClick={handleClick}>
{direction === "right" ? ">" : "<"}
</button>
)}
render={<CostumeDatePickerInput title='تاریخ تولد' />}
/>
<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">
{genders.map((item) => (
<option key={`gender${item.id}`}>{item.title}</option>
))}
</select>
</div>
</div>
<div className="w-3/5 flex justify-center">
<div className="w-3/5 flex flex-wrap justify-between">
<div className="w-2/5 mx-4">
<FileInput title="بارگزاری صفحه اول شناسنامه" id={1} />
</div>
@ -359,7 +442,7 @@ const Register = ({ activeLogin, isMobile }) => {
<div className="w-full px-10 py-10 border-b flex items-center border-solid border-gray-200">
<div className="">
<h1 className="font-black">پایه تحصیلی</h1>
<p className="font-bold text-gray-300 text-sm">لطفا پایه تحصیلی دانش آموز را وارد کنید</p>
<p className="font-bold text-gray-400 mt-2 leading-normal text-sm">لطفا پایه تحصیلی دانش آموز را وارد کنید</p>
</div>
<select className="bg-white border border-solid border-gray-300 w-48 p-3 rounded-lg text-gray-400 outline-red52 mx-6">
{grades.map((item) => (
@ -370,19 +453,35 @@ const Register = ({ activeLogin, isMobile }) => {
<div className="w-full px-10 py-8 flex flex-col ">
<div className="mb-4">
<h1 className="font-black">مشخصات هویتی دانش آموز</h1>
<p className="font-bold text-gray-300 text-sm">اطلاعات هویتی دانش آموز را با دقت تکمیل و عکس مدارک را بارگزاری نمایید</p>
<p className="font-bold text-gray-400 mt-2 leading-normal text-sm">اطلاعات هویتی دانش آموز را با دقت تکمیل و عکس مدارک را بارگزاری نمایید</p>
</div>
<div className="flex justify-between items-center">
<Input title="نام مدرسه" borderType="rounded" gapSize="20" direction='rtl' id={5} />
<select className="bg-white border border-solid border-gray-200 w-full px-3 rounded text-gray-400 outline-red52 mx-2 h-12 mt-6">
{grades.map((item) => (
<option key={`Grade__${item.id}`}>{item.title}</option>
))}
</select>
<Input title="شهر" borderType="rounded" gapSize="8" direction='rtl' id={6} />
<Input title="منطقه" borderType="rounded" gapSize="12" id={7} type='number' />
<Input title="استان" borderType="rounded" gapSize="12" id={8} type='number' />
<div className="flex justify-start flex-wrap items-center">
<Input className={'w-64'} title="نام مدرسه" borderType="rounded" gapSize="20" direction='rtl' id={4} value={userInfo.schoolName} onChange={e => setUserInfo({ ...userInfo, schoolName: e.target.value })} />
<select
className="bg-white border border-solid border-gray-200 w-48 p-3 rounded-md text-gray-400 outline-red52 mx-6 ml-3 mt-6"
onChange={e => {setSelectedState(e.target.value); setUserInfo({...userInfo, state: e.target.value})}}>
<option value={null}>استان</option>
{
ostan.map((item) => <option value={item.id}>{item.name}</option>)
}
</select>
{
selectedState !== null &&
<select
className="bg-white border border-solid border-gray-200 w-48 p-3 rounded-md text-gray-400 outline-red52 mx-6 mr-3 mt-6"
onChange={(e) => {setSelectedCity(e.target.value); setUserInfo({...userInfo, city: e.target.value})}}>
<option value={null}>
شهر
</option>
{
cities.filter(itm => itm.ostan == selectedState).map((city) => <option value={city.id}>{city.name}</option>)
}
</select>
}
{
selectedCity !== null && <Input className={'w-64'} title="منطقه" borderType="rounded" gapSize="12" id={5} type='number' />
}
</div>
<div className="flex pt-10 justify-end">
<div className="w-40">
@ -395,22 +494,7 @@ const Register = ({ activeLogin, isMobile }) => {
} else {
alert('لطفا تمامی فیلد ها را پر کنید')
}
setUserInfo(prevState => {
return {
...prevState,
name: document.getElementById('Login-box-form-item-input-name0').value,
nationalId: document.getElementById('Login-box-form-item-input-name1').value,
sex: document.getElementById('Login-box-form-item-input-name2').value,
familyName: document.getElementById('Login-box-form-item-input-name3').value,
birthDate: document.getElementById('Login-box-form-item-input-name4').value,
schoolName: document.getElementById('Login-box-form-item-input-name5').value,
city: document.getElementById('Login-box-form-item-input-name6').value,
state: document.getElementById('Login-box-form-item-input-name7').value,
}
})
}} />
</div>
</div>
@ -421,35 +505,39 @@ const Register = ({ activeLogin, isMobile }) => {
}
{
steps == 1 &&
<form>
<form className="w-full">
<div className="w-full px-10 pb-6 border-b border-solid border-gray-200">
<div className="mb-4">
<h1 className="font-black">مشخصات هویتی پدر</h1>
<p className="font-bold text-gray-300 text-sm">لطفا اطلاعات مربوط هویتی پدر را وارد کنید</p>
<p className="font-bold text-gray-400 mt-2 leading-normal text-sm">لطفا اطلاعات مربوط هویتی پدر را وارد کنید</p>
</div>
<div className="flex">
<div className="flex flex-wrap justify-between">
<Input title="نام" borderType="rounded" gapSize="8" direction='rtl' id={0} />
<Input title="کدملی" borderType="rounded" gapSize="12" id={1} type='number' />
<Input className={'w-52'} title="نام" borderType="rounded" gapSize="8" direction='rtl' id={0} value={userInfo.fatherName} onChange={e => setUserInfo({ ...userInfo, fatherName: e.target.value })}/>
<Input className={'w-52'} title="کدملی" borderType="rounded" gapSize="12" id={1} type='number' value={userInfo.fatherNationalId} onChange={e => setUserInfo({ ...userInfo, fatherNationalId: e.target.value })}/>
<Input title="نام خانوادگی" borderType="rounded" id={2} direction='rtl' />
<Input title="مدرک نحصیلی" borderType="rounded" gapSize="20" id={3} />
<Input className={'w-52'} title="نام خانوادگی" borderType="rounded" id={2} direction='rtl' value={userInfo.fatherFamilyName} onChange={e => setUserInfo({ ...userInfo, fatherFamilyName: 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">
{madraks.map((item) => (
<option key={`madraks${item.id}`}>{item.title}</option>
))}
</select>
</div>
<div className="flex">
<div className="flex flex-wrap justify-between">
<Input title="تلفن همراه" borderType="rounded" type='number' id={4} />
<Input title="شغل" borderType="rounded" direction='rtl' gapSize="8" id={5} />
<Input className={'w-52'} title="تلفن همراه" borderType="rounded" type='number' id={3} value={userInfo.fatherPhoneNumber} onChange={e => setUserInfo({ ...userInfo, fatherPhoneNumber: e.target.value })}/>
<Input className={'w-52'} title="شغل" borderType="rounded" direction='rtl' gapSize="8" id={4} value={userInfo.fatherJob} onChange={e => setUserInfo({ ...userInfo, fatherJob: e.target.value })}/>
<Input title="محل کار" borderType="rounded" id={6} direction='rtl' />
<Input title="تلفن محل کار" borderType="rounded" gapSize="28" id={7} type='number' />
<Input className={'w-52'} title="محل کار" borderType="rounded" id={5} direction='rtl' value={userInfo.fatherJobAddress} onChange={e => setUserInfo({ ...userInfo, fatherJobAddress: e.target.value })}/>
<Input className={'w-52'} title="تلفن محل کار" borderType="rounded" gapSize="28" id={6} type='number' value={userInfo.fatherJobPhoneNumber} onChange={e => setUserInfo({ ...userInfo, fatherJobPhoneNumber: e.target.value })} />
@ -462,31 +550,35 @@ const Register = ({ activeLogin, isMobile }) => {
<div className="w-full px-10 py-6 border-b border-solid border-gray-200">
<div className="mb-4">
<h1 className="font-black">مشخصات هویتی مادر</h1>
<p className="font-bold text-gray-300 text-sm">لطفا اطلاعات مربوط هویتی مادر را وارد کنید</p>
<p className="font-bold text-gray-400 mt-2 leading-normal text-sm">لطفا اطلاعات مربوط هویتی مادر را وارد کنید</p>
</div>
<div className="flex">
<div className="flex flex-wrap justify-between">
<Input title="نام" borderType="rounded" gapSize="8" direction='rtl' id={8} />
<Input title="کدملی" borderType="rounded" gapSize="12" id={9} type='number' />
<Input className={'w-52'} title="نام" borderType="rounded" gapSize="8" direction='rtl' id={7} value={userInfo.motherName} onChange={e => setUserInfo({ ...userInfo, motherName: e.target.value })}/>
<Input className={'w-52'} title="کدملی" borderType="rounded" gapSize="12" id={8} type='number' value={userInfo.motherNationalId} onChange={e => setUserInfo({ ...userInfo, motherNationalId: e.target.value })} />
<Input title="نام خانوادگی" borderType="rounded" id={10} direction='rtl' />
<Input title="مدرک نحصیلی" borderType="rounded" gapSize="20" id={11} />
<Input className={'w-52'} title="نام خانوادگی" borderType="rounded" id={9} direction='rtl' value={userInfo.motherFamilyName} onChange={e => setUserInfo({ ...userInfo, motherFamilyName: 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">
{madraks.map((item) => (
<option key={`madraks${item.id}`}>{item.title}</option>
))}
</select>
</div>
<div className="flex">
<div className="flex flex-wrap justify-between">
<Input title="تلفن همراه" borderType="rounded" type='number' id={12} />
<Input title="شغل" borderType="rounded" direction='rtl' gapSize="8" id={13} />
<Input className={'w-52'} title="تلفن همراه" borderType="rounded" type='number' id={10} value={userInfo.motherPhoneNumber} onChange={e => setUserInfo({ ...userInfo, motherPhoneNumber: e.target.value })}/>
<Input className={'w-52'} title="شغل" borderType="rounded" direction='rtl' gapSize="8" id={11} value={userInfo.motherJob} onChange={e => setUserInfo({ ...userInfo, motherJob: e.target.value })}/>
<Input title="محل کار" borderType="rounded" id={14} direction='rtl' />
<Input title="تلفن محل کار" borderType="rounded" gapSize="28" id={15} type='number' />
<Input className={'w-52'} title="محل کار" borderType="rounded" id={12} direction='rtl' value={userInfo.motherJobAddress} onChange={e => setUserInfo({ ...userInfo, motherJobAddress: e.target.value })} />
<Input className={'w-52'} title="تلفن محل کار" borderType="rounded" gapSize="28" id={13} type='number' value={userInfo.motherJobPhoneNumber} onChange={e => setUserInfo({ ...userInfo, motherJobPhoneNumber: e.target.value })}/>
@ -498,26 +590,21 @@ const Register = ({ activeLogin, isMobile }) => {
<div className="w-full px-10 py-8 flex flex-col ">
<div className="mb-4">
<h1 className="font-black">زندگی با خانواده </h1>
<p className="font-bold text-gray-300 text-sm">در این قسمت مشخص کنید دانشس آموز به همراه چه کسانی زندگی میکند </p>
</div>
<div className="flex justify-between items-center">
<div className="w-4/5 flex">
<select className="bg-white border border-solid border-gray-200 w-full px-3 rounded text-gray-400 outline-red52 mx-2 h-12 mt-6">
{grades.map((item) => (
<option key={`Grade__${item.id}`}>{item.title}</option>
))}
</select>
<Input title="تعداد افراد خانواده" borderType="rounded" type='number' gapSize="40" direction='rtl' id={16} />
<p className="font-bold text-gray-400 mt-2 leading-normal text-sm">در این قسمت مشخص کنید دانشس آموز به همراه چه کسانی زندگی میکند </p>
</div>
<Input title="نشانی محل سکونت" borderType="rounded" gapSize="40" id={17} />
<div className="flex flex-wrap justify-start items-center">
<Input className={'w-64 ml-2'} title="تعداد افراد خانواده" borderType="rounded" type='number' gapSize="40" direction='rtl' id={14} value={userInfo.familyNumber} onChange={e => setUserInfo({ ...userInfo, familyNumber: e.target.value })} />
<Input className={'w-64'} title="تلفن ثابت" borderType="rounded" type='number' gapSize="40" direction='rtl' id={15} value={userInfo.homePhoneNumber} onChange={e => setUserInfo({ ...userInfo, homePhoneNumber: e.target.value })}/>
<Input title="نشانی محل سکونت" borderType="rounded" gapSize="40" id={16} value={userInfo.address} onChange={e => setUserInfo({ ...userInfo, address: e.target.value })}/>
</div>
<div className="flex justify-start items-center">
<div className="w-2/5 flex">
<Input title="تلفن ثابت" borderType="rounded" type='number' gapSize="40" direction='rtl' id={18} className="w-1/2" />
<Input title="تعداد افراد خانواده" borderType="rounded" type='number' gapSize="40" direction='rtl' id={19} className="w-1/2" />
</div>
</div>
@ -540,38 +627,9 @@ const Register = ({ activeLogin, isMobile }) => {
} else {
alert('لطفا تمامی فیلد ها را پر کنید')
}
setUserInfo(prevState => {
return {
...prevState,
fatherName: document.getElementById('Login-box-form-item-input-name0').value,
fatherNationalId: document.getElementById('Login-box-form-item-input-name1').value,
fatherFamilyName: document.getElementById('Login-box-form-item-input-name2').value,
fatherMajor: document.getElementById('Login-box-form-item-input-name3').value,
fatherPhoneNumber: document.getElementById('Login-box-form-item-input-name4').value,
fatherJob: document.getElementById('Login-box-form-item-input-name5').value,
fatherJobAddress: document.getElementById('Login-box-form-item-input-name6').value,
fatherJobPhoneNumber: document.getElementById('Login-box-form-item-input-name7').value,
motherName: document.getElementById('Login-box-form-item-input-name8').value,
motherNationalId: document.getElementById('Login-box-form-item-input-name9').value,
motherFamilyName: document.getElementById('Login-box-form-item-input-name10').value,
motherMajor: document.getElementById('Login-box-form-item-input-name11').value,
motherPhoneNumber: document.getElementById('Login-box-form-item-input-name12').value,
motherJob: document.getElementById('Login-box-form-item-input-name13').value,
motherJobAddress: document.getElementById('Login-box-form-item-input-name14').value,
motherJobPhoneNumber: document.getElementById('Login-box-form-item-input-name15').value,
familyNumber: document.getElementById('Login-box-form-item-input-name16').value,
address: document.getElementById('Login-box-form-item-input-name17').value,
homePhoneNumber: document.getElementById('Login-box-form-item-input-name18').value,
}
})
}} />
</div>
</div>
@ -587,7 +645,7 @@ const Register = ({ activeLogin, isMobile }) => {
<div className="w-full px-10 pb-6 border-b border-solid border-gray-200">
<div className="mb-4">
<h1 className="font-black">قوانین و مقررات ثبت نام</h1>
<p className="font-bold text-gray-300 text-sm">لطفا اطلاعات مربوط هویتی پدر را وارد کنید</p>
<p className="font-bold text-gray-400 mt-2 leading-normal text-sm">لطفا قوانین و مقررات را مطالعه فرمایید</p>
</div>
<p className="text-gray-500">
@ -607,7 +665,8 @@ const Register = ({ activeLogin, isMobile }) => {
</div>
<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'} />
<label className="mr-4 font-bold text-gray-500">
اینجانبان
<span className="text-red52 font-bold"> {userInfo.fatherName} {userInfo.fatherFamilyName} </span>
@ -644,7 +703,7 @@ const Register = ({ activeLogin, isMobile }) => {
<div className="w-full px-10 pb-6 border-b border-solid border-gray-200">
<div className="mb-4 pb-4">
<h1 className="font-black">تایید اطلاعات</h1>
<p className="font-bold text-gray-300 text-sm">لطفا اطلاعاتی که وارد کرده اید را چک کنید</p>
<p className="font-bold text-gray-400 mt-2 leading-normal text-sm">لطفا اطلاعاتی که وارد کرده اید را چک کنید</p>
</div>

Loading…
Cancel
Save