some debug & mobile login

main
alireza khaji 3 years ago
parent 71f90f5724
commit 119552b7dd
  1. 12
      src/components/Product/index.js
  2. 1
      src/redux/reducers/user.js
  3. 4
      src/redux/reducers/userFactor.js
  4. 23
      src/view/LoginSignUp/SignUpBox.js
  5. 200
      src/view/LoginSignUp/mobile/index.js
  6. 270
      src/view/register/index.js
  7. 70
      src/view/services/PaymentBox.js
  8. 73
      src/view/services/index.js

@ -41,12 +41,13 @@ const ProductDesign = ({
isMobile, isMobile,
onClick, onClick,
product, product,
userInfo,
}) => { }) => {
const [isHovering, setIsHovering] = useState(false); const [isHovering, setIsHovering] = useState(false);
// alert(catId); // alert(catId);
let rulesAccepted = JSON.parse( console.log("userInfo:*******************************************************");
localStorage.getItem("userData") console.log(userInfo);
).rulesAccepted; let rulesAccepted = userInfo.rulesAccepted;
const emkanat = [ const emkanat = [
{ {
title: "دستشویی", title: "دستشویی",
@ -177,7 +178,10 @@ const ProductDesign = ({
} `} } `}
/> />
</div> </div>
<div className="flex flex-col text-right" style={!isMobile?{width:"calc(100% - 15rem)"}:null}> <div
className="flex flex-col text-right"
style={!isMobile ? { width: "calc(100% - 15rem)" } : null}
>
<h1 className="font-bold text-red52 border-b border-red82OP p-2 "> <h1 className="font-bold text-red52 border-b border-red82OP p-2 ">
{product?.name} {product?.name}
</h1> </h1>

@ -62,6 +62,7 @@ export default function user(state = initialState, action) {
return { ...state, loading: false, userRoles: data, error: null }; return { ...state, loading: false, userRoles: data, error: null };
case "user/setProfile": case "user/setProfile":
toast.success("تغییرات اعمال شد."); toast.success("تغییرات اعمال شد.");
window.location.replace("/services");
return { ...state, loading: false, error: null, setDone: true }; return { ...state, loading: false, error: null, setDone: true };
case "loading": case "loading":
return { ...state, loading: true }; return { ...state, loading: true };

@ -52,7 +52,9 @@ export default function userFactor(state = initialState, action) {
case "userFactor/loading": case "userFactor/loading":
return { ...state, loading: true }; return { ...state, loading: true };
case "userFactor/error": case "userFactor/error":
if (data.statusCode!==404){ toast.error(data.message);} if(data.statusCode !== 404) {
toast.error(data.message);
}
return { ...state, loading: false, error: data.message }; return { ...state, loading: false, error: data.message };
default: default:
return state; return state;

@ -57,7 +57,7 @@ const SignUpBox = ({ setSignUp, sendOtp,otpLogin }) => {
let code = Number( let code = Number(
box[0].value + box[1].value + box[2].value + box[3].value box[0].value + box[1].value + box[2].value + box[3].value
); );
alert(code); // alert(code);
} }
//api send //api send
} }
@ -104,8 +104,8 @@ const SignUpBox = ({ setSignUp, sendOtp,otpLogin }) => {
<div className="w-[85%]"> <div className="w-[85%]">
<Input label="نام دانشآموز" index={0} /> <Input label="نام دانشآموز" index={0} />
<Input label="نام خانوادگی دانشآموز" index={1} /> <Input label="نام خانوادگی دانشآموز" index={1} />
<Input label="کد ملی دانشآموز" index={2} /> <Input label="کد ملی دانشآموز" index={2} maxLength={10} />
<Input label="شماره موبایل" index={3} /> <Input label="شماره موبایل" index={3} maxLength={11} />
</div> </div>
)} )}
{/* -------SendCodeText----------- */} {/* -------SendCodeText----------- */}
@ -180,24 +180,24 @@ export default connect(mapStateToProps, mapDispatchToProps)(SignUpBox);
//---------------------------------- //----------------------------------
const Input = ({ label,index }) => { const Input = ({ label, index, maxLength }) => {
const onFocushandler=(i)=>{ const onFocushandler = (i) => {
let box = document.querySelectorAll(".Input"); let box = document.querySelectorAll(".Input");
let label = document.querySelectorAll(".Input-label"); let label = document.querySelectorAll(".Input-label");
let line = document.querySelectorAll(".line"); let line = document.querySelectorAll(".line");
box[i].style.borderColor = "#DF1452"; box[i].style.borderColor = "#DF1452";
label[i].style.color = "#DF1452"; label[i].style.color = "#DF1452";
label[i].style.fontSize = "12px"; label[i].style.fontSize = "12px";
if(window.innerWidth>1270){ if (window.innerWidth > 1270) {
label[i].style.transform = "translate(-15px,-25px)"; label[i].style.transform = "translate(-15px,-25px)";
}else{ } else {
label[i].style.transform = "translate(-15px,-20px)"; label[i].style.transform = "translate(-15px,-20px)";
} }
line[i].style.display="block"; line[i].style.display = "block";
} };
const onBlurHandler = (e,i) => { const onBlurHandler = (e, i) => {
if(e.target.value.length===0){ if (e.target.value.length === 0) {
let box = document.querySelectorAll(".Input"); let box = document.querySelectorAll(".Input");
let label = document.querySelectorAll(".Input-label"); let label = document.querySelectorAll(".Input-label");
let line = document.querySelectorAll(".line"); let line = document.querySelectorAll(".line");
@ -219,6 +219,7 @@ const Input = ({ label,index }) => {
className="w-full h-full absolute top-0 right-0 outline-0 outline-transparent rounded-lg bg-transparent px-5 text-lg text-[#DF1452]" className="w-full h-full absolute top-0 right-0 outline-0 outline-transparent rounded-lg bg-transparent px-5 text-lg text-[#DF1452]"
onFocus={() => onFocushandler(index)} onFocus={() => onFocushandler(index)}
onBlur={(e) => onBlurHandler(e, index)} onBlur={(e) => onBlurHandler(e, index)}
maxLength={maxLength || null}
/> />
<div className="Input-label text-[#8A8A8A] absolute right-[10px] pointer-events-none transition-all duration-300 ease-out"> <div className="Input-label text-[#8A8A8A] absolute right-[10px] pointer-events-none transition-all duration-300 ease-out">
{label} {label}

@ -11,6 +11,7 @@ import thirdPic from '../../../assets/img/undraw_certificate_re_yadi.svg';
import { connect } from "react-redux"; import { connect } from "react-redux";
import { user, publicApi } from "../../../redux/actions"; import { user, publicApi } from "../../../redux/actions";
import SignUpBox from "../SignUpBox";
const LoginSignUpMobile = ({ const LoginSignUpMobile = ({
activeLogin, activeLogin,
@ -22,6 +23,9 @@ const LoginSignUpMobile = ({
setHeaderOptions, setHeaderOptions,
isMobile, isMobile,
}) => { }) => {
//ark add------------------------------------------
const [signUp, setSignUp] = useState(false);
//----------------------------------------
const [steps, setSteps] = useState(0); const [steps, setSteps] = useState(0);
const [index, setIndex] = useState(1); const [index, setIndex] = useState(1);
const [register, setRegister] = useState(false); const [register, setRegister] = useState(false);
@ -61,11 +65,11 @@ const LoginSignUpMobile = ({
resetTimeout(); resetTimeout();
timeoutRef.current = setTimeout( timeoutRef.current = setTimeout(
() => { () => {
setIndex((prevIndex) => prevIndex + 1 setIndex(
(prevIndex) => prevIndex + 1
// prevIndex === slideContents.length - 1 ? 0 : prevIndex + 1 // prevIndex === slideContents.length - 1 ? 0 : prevIndex + 1
) );
if (index === slideContents.length) if (index === slideContents.length) setTimeout(setIndex(1), 1000);
setTimeout(setIndex(1), 1000)
}, },
delay delay
@ -76,10 +80,6 @@ const LoginSignUpMobile = ({
}; };
}, [index]); }, [index]);
const [level, setLevel] = useState("phonenumber"); const [level, setLevel] = useState("phonenumber");
const [signUpFields, setSignUpFiels] = useState({}); const [signUpFields, setSignUpFiels] = useState({});
const [error, setError] = useState(""); const [error, setError] = useState("");
@ -130,19 +130,19 @@ const LoginSignUpMobile = ({
signUpFields?.cellphone?.slice(0, 2) === "09" && signUpFields?.cellphone?.slice(0, 2) === "09" &&
signUpFields?.cellphone.length === 11 signUpFields?.cellphone.length === 11
) { ) {
setSteps(2);
setSteps(2)
sendPhoneNumber({ cellphone: signUpFields?.cellphone }); sendPhoneNumber({ cellphone: signUpFields?.cellphone });
setError(undefined); setError(undefined);
console.log(signUpFields.cellphone) console.log(signUpFields.cellphone);
} else { } else {
setError("شماره موبایل خود را چک کنید."); setError("شماره موبایل خود را چک کنید.");
} }
}; };
const checkOtp = () => { const checkOtp = () => {
if (steps !== 1 && if (
steps !== 1 &&
signUpFields?.otp1 && signUpFields?.otp1 &&
signUpFields?.otp2 && signUpFields?.otp2 &&
signUpFields?.otp3 && signUpFields?.otp3 &&
@ -159,8 +159,6 @@ const LoginSignUpMobile = ({
applicationToken: "22", applicationToken: "22",
}); });
setError(undefined); setError(undefined);
} else { } else {
setError("کد وارد شده را چک کنید."); setError("کد وارد شده را چک کنید.");
} }
@ -203,119 +201,128 @@ const LoginSignUpMobile = ({
{ {
id: 0, id: 0,
image: firstPic, image: firstPic,
title: 'یک معلم دیوانه در کمین شما نشسته است مراقب باشید', title: "یک معلم دیوانه در کمین شما نشسته است مراقب باشید",
description: 'معلمی که دانش آموزانش رو شب ها شکار می کند و این متن شاید باعث تعجب شما شده باشد که آیا طراح دیوانه شده است یا خیر ؟ ', description:
"معلمی که دانش آموزانش رو شب ها شکار می کند و این متن شاید باعث تعجب شما شده باشد که آیا طراح دیوانه شده است یا خیر ؟ ",
}, },
{ {
id: 1, id: 1,
image: secondPic, image: secondPic,
title: 'یک آزمون سخت و افتضاح در راه هست!', title: "یک آزمون سخت و افتضاح در راه هست!",
description: 'لورم ایپسوم نمیخواستم استفاده کنم برای همین این متنای عجیب رو مینویسم ببینم چجوری میشه تهش بالاخره اونا هم قراره یه متن عجیب بنویسن ', description:
"لورم ایپسوم نمیخواستم استفاده کنم برای همین این متنای عجیب رو مینویسم ببینم چجوری میشه تهش بالاخره اونا هم قراره یه متن عجیب بنویسن ",
}, },
{ {
id: 2, id: 2,
image: thirdPic, image: thirdPic,
title: 'یک اسلاید عجیب غریب دیگر در راه هست', title: "یک اسلاید عجیب غریب دیگر در راه هست",
description: 'معلمی که دانش آموزانش رو شب ها شکار می کند و این متن شاید باعث تعجب شما شده باشد که آیا طراح دیوانه شده است یا خیر ؟ ', description:
"معلمی که دانش آموزانش رو شب ها شکار می کند و این متن شاید باعث تعجب شما شده باشد که آیا طراح دیوانه شده است یا خیر ؟ ",
}, },
]; ];
const delay = 2500; const delay = 2500;
return ( return (
<div
<div className="w-full flex flex-col items-center justify-center" style={{ height: '100vh', direction: 'rtl' }}> className="w-full flex flex-col items-center justify-center"
style={{ height: "100vh", direction: "rtl" }}
>
<div className="w-full flex flex-col h-full justify-between pt-10 pb-24 rounded-xl"> <div className="w-full flex flex-col h-full justify-between pt-10 pb-24 rounded-xl">
{/* form */} {/* form */}
<div className="h-12 w-full px-5 flex justify-end"> <div className="h-12 w-full px-5 flex justify-end">
{steps != 0 && {steps != 0 && (
<div className="w-12 h-12 bg-gray-200 rounded-xl flex items-center justify-center text-gray-500 m-0 text-2xl font-light cursor-pointer" onClick={() => setSteps(steps - 1)}> <div
className="w-12 h-12 bg-gray-200 rounded-xl flex items-center justify-center text-gray-500 m-0 text-2xl font-light cursor-pointer"
onClick={() => setSteps(steps - 1)}
>
{`>`} {`>`}
</div> </div>
} )}
</div> </div>
<div className={`flex w-full ${steps == 2 ? 'h-full justify-center' : 'justify-between'} flex-col items-center p-6`}> <div
className={`flex w-full ${
steps == 2 ? "h-full justify-center" : "justify-between"
} flex-col items-center p-6`}
>
<img src={logo} className="w-1/2 m-6" /> <img src={logo} className="w-1/2 m-6" />
<div className="flex flex-col w-full items-start justify-start leading-normal"> <div className="flex flex-col w-full items-start justify-start leading-normal">
{ {steps == 2 ? (
steps == 2 ? <h1 className="text-red26 text-lg font-bold">تاییدیه ثبت نام</h1> : <h1 className="text-red26 text-lg font-bold">تاییدیه ثبت نام</h1>
) : (
<> <>
<div className=" w-full flex flex-col items-center justify-center h-4/5" > <div className=" w-full flex flex-col items-center justify-center h-4/5">
<div className="slideshow items-center justify-center" style={{ direction: 'ltr' }}>
<div <div
className="slideshowSlider w-full" className="slideshow items-center justify-center"
style={{ transform: `translate3d(${-index * 100}%, 0, 0)` }} style={{ direction: "ltr" }}
> >
{[slideContents[slideContents.length - 1],
...slideContents, slideContents[0]
].map((item, index) => (
<div <div
className="slide" className="slideshowSlider w-full"
key={`sildeNo${index}`} style={{
transform: `translate3d(${-index * 100}%, 0, 0)`,
}}
> >
{[
slideContents[slideContents.length - 1],
...slideContents,
slideContents[0],
].map((item, index) => (
<div className="slide" key={`sildeNo${index}`}>
<div className="w-full h-full flex flex-col justify-center items-center"> <div className="w-full h-full flex flex-col justify-center items-center">
<img src={item.image} className="h-2/5" /> <img src={item.image} className="h-2/5" />
<h1 className="w-4/5 text-sm my-2 text-red26 font-bold whitespace-normal">{item.title}</h1> <h1 className="w-4/5 text-sm my-2 text-red26 font-bold whitespace-normal">
<p className=" px-12 text-right text-xs whitespace-normal">{item.description}</p> {item.title}
</h1>
<p className=" px-12 text-right text-xs whitespace-normal">
{item.description}
</p>
</div> </div>
</div> </div>
))} ))}
</div> </div>
{/* <div className="slideshowDots">
{slideContents.map((_, idx) => (
<div
key={idx}
className={`slideshowDot${index === idx + 1 ? " active" : ""}`}
onClick={() => {
setIndex(idx + 1);
}}
></div>
))}
</div> */}
</div> </div>
</div> </div>
</> </>
)}
}
<p className="text-gray-500 text-sm mt-2 flex justify-center"> <p className="text-gray-500 text-sm mt-2 flex justify-center">
{steps == 2 &&
{ (resend ? (
steps == 2 && (resend ?
<div> <div>
<span className="ml-2">کد تایید ارسال نشد؟</span> <span className="ml-2">کد تایید ارسال نشد؟</span>
<button className="text-red52" <button
className="text-red52"
onClick={() => { onClick={() => {
checkPhoneNumber(signUpFields?.cellphone); checkPhoneNumber(signUpFields?.cellphone);
setResend(false) setResend(false);
}} }}
>درخواست مجدد کد تایید</button> >
درخواست مجدد کد تایید
</button>
</div> </div>
: <p className="w-4/5 "> ) : (
<p className="w-4/5 ">
یک کد چهار رقمی تا &nbsp;{" "} یک کد چهار رقمی تا &nbsp;{" "}
<Timer seconds={120} refresh={() => { setResend(true) }} /> <Timer
&nbsp; دیگر برای شماره seconds={120}
&nbsp;{" "} refresh={() => {
setResend(true);
}}
/>
&nbsp; دیگر برای شماره &nbsp;{" "}
<span className="text-red52 text-sm"> <span className="text-red52 text-sm">
{signUpFields?.cellphone} {signUpFields?.cellphone}
</span>{" "} </span>{" "}
&nbsp; ارسال خواهد شد. &nbsp; ارسال خواهد شد.
</p>) </p>
} ))}
</p> </p>
{ {steps == 0 && (
steps == 0 &&
<div className="flex w-full items-center mt-4"> <div className="flex w-full items-center mt-4">
<Link <Link
to="" to=""
className="Login-box-form-btn w-full h-12 rounded-lg bg-red52 text-white flex items-center justify-center ml-1" className="Login-box-form-btn w-full h-12 rounded-lg bg-red52 text-white flex items-center justify-center ml-1"
onClick={() => { onClick={() => {
setSteps(1); setSteps(1);
}} }}
> >
ورود ورود
@ -324,27 +331,22 @@ const LoginSignUpMobile = ({
to="" to=""
className="Login-box-form-btn w-full h-12 rounded-lg border border-solid border-red52 text-red52 flex items-center justify-center mr-1" className="Login-box-form-btn w-full h-12 rounded-lg border border-solid border-red52 text-red52 flex items-center justify-center mr-1"
onClick={() => { onClick={() => {
setSteps(1); setSignUp(true);
setRegister(true);
}} }}
> >
ثبت نام ثبت نام
</Link> </Link>
</div> </div>
} )}
{ {steps == 1 && (
steps == 1 &&
<> <>
<Input <Input
title={"شماره موبایل"} title={"شماره موبایل"}
name="cellphone" name="cellphone"
regex={onInput.numberOnly} regex={onInput.numberOnly}
onChange={(name, value) => onChange(name, value)} onChange={(name, value) => onChange(name, value)}
value={signUpFields?.cellphone} value={signUpFields?.cellphone}
maxLength={11}
maxLength="11"
direction="ltr" direction="ltr"
/> />
<span className="text-red-500 text-xs">{error}</span> <span className="text-red-500 text-xs">{error}</span>
@ -354,22 +356,15 @@ const LoginSignUpMobile = ({
className="Login-box-form-btn w-full h-12 rounded-lg bg-red52 text-white flex items-center justify-center mt-4" className="Login-box-form-btn w-full h-12 rounded-lg bg-red52 text-white flex items-center justify-center mt-4"
onClick={(e) => { onClick={(e) => {
// setSteps(2); // setSteps(2);
checkPhoneNumber(e) checkPhoneNumber(e);
}} }}
> >
ارسال کد تاییدیه ارسال کد تاییدیه
</Link> </Link>
</> </>
} )}
{ {steps == 2 && (
steps == 2 &&
<> <>
<div className="w-full flex flex-col mt-5"> <div className="w-full flex flex-col mt-5">
<div className="w-full flex flex-row-reverse justify-center"> <div className="w-full flex flex-row-reverse justify-center">
<input <input
@ -422,7 +417,10 @@ const LoginSignUpMobile = ({
onChange={(e) => onChange={(e) =>
onChange( onChange(
e.target.name, e.target.name,
(e.target.value = onInput.englishAndNumberWithoutSpace(e.target.value)) (e.target.value =
onInput.englishAndNumberWithoutSpace(
e.target.value
))
) )
} }
maxlength="1" maxlength="1"
@ -431,13 +429,11 @@ const LoginSignUpMobile = ({
</div> </div>
<Link <Link
to={register == true ? '/register' : `/`} to={register == true ? "/register" : `/`}
className="Login-box-form-btn w-full h-12 rounded-lg bg-red52 text-white flex items-center justify-center mt-4" className="Login-box-form-btn w-full h-12 rounded-lg bg-red52 text-white flex items-center justify-center mt-4"
onClick={(e) => { onClick={(e) => {
checkOtp(e);
checkOtp(e)
// activeLogin() // activeLogin()
}} }}
> >
تایید تایید
@ -455,8 +451,7 @@ const LoginSignUpMobile = ({
</div> </div>
</div> </div>
</> </>
} )}
{/* <div className="w-full flex flex-col items-center justify-center"> {/* <div className="w-full flex flex-col items-center justify-center">
<p className="w-3/5 text-xs my-20 text-center text-red26"> <p className="w-3/5 text-xs my-20 text-center text-red26">
@ -466,18 +461,11 @@ const LoginSignUpMobile = ({
</p> </p>
<p className="text-gray-300 text-xs">1401 - 1400</p> <p className="text-gray-300 text-xs">1401 - 1400</p>
</div> */} </div> */}
</div> </div>
</div> </div>
</div> </div>
{signUp && <SignUpBox setSignUp={setSignUp} />}
</div> </div>
); );
}; };

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

@ -35,6 +35,7 @@ const PaymentBox = ({
cardNumber: null, cardNumber: null,
paidAt: null, paidAt: null,
TracingNumber: null, TracingNumber: null,
dueDateArray:null
}, },
]); ]);
useEffect(() => { useEffect(() => {
@ -55,6 +56,7 @@ const PaymentBox = ({
cardNumber: null, cardNumber: null,
paidAt: null, paidAt: null,
TracingNumber: null, TracingNumber: null,
dueDateArray:null
}); });
} }
} else { } else {
@ -87,6 +89,7 @@ const PaymentBox = ({
cardNumber: null, cardNumber: null,
paidAt: null, paidAt: null,
TracingNumber: null, TracingNumber: null,
dueDateArray:null
}); });
setPaymentList(newList); setPaymentList(newList);
setFake(fake + 1); setFake(fake + 1);
@ -121,7 +124,6 @@ const PaymentBox = ({
useEffect(()=>{ useEffect(()=>{
if(transactionSituation) if(transactionSituation)
{ {
alert("hooooooooo");
let newList = paymentList; let newList = paymentList;
newList[newList.length-1].status=0; newList[newList.length-1].status=0;
setPaymentList(newList); setPaymentList(newList);
@ -184,11 +186,19 @@ const PaymentBox = ({
) )
.format("YYYY-M-D HH:mm"); .format("YYYY-M-D HH:mm");
console.log(dueDate); console.log(dueDate);
let dueDateArray = [
Number(dateInfo[0].value),
Number(dateInfo[1].value),
Number(dateInfo[2].value),
Number(dateInfo[3].value),
Number(dateInfo[4].value),
];
//----------------------------------------- //-----------------------------------------
let newList = paymentList; let newList = paymentList;
newList[index].cardNumber = cardNumber; newList[index].cardNumber = cardNumber;
newList[index].paidAt = dueDate; newList[index].paidAt = dueDate;
newList[index].TracingNumber = TracingNumber; newList[index].TracingNumber = TracingNumber;
newList[index].dueDateArray=dueDateArray;
setPaymentList(newList); setPaymentList(newList);
setFake(fake + 1); setFake(fake + 1);
addUserTransaction({ addUserTransaction({
@ -264,6 +274,10 @@ const PaymentBox = ({
id="paymentBox-cardNumber-input" id="paymentBox-cardNumber-input"
className="w-[80%] h-10 px-1 outline-0 text-center" className="w-[80%] h-10 px-1 outline-0 text-center"
maxLength={16} maxLength={16}
style={
item.status !== null ? { pointerEvents: "none" } : null
}
value={item.cardNumber}
/> />
</div> </div>
)} )}
@ -279,6 +293,16 @@ const PaymentBox = ({
type="text" type="text"
className="paymentBox-payment-date-input w-[29%] h-full rounded border text-center text-sm" className="paymentBox-payment-date-input w-[29%] h-full rounded border text-center text-sm"
maxLength={2} maxLength={2}
style={
item.status !== null
? { pointerEvents: "none" }
: null
}
value={
item.dueDateArray !== null
? item.dueDateArray[0]
: null
}
/> />
<div className="h-full w-[5%] flex items-center justify-center"> <div className="h-full w-[5%] flex items-center justify-center">
/ /
@ -287,6 +311,16 @@ const PaymentBox = ({
type="text" type="text"
className="paymentBox-payment-date-input w-[29%] h-full rounded border text-center text-sm" className="paymentBox-payment-date-input w-[29%] h-full rounded border text-center text-sm"
maxLength={2} maxLength={2}
style={
item.status !== null
? { pointerEvents: "none" }
: null
}
value={
item.dueDateArray !== null
? item.dueDateArray[1]
: null
}
/> />
<div className="h-full w-[5%] flex items-center justify-center"> <div className="h-full w-[5%] flex items-center justify-center">
/ /
@ -295,6 +329,16 @@ const PaymentBox = ({
type="text" type="text"
className="paymentBox-payment-date-input w-[29%] h-full rounded border text-center text-sm" className="paymentBox-payment-date-input w-[29%] h-full rounded border text-center text-sm"
maxLength={4} maxLength={4}
style={
item.status !== null
? { pointerEvents: "none" }
: null
}
value={
item.dueDateArray !== null
? item.dueDateArray[2]
: null
}
/> />
</div> </div>
</div> </div>
@ -308,6 +352,16 @@ const PaymentBox = ({
type="text" type="text"
className="paymentBox-payment-date-input w-[45%] h-full rounded border text-center text-sm" className="paymentBox-payment-date-input w-[45%] h-full rounded border text-center text-sm"
maxLength={2} maxLength={2}
style={
item.status !== null
? { pointerEvents: "none" }
: null
}
value={
item.dueDateArray !== null
? item.dueDateArray[3]
: null
}
/> />
<div className="h-full w-[5%] flex items-center justify-center"> <div className="h-full w-[5%] flex items-center justify-center">
: :
@ -316,6 +370,16 @@ const PaymentBox = ({
type="text" type="text"
className="paymentBox-payment-date-input w-[45%] h-full rounded border text-center text-sm" className="paymentBox-payment-date-input w-[45%] h-full rounded border text-center text-sm"
maxLength={2} maxLength={2}
style={
item.status !== null
? { pointerEvents: "none" }
: null
}
value={
item.dueDateArray !== null
? item.dueDateArray[4]
: null
}
/> />
</div> </div>
</div> </div>
@ -333,6 +397,10 @@ const PaymentBox = ({
id="paymentBox-TracingNumber-input" id="paymentBox-TracingNumber-input"
className="w-[80%] h-10 px-1 outline-0 text-center" className="w-[80%] h-10 px-1 outline-0 text-center"
maxLength={30} maxLength={30}
style={
item.status !== null ? { pointerEvents: "none" } : null
}
value={item.TracingNumber}
/> />
</div> </div>
)} )}

@ -1,5 +1,5 @@
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
import { book, publicApi, userProduct } from "../../redux/actions"; import { book, publicApi, userProduct, user } from "../../redux/actions";
import PaymentBox from "./PaymentBox"; import PaymentBox from "./PaymentBox";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { Link, useLocation } from "react-router-dom"; import { Link, useLocation } from "react-router-dom";
@ -36,7 +36,13 @@ const Services = ({
videos, videos,
pushToCart, pushToCart,
pushSchoolToCart, pushSchoolToCart,
getUserInfo,
userInfo
}) => { }) => {
useEffect(()=>{
getUserInfo();
},[])
//-------------------------------------------------------------
const [filterCheck, setFilterCheck] = useState([ const [filterCheck, setFilterCheck] = useState([
{ {
id: 1, id: 1,
@ -153,7 +159,7 @@ const Services = ({
console.log(gameId); console.log(gameId);
//productClickHandler------------------ //productClickHandler------------------
const productClickhandler=(product)=>{ const productClickhandler = (product) => {
setPopUpContent({ setPopUpContent({
id: gameId, id: gameId,
title: product?.name, title: product?.name,
@ -171,7 +177,7 @@ const Services = ({
setPopUp(true); setPopUp(true);
} }
console.log(gameId); console.log(gameId);
} };
//AddToCartHandler-------------------- //AddToCartHandler--------------------
const AddToCartHandler = (product) => { const AddToCartHandler = (product) => {
@ -317,6 +323,7 @@ const Services = ({
productHolderHoverBorder="shadow-md" productHolderHoverBorder="shadow-md"
teacher={product.vodTeacher} teacher={product.vodTeacher}
catId={gameId} catId={gameId}
userInfo={userInfo}
onClick={() => { onClick={() => {
productClickhandler(product); productClickhandler(product);
}} }}
@ -399,62 +406,7 @@ const Services = ({
{gameId !== 6 && ( {gameId !== 6 && (
<div className="flex items-center mx-4 my-4"> <div className="flex items-center mx-4 my-4">
<svg <img src={filterIcon} alt="filterIcon" className="w-9" />
xmlns="http://www.w3.org/2000/svg"
width="40"
height="40"
viewBox="0 0 14.378 14.378"
>
<g
id="vuesax_linear_filter-tick"
data-name="vuesax/linear/filter-tick"
transform="translate(-620 -700)"
>
<g id="filter-tick" transform="translate(620 700)">
<path
id="Vector"
d="M5.691,2.846a2.8,2.8,0,0,1-.407,1.468A2.836,2.836,0,0,1,2.846,5.691,2.768,2.768,0,0,1,1.312,5.23a2.685,2.685,0,0,1-.9-.917A2.807,2.807,0,0,1,0,2.846,2.848,2.848,0,0,1,2.846,0a2.648,2.648,0,0,1,.623.072A2.84,2.84,0,0,1,5.691,2.846Z"
transform="translate(7.267 5.991)"
fill="none"
stroke="#696969"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="0.6"
/>
<path
id="Vector-2"
data-name="Vector"
d="M0,.7l.7.7L2.217,0"
transform="translate(9.004 8.136)"
fill="none"
stroke="#696969"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="0.6"
/>
<path
id="Vector-3"
data-name="Vector"
d="M0,0H14.378V14.378H0Z"
transform="translate(14.378 14.378) rotate(180)"
fill="none"
opacity="0"
/>
<g id="Group" transform="translate(1.983 1.198)">
<path
id="Vector-4"
data-name="Vector"
d="M10.412,1.21V2.54a2.292,2.292,0,0,1-.605,1.4l-1.054.929a2.648,2.648,0,0,0-.623-.072A2.848,2.848,0,0,0,5.284,7.638,2.807,2.807,0,0,0,5.7,9.106a2.685,2.685,0,0,0,.9.917v.2a1.336,1.336,0,0,1-.545,1.03l-.845.545a1.233,1.233,0,0,1-1.875-1.03V7.567A2.342,2.342,0,0,0,2.846,6.3l-2.3-2.42A2.041,2.041,0,0,1,0,2.666V1.27A1.229,1.229,0,0,1,1.21,0H9.2A1.215,1.215,0,0,1,10.412,1.21Z"
fill="none"
stroke="#696969"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="0.6"
/>
</g>
</g>
</g>
</svg>
{filterCheck.map((filter) => ( {filterCheck.map((filter) => (
<div <div
key={`FILTER_${filter.id}`} key={`FILTER_${filter.id}`}
@ -523,6 +475,7 @@ const Services = ({
productHolderHoverBorder="shadow-md" productHolderHoverBorder="shadow-md"
teacher={product.vodTeacher} teacher={product.vodTeacher}
catId={gameId} catId={gameId}
userInfo={userInfo}
onClick={() => { onClick={() => {
setPopUpContent({ setPopUpContent({
id: gameId, id: gameId,
@ -637,6 +590,7 @@ const mapStateToProps = (state) => ({
grades: state.publicApi.grades, grades: state.publicApi.grades,
gradeFilterBooks: state.book.gradeFilterBooks, gradeFilterBooks: state.book.gradeFilterBooks,
selectedGrade: state.book.selectedGrade, selectedGrade: state.book.selectedGrade,
userInfo: state.user.status,
}); });
const mapDispatchToProps = { const mapDispatchToProps = {
@ -645,6 +599,7 @@ const mapDispatchToProps = {
setHeaderOptions: publicApi.setHeaderOptions, setHeaderOptions: publicApi.setHeaderOptions,
pushToCart: userProduct.add, pushToCart: userProduct.add,
pushSchoolToCart: userProduct.addSchool, pushSchoolToCart: userProduct.addSchool,
getUserInfo: user.getProfile
}; };
export default connect(mapStateToProps, mapDispatchToProps)(Services); export default connect(mapStateToProps, mapDispatchToProps)(Services);

Loading…
Cancel
Save