|
|
|
@ -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 ( |
|
|
|
|
<div |
|
|
|
|
className={`flex flex-col cursor-pointer text-right rounded-xl justify-start w-full m-4 border border-red82OP ${ |
|
|
|
|
className={`flex flex-col text-right rounded-xl justify-start w-full m-4 border border-red82OP ${ |
|
|
|
|
isMobile && "w-11/12" |
|
|
|
|
}`}
|
|
|
|
|
style={{ width: !isMobile && "375px", direction: "rtl" }} |
|
|
|
|
> |
|
|
|
|
<img |
|
|
|
|
src="https://narafella.ir/wp-content/uploads/2021/08/books-min.jpg" |
|
|
|
|
src={ |
|
|
|
|
product?.fileId |
|
|
|
|
? `https://new.andishmand.ir/api/v1/file/${product?.fileId}` |
|
|
|
|
: imgPlaceHolder |
|
|
|
|
} |
|
|
|
|
className="rounded-t-xl" |
|
|
|
|
onClick={onClick} |
|
|
|
|
// onClick={onClick}
|
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
<div |
|
|
|
|
className={`border-b border-red82OP py-2 px-4 ${ |
|
|
|
|
isMobile ? "bg-blueFF text-right" : "text-center " |
|
|
|
|
}`}
|
|
|
|
|
onClick={onClick} |
|
|
|
|
// onClick={onClick}
|
|
|
|
|
> |
|
|
|
|
<h1 |
|
|
|
|
className={`text-${ |
|
|
|
@ -457,13 +460,10 @@ const ProductDesign = ({ |
|
|
|
|
> |
|
|
|
|
کتاب {productName} |
|
|
|
|
</h1> |
|
|
|
|
<p className="text-blue7E text-sm mb-2"> |
|
|
|
|
در این قسمت یک توضیحات کوتاه در مورد دوره خواهد آمد که بصورت دو خط |
|
|
|
|
در این قسمت قرار میگیرد |
|
|
|
|
</p> |
|
|
|
|
<p className="text-blue7E text-sm mb-2">{product?.description}</p> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div className="flex justify-between px-4 items-center"> |
|
|
|
|
<div className="flex justify-between px-4 items-center py-2"> |
|
|
|
|
<h1 |
|
|
|
|
className={`font-black text-xl py-4 text-red52 ${ |
|
|
|
|
isMobile && "w-1/2 border-l border-red82OP text-center" |
|
|
|
@ -471,16 +471,36 @@ const ProductDesign = ({ |
|
|
|
|
> |
|
|
|
|
{productPrice} تومان |
|
|
|
|
</h1> |
|
|
|
|
|
|
|
|
|
<div |
|
|
|
|
className={`bg-${ |
|
|
|
|
isMobile |
|
|
|
|
? "blueFF border-blueDF rounded-lg py-3 hover:bg-blueDF" |
|
|
|
|
: "pinkF5 border-red52 py-2 hover:bg-red52" |
|
|
|
|
} rounded-md text-red26 w-32 border-2 px-1 text-xs flex justify-center hover:text-white |
|
|
|
|
<div> |
|
|
|
|
{rulesAccepted && ( |
|
|
|
|
<div |
|
|
|
|
className={`bg-${ |
|
|
|
|
isMobile |
|
|
|
|
? "blueFF border-blueDF rounded-lg py-3 hover:bg-blueDF" |
|
|
|
|
: "pinkF5 border-red52 py-2 hover:bg-red52" |
|
|
|
|
} rounded-md text-red26 w-36 border-2 px-1 text-xs flex justify-center hover:text-white |
|
|
|
|
`}
|
|
|
|
|
> |
|
|
|
|
<button onClick={btnOnClick}>افزودن به سبد خرید</button> |
|
|
|
|
> |
|
|
|
|
<button onClick={btnOnClick}>افزودن به سبد خرید</button> |
|
|
|
|
</div> |
|
|
|
|
)} |
|
|
|
|
{!rulesAccepted && ( |
|
|
|
|
<Link |
|
|
|
|
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); |
|
|
|
|
}} |
|
|
|
|
> |
|
|
|
|
تکمیل اطلاعات کاربری و رزرو پیش ثبت نام |
|
|
|
|
</Link> |
|
|
|
|
)} |
|
|
|
|
<div |
|
|
|
|
className="w-36 py-2 px-1 rounded-md text-white bg-[#DF1452] text-white flex items-center justify-center cursor-pointer text-xs text-center border-2 border-pinkF5 mt-2" |
|
|
|
|
onClick={onClick} |
|
|
|
|
> |
|
|
|
|
اطلاعات بیشتر |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|