diff --git a/src/components/Product/index.js b/src/components/Product/index.js index 94ce25f..267d4f5 100644 --- a/src/components/Product/index.js +++ b/src/components/Product/index.js @@ -6,8 +6,7 @@ import { connect } from "react-redux"; import { Link } from "react-router-dom"; import imgPlaceHolder from "../../assets/img/photo-placeholder.png"; - -let groupType = ["A","B","AB","AB1"]; +let groupType = ["A", "B", "AB", "AB1"]; const ProductDesign = ({ colors, likeBtn, @@ -85,9 +84,9 @@ const ProductDesign = ({ ]; //completeProfule----------- - const completeProfule=(id)=>{ - localStorage.setItem("termId",id) - } + const completeProfule = (id) => { + localStorage.setItem("termId", id); + }; //--------------------------- let weekday = [ @@ -165,7 +164,7 @@ const ProductDesign = ({ to="/register" className="w-36 py-2 px-1 rounded-md text-white bg-[#F2F9FF] text-[#4C7FE3] flex items-center justify-center cursor-pointer text-xs text-center border-2 border-[#4C7FE3]" onClick={() => { - completeProfule(product?.termId); + completeProfule(product?.termId); }} > تکمیل اطلاعات کاربری و افزودن به سبد خرید @@ -433,22 +432,26 @@ const ProductDesign = ({ if (catId == 1) { return (

کتاب {productName}

-

- در این قسمت یک توضیحات کوتاه در مورد دوره خواهد آمد که بصورت دو خط - در این قسمت قرار می‌گیرد -

+

{product?.description}

-
+

{productPrice} تومان

- -
+ {rulesAccepted && ( +
- + > + +
+ )} + {!rulesAccepted && ( + { + completeProfule(product?.termId); + }} + > + تکمیل اطلاعات کاربری و رزرو پیش ثبت نام + + )} +
+ اطلاعات بیشتر +
diff --git a/src/components/input/index.js b/src/components/input/index.js index c5ab31a..ddb4650 100644 --- a/src/components/input/index.js +++ b/src/components/input/index.js @@ -1,7 +1,6 @@ import React, { useEffect } from "react"; import _onInput from "../../utils/onInput"; - const Input = ({ title, borderType, @@ -17,6 +16,7 @@ const Input = ({ max, onFocus, defaultValue, + example, }) => { useEffect(() => { if (value !== null && value !== "" && value !== undefined) { @@ -75,7 +75,7 @@ const Input = ({ gapSize ? gapSize : "20" } h-px absolute top-[-1px] right-7 `} >
-
+
{title ? title : "نام کاربری"}
+ {example && ( +
+ {example} +
+ )}
); }; -export default Input; \ No newline at end of file +export default Input; diff --git a/src/components/input/signUpInput.js b/src/components/input/signUpInput.js index 024aa80..2bec314 100644 --- a/src/components/input/signUpInput.js +++ b/src/components/input/signUpInput.js @@ -71,7 +71,7 @@ const blurHandler = (id) => { let inputs = document.querySelectorAll(".Login-box-form-item-input"); let label = document.querySelectorAll(".Login-box-form-item-label"); let line = document.querySelectorAll(".Login-box-form-item-line"); - if (inputs[id].value === "") { + if (inputs[id]?.value === "") { inputsBox[id].style.borderColor = "#EBEBEB"; label[id].style.transform = "translate(0px,0px)"; label[id].style.color = "#959595"; diff --git a/src/view/Exam2/Exam.js b/src/view/Exam2/Exam.js index b7091e5..24437d6 100644 --- a/src/view/Exam2/Exam.js +++ b/src/view/Exam2/Exam.js @@ -1,6 +1,6 @@ import Header from "./Header"; import Questions from "./Questions"; - +import "./index.css"; diff --git a/src/view/Exam2/Header.js b/src/view/Exam2/Header.js index 9d49931..792cdf9 100644 --- a/src/view/Exam2/Header.js +++ b/src/view/Exam2/Header.js @@ -1,6 +1,7 @@ import { useState } from "react"; import { RiTimerLine } from "react-icons/ri"; +import './index.css'; const Header=()=>{ return ( diff --git a/src/view/Exam2/Questions.js b/src/view/Exam2/Questions.js index c3d0d18..8b8351e 100644 --- a/src/view/Exam2/Questions.js +++ b/src/view/Exam2/Questions.js @@ -1,5 +1,6 @@ import { useEffect, useState } from "react"; import { RiErrorWarningLine } from "react-icons/ri"; +import './index.css'; import img1 from "../../assets/img/4bea9a991c6b23d3dcaf231513ee94bd.jpg"; let data = [ @@ -61,8 +62,12 @@ let data = [ // text: "این سوال برای تست قرار داده می‌شود و ادامه پیدا می‌کند تا طول متن بلندتر شود و در پایان علامت سوال قرار میگیرد؟", // img: "", // choices: [ - // "لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ ", + // "تیرتسیذر", // "22", + // "بتربدر", + // "تیدرتسر", + // "تشدتنسدر", + // "ستیذزتن" // ], // guidance:"", // choiceWidth: null, @@ -71,7 +76,7 @@ let data = [ ]; //badgeList------------- -let badgeList = ["الف", "ب", "ج", "د"]; +let badgeList = ["الف", "ب", "ج", "د","هـ","ز"]; const Questions = () => { const [Data, setData] = useState(data); @@ -126,6 +131,12 @@ const Questions = () => { } else if (wMax < 0.48 * examSize && choiceNumber === 4) { newData[i].choiceWidth = 48; console.log("oooo"); + } else if (wMax < 0.18 * examSize && choiceNumber === 5) { + newData[i].choiceWidth = 18; + console.log("oo"); + } else if (wMax < 0.15 * examSize && choiceNumber === 6) { + newData[i].choiceWidth = 15; + console.log("oo"); } else { newData[i].choiceWidth = "full"; console.log("ooooo"); @@ -156,13 +167,13 @@ const Questions = () => { return (
{Data.map((item, index) => ( -
+
{/* -----question-text----------------------- */} -
-
+
+
{index + 1}
-
+
{item.text && (
{
))}
+ {/* -----guidance----------------------------- */} {item.guidance && ( -
+
{ )}
))} -
+ {/* -----Footer----------------------------- */} +
{ const [submitLoading, setSubmitLoading] = useState(false); //----------------------------------------------- - const [steps, setSteps] = useState(0); + const [steps, setSteps] = useState(1); console.log("user:&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"); console.log(user); const timeoutRef = useRef(null); @@ -875,6 +875,7 @@ const Register = ({ }, }) } + example="مثال :091299445566" />
@@ -1035,6 +1037,7 @@ const Register = ({ }, }) } + example="مثال :091299445566" />
@@ -1134,6 +1138,7 @@ const Register = ({ phone: _onInput.numberOnly(e.target.value), }) } + example="مثال :02133446666" /> {(selectedProductTypes.includes(4) || - selectedProductTypes.includes(7)) && ( + selectedProductTypes.includes(7) || + selectedProductTypes.includes(1)) && ( @@ -481,7 +484,8 @@ const Services = ({ .map((product, index) => (
{(selectedProductTypes.includes(4) || - selectedProductTypes.includes(7)) && ( + selectedProductTypes.includes(7) || + selectedProductTypes.includes(1)) && ( diff --git a/src/view/services/service/index.js b/src/view/services/service/index.js index bfee91e..4c0329d 100644 --- a/src/view/services/service/index.js +++ b/src/view/services/service/index.js @@ -82,35 +82,58 @@ const servicePopUp = ({ {content.title} -

{content.description}

+

{content?.description}

-
- نام کلاس +
+ {content?.product?.productType === 4 || + content?.product?.productType === 5 + ? "نام کلاس" + : "تعدادصفحات "}
-
- {content.title} +
+ {content?.product?.productType === 4 || + content?.product?.productType === 5 + ? content?.title + : content?.product?.pagesNum}
- {" "} - استاد{" "} + {content?.product?.productType === 4 || + content?.product?.productType === 5 + ? "استاد" + : "سال انتشار"}
- {content.teacher} + {content?.product?.productType === 4 || + content?.product?.productType === 5 + ? content?.teacher + : content?.product?.publishYear}
- زمان کلاس -
-
- {content.classHour} دقیقه + {content?.product?.productType === 4 || + content?.product?.productType === 5 + ? "زمان کلاس" + : "نوع جلد"}
+ {(content?.product?.productType === 4 || + content?.product?.productType === 5) && ( +
+ {content.classHour} دقیقه +
+ )} + {(content?.product?.productType ===1) && ( +
+ {/* {content?.product.?} */} + رحلی کوچک +
+ )}
@@ -172,19 +195,18 @@ const servicePopUp = ({
)} - {(content.id === 3 - && ( - - ))} + {content.id === 3 && ( + + )} {content.id === 1 && ( Content