|
|
@ -46,27 +46,32 @@ function ShoppingCart({ |
|
|
|
|
|
|
|
|
|
|
|
<div className="w-full flex flex-col justify-between items-center bg-gray-200 rtl left-0 pt-[3.5%]" style={{height: '100vh'}}> |
|
|
|
<div className="w-full flex flex-col justify-between items-center bg-gray-200 rtl left-0 pt-[3.5%]" style={{height: '100vh'}}> |
|
|
|
<div className={`w-full flex items-center flex-col ${list?.length > 3 && 'overflow-x-hidden overflow-scroll'}`} style={{height: '35%'}}> |
|
|
|
<div className={`w-full flex items-center flex-col ${list?.length > 3 && 'overflow-x-hidden overflow-scroll'}`} style={{height: '35%'}}> |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
schoolList.map((school, index) => ( |
|
|
|
schoolList.map((school, index) => ( |
|
|
|
<div className="flex bg-white justify-between items-center border-2 border-gray-300 p-4 rounded-xl m-2 " style={{ width: '90%' }}> |
|
|
|
<div className="flex bg-white justify-between items-center border-2 border-gray-300 p-4 rounded-xl m-2 mt-0 " key={`SCHOOL_${index}`} style={{ width: '90%' }}> |
|
|
|
<div className="flex items-center "> |
|
|
|
<div className="flex flex-col items-center w-full"> |
|
|
|
<div className="text-sm h-10 flex items-center p-2 border-l-2 border-gray-300 text-gray-400"> {school?.product?.book?.category} </div> |
|
|
|
<div className="flex items-center w-full"> |
|
|
|
<h1 className="text-lg font-black px-2 text-black40"> {school?.product?.name}</h1> |
|
|
|
<div className="text-xs h-10 flex items-center p-2 border-l-2 border-gray-300 text-gray-400"> رزرو پیش ثبت نام </div> |
|
|
|
|
|
|
|
<h1 className="text-md font-black px-2 text-black40"> {school?.product?.name}</h1> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<button className="w-full px-1 h-12 mt-1 text-white bg-red52 rounded-lg text-sm font-semibold" onClick={() => paySchool()}> |
|
|
|
|
|
|
|
پرداخت مستقیم به حساب مدرسه با مبلغ {separate(school.price)} تومان |
|
|
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
<p className="w-full text-right text-xs mt-2"> |
|
|
|
|
|
|
|
<span className="text-red-600 font-bold"> توجه: </span> |
|
|
|
|
|
|
|
نحوه پرداخت برای رزرو پیش ثبتنام از طریق دکمه بالا خواهد بود |
|
|
|
|
|
|
|
و می بایست ازین طریق جداگانه پرداخت گردد |
|
|
|
|
|
|
|
</p> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div className="flex items-center p-0 "> |
|
|
|
<div className="flex items-center p-0 "> |
|
|
|
|
|
|
|
|
|
|
|
<div className="text-sm text-black40 flex items-center" style={{ transform: 'translateX(-20px)' }} > |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
school.count > 1 && <p className="ml-2 text-xs text-red52">{school?.count} عدد</p> |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
<p>{separate(school?.product?.price)} تومان</p> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div |
|
|
|
<div |
|
|
|
className="w-8 h-8 text-white text-sm rounded-full cursor-pointer flex justify-center items-center bg-red52" |
|
|
|
className="w-8 h-8 text-white text-sm rounded-full cursor-pointer flex justify-center items-center bg-red52" |
|
|
|
style={{ transform: 'translateX(-30px)' }} |
|
|
|
style={{ transform: 'translateX(-30px)' }} |
|
|
|
onClick={() => |
|
|
|
onClick={() => |
|
|
|
pushToCart( |
|
|
|
pushSchoolToCart( |
|
|
|
{ |
|
|
|
{ |
|
|
|
productId: school?.productId, |
|
|
|
productId: school?.productId, |
|
|
|
userId: school?.userId, |
|
|
|
userId: school?.userId, |
|
|
@ -103,6 +108,9 @@ function ShoppingCart({ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
)) |
|
|
|
)) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
schoolList.length > 0 && <div className="bg-gray-300 my-2 pb-1 rounded-full w-11/12"></div> |
|
|
|
|
|
|
|
} |
|
|
|
{list.map((product, index) => ( |
|
|
|
{list.map((product, index) => ( |
|
|
|
<Product key={index} product={product} /> |
|
|
|
<Product key={index} product={product} /> |
|
|
|
))} |
|
|
|
))} |
|
|
@ -129,6 +137,7 @@ function ShoppingCart({ |
|
|
|
title={`پرداخت هزینه : ${factorInfo?.payPrice ? separate(factorInfo?.payPrice) : 0} تومان`} |
|
|
|
title={`پرداخت هزینه : ${factorInfo?.payPrice ? separate(factorInfo?.payPrice) : 0} تومان`} |
|
|
|
borderType='rounded-xl' |
|
|
|
borderType='rounded-xl' |
|
|
|
className='h-16 w-full mx-none text-xl' |
|
|
|
className='h-16 w-full mx-none text-xl' |
|
|
|
|
|
|
|
onClick={() => payFactor()} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|