@ -116,6 +116,7 @@ const Services = ({
< ServicePopUp
< ServicePopUp
content = { popUpContent }
content = { popUpContent }
closeOnClick = { ( ) => setPopUp ( false ) }
closeOnClick = { ( ) => setPopUp ( false ) }
sendPrice = { val => setPopUpContent ( { ... popUpContent , price : popUpContent . price + val } ) }
/ >
/ >
) : null }
) : null }
< div
< div
@ -315,47 +316,7 @@ const Services = ({
// to={"/class/" + product?.id}
// to={"/class/" + product?.id}
key = { ` PRODUCT__ ${ gameId } __ ${ index } ` }
key = { ` PRODUCT__ ${ gameId } __ ${ index } ` }
onClick = { ( ) => {
setPopUpContent ( {
id : gameId ,
title : product ? . name ,
video : "" ,
teacher : product ? . vodTeacher ,
description :
"در این قسمت یک توضیحات کوتاه در مورد دوره خواهد آمد که بصورت دو خط در این قسمت قرار می گیرد در این قسمت یک توضیحات کوتاه در مورد دوره خواهد آمد که بصورت دو خط در این قسمت" ,
price : product ? . price ,
classHour : 21 ,
classMinute : 56 ,
image : 'https://narafella.ir/wp-content/uploads/2021/08/books-min.jpg' ,
examCont : [
{
title : 'بخش اول آزمون ' + product . name ,
date : '۱۴۰۰/۱۲/۱۳' ,
time : '۱۴:۴۶' ,
numberOfQ : '۱۸' ,
price : 10000
} ,
{
title : 'بخش دوم آزمون ' + product . name ,
date : '۱۴۰۰/۱۲/۱۴' ,
time : '۱۴:۴۶' ,
numberOfQ : '۱۸' ,
price : 10000
} ,
{
title : 'بخش سوم آزمون ' + product . name ,
date : '۱۴۰۰/۱۲/۱۵' ,
time : '۱۴:۴۶' ,
numberOfQ : '۳۲' ,
price : 250000
} ,
]
} ) ;
if ( gameId !== 2 ) {
setPopUp ( true )
}
console . log ( gameId )
} }
>
>
{ /* {console.log(product)} */ }
{ /* {console.log(product)} */ }
@ -373,14 +334,54 @@ const Services = ({
productHolderHoverBorder = "shadow-md"
productHolderHoverBorder = "shadow-md"
teacher = { product . vodTeacher }
teacher = { product . vodTeacher }
catId = { gameId }
catId = { gameId }
onClick = { ( ) => null }
onClick = { ( ) => {
setPopUpContent ( {
id : gameId ,
title : product ? . name ,
video : "" ,
teacher : product ? . vodTeacher ,
description :
"در این قسمت یک توضیحات کوتاه در مورد دوره خواهد آمد که بصورت دو خط در این قسمت قرار می گیرد در این قسمت یک توضیحات کوتاه در مورد دوره خواهد آمد که بصورت دو خط در این قسمت" ,
price : gameId == 3 ? 0 : product ? . product [ 0 ] ? . price ,
classHour : 21 ,
classMinute : 56 ,
image : 'https://narafella.ir/wp-content/uploads/2021/08/books-min.jpg' ,
examCont : [
{
title : 'بخش اول آزمون ' + product . name ,
date : '۱۴۰۰/۱۲/۱۳' ,
time : '۱۴:۴۶' ,
numberOfQ : '۱۸' ,
price : 10000
} ,
{
title : 'بخش دوم آزمون ' + product . name ,
date : '۱۴۰۰/۱۲/۱۴' ,
time : '۱۴:۴۶' ,
numberOfQ : '۱۸' ,
price : 10000
} ,
{
title : 'بخش سوم آزمون ' + product . name ,
date : '۱۴۰۰/۱۲/۱۵' ,
time : '۱۴:۴۶' ,
numberOfQ : '۳۲' ,
price : 250000
} ,
]
} ) ;
if ( gameId !== 2 ) {
setPopUp ( true )
}
console . log ( gameId )
} }
btnOnClick = { ( ) => {
btnOnClick = { ( ) => {
pushToCart ( {
pushToCart ( {
productId : product ? . id ,
productId : product ? . id ,
count : 1 ,
count : 1 ,
} ) ;
} ) ;
setTimeout ( ( ) => setPopUp ( false ) , 1 )
setTimeout ( ( ) => setPopUp ( false ) , 0 )
console . log ( popup )
console . log ( popup )
console . log ( product . id )
console . log ( product . id )
}
}
@ -400,15 +401,16 @@ const Services = ({
< input
< input
placeholder = "12,000,000"
placeholder = "12,000,000"
className = "border border-red52 rounded-lg h-12 w-36 text-center rounded-l-none border-l-0 px-4 outline-none"
className = "border border-red52 rounded-lg h-12 w-36 text-center rounded-l-none border-l-0 px-4 outline-none"
value = { ( separate ( sharzhVal ) ) }
onChange = { e => setSharzhVal ( e . target . value ) }
/ > < p c l a s s N a m e = " b o r d e r f l e x j u s t i f y - c e n t e r i t e m s - c e n t e r b o r d e r - r e d 5 2 r o u n d e d - l g h - 1 2 w - 1 2 t e x t - c e n t e r r o u n d e d - r - n o n e b o r d e r - r - 0 p x - 4 " > ر ی ا ل < / p >
/ > < p c l a s s N a m e = " b o r d e r f l e x j u s t i f y - c e n t e r i t e m s - c e n t e r b o r d e r - r e d 5 2 r o u n d e d - l g h - 1 2 w - 1 2 t e x t - c e n t e r r o u n d e d - r - n o n e b o r d e r - r - 0 p x - 4 " > ر ی ا ل < / p >
< / d i v >
< / d i v >
< div className = "flex" >
< div className = "flex" >
< p className = "border flex justify-center items-center border-red52 rounded-lg h-12 w-12 text-center rounded-l-none border-l-0 px-10 " > بابت < / p >
< p className = "border flex justify-center items-center border-red52 rounded-lg h-12 w-12 text-center rounded-l-none border-l-0 px-6 pl-2 " > بابت < / p >
< input
< input
placeholder = "شارژ حساب"
placeholder = "شارژ حساب"
className = "border border-red52 rounded-lg h-12 w-60 text-center rounded-r-none border-r-0 px-4 outline-none"
className = "border border-red52 rounded-lg h-12 w-60 text-right rounded-r-none border-r-0 px-4 outline-none"
value = { ( separate ( sharzhVal ) ) }
onChange = { e => setSharzhVal ( e . target . value ) }
/ >
/ >
< / d i v >
< / d i v >
< button className = "cursor-pointer text-red26 border border-red52 rounded-lg bg-red82OP font-bold text-sm px-6 h-12" > افزودن به اعتبار < / b u t t o n >
< button className = "cursor-pointer text-red26 border border-red52 rounded-lg bg-red82OP font-bold text-sm px-6 h-12" > افزودن به اعتبار < / b u t t o n >
@ -656,6 +658,9 @@ const Services = ({
< input
< input
placeholder = "12,000,000"
placeholder = "12,000,000"
className = "border border-red5B rounded-lg h-14 w-3/4 text-center rounded-l-none border-l-0 px-4 outline-none"
className = "border border-red5B rounded-lg h-14 w-3/4 text-center rounded-l-none border-l-0 px-4 outline-none"
value = { ( separate ( sharzhVal ) ) }
onChange = { e => setSharzhVal ( e . target . value ) }
/ > < p c l a s s N a m e = " b o r d e r f l e x j u s t i f y - c e n t e r i t e m s - c e n t e r b o r d e r - r e d 5 B r o u n d e d - l g h - 1 4 w - 1 / 4 t e x t - c e n t e r r o u n d e d - r - n o n e b o r d e r - r - 0 p x - 4 " > ر ی ا ل < / p >
/ > < p c l a s s N a m e = " b o r d e r f l e x j u s t i f y - c e n t e r i t e m s - c e n t e r b o r d e r - r e d 5 B r o u n d e d - l g h - 1 4 w - 1 / 4 t e x t - c e n t e r r o u n d e d - r - n o n e b o r d e r - r - 0 p x - 4 " > ر ی ا ل < / p >
< / d i v >
< / d i v >
< div className = "flex w-full mb-4" >
< div className = "flex w-full mb-4" >
@ -663,8 +668,7 @@ const Services = ({
< input
< input
placeholder = "شارژ حساب"
placeholder = "شارژ حساب"
className = "border border-red52 rounded-lg h-14 w-4/5 text-center rounded-r-none border-r-0 px-4 outline-none"
className = "border border-red52 rounded-lg h-14 w-4/5 text-center rounded-r-none border-r-0 px-4 outline-none"
value = { ( separate ( sharzhVal ) ) }
onChange = { e => setSharzhVal ( e . target . value ) }
/ >
/ >
< / d i v >
< / d i v >
< button className = "cursor-pointer text-blue52 border border-blueDF w-full rounded-lg font-bold text-sm px-6 h-14"
< button className = "cursor-pointer text-blue52 border border-blueDF w-full rounded-lg font-bold text-sm px-6 h-14"