Compare commits

...

8 Commits

  1. 15
      src/App.css
  2. 2
      src/App.js
  3. 12
      src/components/Calendar/CalendarComponents/Calendar.js
  4. 23
      src/components/Calendar/CalendarComponents/components/DaysList.js
  5. 4
      src/components/Calendar/CalendarComponents/components/Header.js
  6. 37
      src/components/Calendar/index.css
  7. 20
      src/components/Calendar/index.js
  8. 14
      src/components/Product/index.js
  9. 9
      src/components/Stepper/index.css
  10. 7
      src/components/Stepper/index.js
  11. 20
      src/components/exam/Carousel/index.css
  12. 32
      src/components/exam/Carousel/index.js
  13. 21
      src/components/header/Header.js
  14. 7
      src/components/header/Header.scss
  15. 2
      src/components/input/index.js
  16. 6
      src/components/nav/Nav.js
  17. 151
      src/redux/reducers/book.js
  18. 16
      src/redux/reducers/user.js
  19. 4
      src/redux/reducers/userProduct.js
  20. 12
      src/utils/separate.js
  21. 2
      src/view/addExam/index.js
  22. 10
      src/view/addExam/views/AddDescription.js
  23. 6
      src/view/addExam/views/AddQuestionsFromBank.js
  24. 2
      src/view/addProduct/Sidebar/index.js
  25. 26
      src/view/contact/index.js
  26. 50
      src/view/dashboard/Dashboard.js
  27. 24
      src/view/dashboard/cal.css
  28. 86
      src/view/services/index.js

@ -33,3 +33,18 @@ input::-webkit-inner-spin-button {
::-webkit-scrollbar-thumb:hover { ::-webkit-scrollbar-thumb:hover {
background: #b30000; background: #b30000;
} }
select {
-webkit-appearance: none;
-moz-appearance: none;
background: transparent;
background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='30' viewBox='0 0 24 24' width='30' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z' fill='gray' /><path d='M0 0h24v24H0z' fill='none'/></svg>");
background-repeat: no-repeat;
background-position-x: 1%;
background-position-y: 50%;
border: 1px solid #dfdfdf;
border-radius: 2px;
/* margin-right: 2rem; */
padding: 1rem;
padding-right: 2rem;
cursor: pointer;
}

@ -669,7 +669,7 @@ function App() {
{LOGIN && <Header logOut={logOut} />} {LOGIN && <Header logOut={logOut} />}
{LOGIN && <Nav logOut={logOut} />} {LOGIN && <Nav logOut={logOut} />}
<Routes> <Routes>
<Route path="/" element={LOGIN ? <Route path="/myServices" element={LOGIN ?
<Dashboard <Dashboard
ActiveUserFullInfo={ActiveUserFullInfo} ActiveUserFullInfo={ActiveUserFullInfo}
UserFullInfoData={UserFullInfoData} UserFullInfoData={UserFullInfoData}

@ -253,10 +253,10 @@ let active_list;
<div className="dbp1-month">{month}</div>، <div className="dbp1-month">{month}</div>،
<div className="dbp1-year">{year}</div> <div className="dbp1-year">{year}</div>
</div> </div>
<div className="date-box-p1-time"> {/* <div className="date-box-p1-time">
<Clock /> <Clock />
</div> </div> */}
</div> </div>
<MonthSelector <MonthSelector
@ -309,14 +309,16 @@ let active_list;
type={type} type={type}
/> />
<div className="Calendar__footer"> <div className="Calendar__footer">
{/* <div className={`footer__Events ${type}`}> { eventInFooter !== null && eventInFooter !== undefined &&
<div className={`footer__Events ${type}`}>
{ {
type == 'dashboard' ? <><div className='text-xl font-black text-blue-400'>رویداد ها: </div><p className='text-blue-300 font-bold'>{eventInFooter ? eventInFooter : 'رویدادی در این روز وجود ندارد!'}</p></> : eventInFooter type == 'dashboard' ? <><div className='text-xl font-black text-red52'>رویداد ها: </div><p className='text-red26 font-bold'>{eventInFooter ? eventInFooter : 'رویدادی در این روز وجود ندارد!'}</p></> : eventInFooter
} }
</div> </div>
{renderFooter()} */} }
{renderFooter()}
</div> </div>
</div> </div>
); );

@ -259,14 +259,22 @@ const DaysList = ({
// showing Dots Of Events // showing Dots Of Events
const specialDate = (sDay, sMonth, sYear) => { const specialDate = (sDay, sMonth, sYear) => {
return events.map((e) => { let hasEvents = events.find(itm => sDay == itm.day && sMonth == itm.month && sYear == itm.year);
console.log(hasEvents);
if (hasEvents !== undefined && hasEvents !== null ){
return <span> {events.map((e) => {
if (sDay == e.day && sMonth == e.month && sYear == e.year) { if (sDay == e.day && sMonth == e.month && sYear == e.year) {
return <span key={'dot' + e.id} style={{ return(
color: e.color
}}>.</span>; <svg height="5" key={'dot' + e.id} width="5">
<circle cx="2.5" cy="2.5" r="2" stroke-width="3" fill="red" />
</svg>) ;
} }
}) })}</span>
}
}; };
@ -299,6 +307,7 @@ const DaysList = ({
// console.log(specialDate(day)); // console.log(specialDate(day));
// console.log(showEventDescription(day)) // console.log(showEventDescription(day))
showEvent(showEventDescription(day, month, year)) showEvent(showEventDescription(day, month, year))
// console.log(showEventDescription(day, month, year))
}} }}
onKeyDown={({ key }) => { onKeyDown={({ key }) => {
@ -316,9 +325,9 @@ const DaysList = ({
role="gridcell" role="gridcell"
data-is-default-selectable={shouldEnableKeyboardNavigation} data-is-default-selectable={shouldEnableKeyboardNavigation}
> >
<p className=''>{!isStandard ? '' : getLanguageDigits(day)}</p> <span className=''>{!isStandard ? '' : getLanguageDigits(day)}</span>
{/* Dots Of Events */} {/* Dots Of Events */}
<span>{specialDate(day, month, year)}</span> {specialDate(day, month, year)}
</div> </div>
); );
}; };

@ -44,8 +44,8 @@ const Header = ({
const monthText = headerElement.current.querySelector( const monthText = headerElement.current.querySelector(
'.Calendar__monthYear.-shown .Calendar__monthText', '.Calendar__monthYear.-shown .Calendar__monthText',
); );
const yearText = monthText.nextSibling; const yearText = monthText?.nextSibling;
const hasActiveBackground = element => element.classList.contains('-activeBackground'); const hasActiveBackground = element => element?.classList.contains('-activeBackground');
const isInitialRender = const isInitialRender =
!isOpen && !hasActiveBackground(monthText) && !hasActiveBackground(yearText); !isOpen && !hasActiveBackground(monthText) && !hasActiveBackground(yearText);
if (isInitialRender) return; if (isInitialRender) return;

@ -590,8 +590,9 @@
.Calendar__day.dashboard { .Calendar__day.dashboard {
width: calc(100% / 7 - 6px); width: calc(100% / 7 - 6px);
text-align: center; text-align: center;
padding: calc(0.25em - 1px); height:40px;
font-size: 1.6em; /* padding: calc(0.25em - 1px); */
/* font-size: 1.6em; */
border-radius: 7px; border-radius: 7px;
transition: 0.2s; transition: 0.2s;
border: 1px solid transparent; border: 1px solid transparent;
@ -599,7 +600,7 @@
color: rgba(0, 0, 0, 0.8); color: rgba(0, 0, 0, 0.8);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center;
cursor: pointer; cursor: pointer;
vertical-align: middle; vertical-align: middle;
background-color: transparent; background-color: transparent;
@ -607,32 +608,37 @@
} }
.Calendar__day span{ .Calendar__day span{
padding: -10px; padding: 0px;
margin-top: -30px; /* margin-top: -30px; */
font-size: 28px; margin: 0px;
display: flex;
justify-content: center;
height: 100%;
align-items: center;
/* font-size: 28px; */
} }
.Calendar__day:focus { .Calendar__day:focus {
outline: 1px dashed rgba(0, 0, 0, 0.4); /* outline: 1px dashed rgba(0, 0, 0, 0.4); */
outline-offset: 2px; outline-offset: 2px;
} }
.Calendar__day.-ltr { .Calendar__day.-ltr {
min-height: 2.6em; /* min-height: 2.6em; */
font-size: 1.45em; font-size: 1.45em;
} }
.Calendar__day.-rtl { .Calendar__day.-rtl {
font-size: 1.55em; font-size: 1.55em;
height: 40px; /* height: 35px; */
} }
.Calendar__day:not(.-blank):not(.-selectedStart):not(.-selectedEnd):not(.-selectedBetween):not(.-selected):hover { .Calendar__day:not(.-blank):not(.-selectedStart):not(.-selectedEnd):not(.-selectedBetween):not(.-selected):hover {
background-color: rgba(223, 20, 82, 0.06); background-color: rgba(223, 20, 82, 0.06);
color: #df1452; color: #df1452;
border:1px solid #df1452; /* border:1px solid #df1452; */
} }
.Calendar__day.-selected, .Calendar__day.-selected,
@ -689,13 +695,12 @@
} }
.Calendar__day.-today:not(.-selectedStart):not(.-selectedEnd):not(.-selectedBetween) { .Calendar__day.-today:not(.-selectedStart):not(.-selectedEnd):not(.-selectedBetween) {
font-weight: 600; background-color: rgba(223, 20, 82, 0.06);
color: var(--cl-color-black); color: #df1452;
color: #000; /* border:1px solid #df1452; */
position: relative;
} }
.Calendar__day.-today:not(.-selectedStart):not(.-selectedEnd):not(.-selectedBetween)::after { /* .Calendar__day.-today:not(.-selectedStart):not(.-selectedEnd):not(.-selectedBetween)::after {
content: ''; content: '';
position: absolute; position: absolute;
bottom: 0.2em; bottom: 0.2em;
@ -707,7 +712,7 @@
opacity: 0.5; opacity: 0.5;
transform: translateX(-50%); transform: translateX(-50%);
transition: 0.2s; transition: 0.2s;
} } */
.Calendar__day.-today:hover:not(.-selectedStart):not(.-selectedEnd):not(.-selectedBetween)::after { .Calendar__day.-today:hover:not(.-selectedStart):not(.-selectedEnd):not(.-selectedBetween)::after {
opacity: 0; opacity: 0;

@ -74,8 +74,8 @@ const eventsList = [
type: "global", type: "global",
isHoliday: true, isHoliday: true,
date: "2022-01-12T00:00:00.000Z", date: "2022-01-12T00:00:00.000Z",
year: 1400, year: 1401,
month: 10, month: 1,
day: 1 day: 1
}, },
{ {
@ -85,9 +85,9 @@ const eventsList = [
userId: "5", userId: "5",
date: "2022-01-12T00:00:00.000Z", date: "2022-01-12T00:00:00.000Z",
categoryId: 1, categoryId: 1,
year: 1400, year: 1401,
month: 10, month: 1,
day: 3, day: 15,
color: 'blue' color: 'blue'
}, },
{ {
@ -97,9 +97,9 @@ const eventsList = [
userId: "5", userId: "5",
date: "2022-01-08T00:00:00.000Z", date: "2022-01-08T00:00:00.000Z",
categoryId: 3, categoryId: 3,
year: 1400, year: 1401,
month: 11, month: 1,
day: 6 day: 3
}, },
{ {
id: 5, id: 5,
@ -108,8 +108,8 @@ const eventsList = [
userId: "5", userId: "5",
date: "2022-01-12T00:00:00.000Z", date: "2022-01-12T00:00:00.000Z",
categoryId: 1, categoryId: 1,
year: 1400, year: 1401,
month: 10, month: 1,
day: 3 day: 3
} }
]; ];

@ -77,7 +77,7 @@ const ProductDesign = ({
if (catId == 1) { if (catId == 1) {
return ( return (
<div className={`flex flex-col pt-4 text-right rounded-xl justify-start w-full m-4 border border-red82OP ${isMobile && 'w-11/12'}`} <div className={`flex flex-col cursor-pointer pt-4 text-right rounded-xl justify-start w-full m-4 border border-red82OP ${isMobile && 'w-11/12'}`}
style={{ width: !isMobile && '375px' , direction: 'rtl' }} style={{ width: !isMobile && '375px' , direction: 'rtl' }}
onClick={onClick} onClick={onClick}
> >
@ -104,7 +104,7 @@ const ProductDesign = ({
<div className="flex p-4 justify-between items-center"> <div className="flex p-4 justify-between items-center">
<h1 className="font-black text-xl text-red52">{productPrice} تومان</h1> <h1 className="font-black text-xl text-red52">{productPrice} تومان</h1>
<div <div
className={`bg-pinkF5 text-red26 w-32 border-2 border-red52 px-1 py-2 text-xs flex justify-center hover:bg-red52 hover:text-white className={`bg-pinkF5 text-red26 rounded-md w-32 border-2 border-red52 px-1 py-2 text-xs flex justify-center hover:bg-red52 hover:text-white
`} `}
> >
<button className="z-3" onClick={btnOnClick}>افزودن به سبد خرید</button> <button className="z-3" onClick={btnOnClick}>افزودن به سبد خرید</button>
@ -173,7 +173,7 @@ const ProductDesign = ({
<div className={`flex px-4 ${isMobile ? 'w-full border-red82OP border-t' : 'w-2/5 py-4'} justify-between items-center`}> <div className={`flex px-4 ${isMobile ? 'w-full border-red82OP border-t' : 'w-2/5 py-4'} justify-between items-center`}>
<h1 className={`${isMobile && 'w-1/2 h-full flex items-center py-4 border-l border-red82OP'} font-black text-xl text-red52`}>{productPrice} تومان</h1> <h1 className={`${isMobile && 'w-1/2 h-full flex items-center py-4 border-l border-red82OP'} font-black text-xl text-red52`}>{productPrice} تومان</h1>
<div <div
className={`bg-pinkF5 text-red26 w-32 border-2 border-red52 px-1 py-2 text-xs flex justify-center hover:bg-red52 hover:text-white className={`bg-pinkF5 rounded-md text-red26 w-32 border-2 border-red52 px-1 py-2 text-xs flex justify-center hover:bg-red52 hover:text-white
`} `}
> >
<button onClick={btnOnClick}> رزرو پیش ثبت نام </button> <button onClick={btnOnClick}> رزرو پیش ثبت نام </button>
@ -190,7 +190,7 @@ const ProductDesign = ({
} }
if(catId == 3){ if(catId == 3){
return( return(
<div className={`flex flex-col pt-4 text-right rounded-xl justify-start w-full m-4 border border-red82OP ${isMobile && 'w-11/12'}`} <div className={`flex cursor-pointer flex-col pt-4 text-right rounded-xl justify-start w-full m-4 border border-red82OP ${isMobile && 'w-11/12'}`}
style={{ width: !isMobile && '375px', direction: 'rtl' }} style={{ width: !isMobile && '375px', direction: 'rtl' }}
> >
@ -233,7 +233,7 @@ const ProductDesign = ({
<div className="flex p-4 justify-between items-center"> <div className="flex p-4 justify-between items-center">
<h1 className="font-black text-xl text-red52">{productPrice} تومان</h1> <h1 className="font-black text-xl text-red52">{productPrice} تومان</h1>
<div <div
className={`bg-pinkF5 text-red26 w-32 border-2 border-red52 px-1 py-2 text-xs flex justify-center hover:bg-red52 hover:text-white className={`bg-pinkF5 text-red26 w-32 border-2 rounded-md border-red52 px-1 py-2 text-xs flex justify-center hover:bg-red52 hover:text-white
`} `}
> >
<button onClick={btnOnClick}>افزودن به سبد خرید</button> <button onClick={btnOnClick}>افزودن به سبد خرید</button>
@ -249,7 +249,7 @@ const ProductDesign = ({
} }
if(catId == 4){ if(catId == 4){
return ( return (
<div className={`flex flex-col text-right rounded-xl justify-start w-full m-4 border border-red82OP ${isMobile && 'w-11/12'}`} <div className={`flex flex-col cursor-pointer text-right rounded-xl justify-start w-full m-4 border border-red82OP ${isMobile && 'w-11/12'}`}
style={{ width: !isMobile && '375px', direction: 'rtl' }} style={{ width: !isMobile && '375px', direction: 'rtl' }}
> >
@ -270,7 +270,7 @@ const ProductDesign = ({
<h1 className={`font-black text-xl py-4 text-red52 ${isMobile && 'w-1/2 border-l border-red82OP text-center'}`}>{productPrice} تومان</h1> <h1 className={`font-black text-xl py-4 text-red52 ${isMobile && 'w-1/2 border-l border-red82OP text-center'}`}>{productPrice} تومان</h1>
<div <div
className={`bg-${isMobile ? 'blueFF border-blueDF rounded-lg py-3' : 'pinkF5 border-red52 py-2'} text-red26 w-32 border-2 px-1 text-xs flex justify-center hover:bg-red52 hover:text-white className={`bg-${isMobile ? 'blueFF border-blueDF rounded-lg py-3' : 'pinkF5 border-red52 py-2'} rounded-md text-red26 w-32 border-2 px-1 text-xs flex justify-center hover:bg-red52 hover:text-white
`} `}
> >
<button onClick={btnOnClick}>افزودن به سبد خرید</button> <button onClick={btnOnClick}>افزودن به سبد خرید</button>

@ -0,0 +1,9 @@
.giveMeEllipsis {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2; /* number of lines to show */
/* line-height: 1; /* fallback */
/* max-height: 1*2; fallback */
}

@ -1,4 +1,6 @@
import React, {useState} from "react"; import React, {useState} from "react";
import separate from "../../utils/separate";
import './index.css'
function Stepper({ function Stepper({
direction, direction,
@ -39,7 +41,10 @@ function Stepper({
: null : null
} }
</div> </div>
<p className={`mr-4 font-bold ${item.active ? 'text-red26' : 'text-gray-400'} ${direction === 'horizontal' && 'text-xs' }`}>{item.title}</p> <div className="flex justify-center items-center">
<p className="mr-3 ml-1 text-xl font-bold text-red-500 text-opacity-50">{index + 1}</p>
<p className={` giveMeEllipsis font-bold ${item.active ? 'text-red26' : 'text-gray-400'} ${direction === 'horizontal' && 'text-xs' }`}> {item.title}</p>
</div>
</div> </div>
{count !== (Number(index) + 1) && ( {count !== (Number(index) + 1) && (
<span <span

@ -60,15 +60,20 @@
direction: ltr; direction: ltr;
font-size: 15px; font-size: 15px;
font-family: IRANSans; font-family: IRANSans;
color: #df1452; /* color: #df1452; */
} }
.melc-h-move-btns *{ .melc-h-move-btns *{
font-size: 30px; font-size: 30px;
color: #df1452; /* color: #df1452; */
cursor: pointer; cursor: pointer;
} }
.back-btn{
color:#df1452;
}
.forward-btn{
color:#ececec
}
.melc-content{ .melc-content{
width: 100%; width: 100%;
@ -90,7 +95,7 @@
} }
.melc-content-item{ .melc-content-item{
/* width: 100%; */ width: 100%;
/* height: 280px; */ /* height: 280px; */
margin: 30px 0; margin: 30px 0;
/* margin-top: 30px; */ /* margin-top: 30px; */
@ -99,7 +104,7 @@
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
transition: all 0.6s ease; transition: all 0.4s ease;
} }
.melc-content-item-more{ .melc-content-item-more{
@ -146,6 +151,7 @@
.melc-c-i-i-exam-sit{ .melc-c-i-i-exam-sit{
position: absolute; position: absolute;
z-index: 20;
top: 20px; top: 20px;
left: 10px; left: 10px;
padding: 5px 5px; padding: 5px 5px;
@ -181,7 +187,7 @@
right: 0; right: 0;
transform: scaleY(0); transform: scaleY(0);
transform-origin: bottom; transform-origin: bottom;
transition: all 0.5s ease; transition: all 0.1s ease;
} }
.melc-c-i-item-info{ .melc-c-i-item-info{
@ -256,7 +262,7 @@
transform: translateY(140px); transform: translateY(140px);
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
transition: all 0.5s ease; transition: all 0.1s ease;
/* margin-top: 10px; /* margin-top: 10px;
margin-bottom: 5px; */ margin-bottom: 5px; */

@ -192,7 +192,21 @@ const MyExamList = ({isMobile}) => {
i--; i--;
let movment = i * 245; let movment = i * 245;
document.querySelector(".melc-content-item").style.right = `${movment}px`; document.querySelector(".melc-content-item").style.right = `${movment}px`;
console.log(document.querySelector(".melc-content-item").style.right)
if(document.querySelector(".melc-content-item").style.right !== 0){
// setRightBtnColor('#df1452')
document.querySelector('.forward-btn').style.color = '#df1452'
}else{
document.querySelector('.forward-btn').style.color = '#ececec'
}
if(i == max_i){
document.querySelector('.back-btn').style.color = '#ececec'
}else{
document.querySelector('.back-btn').style.color = '#df1452'
}
} }
}; };
const move_right = () => { const move_right = () => {
@ -200,6 +214,18 @@ const MyExamList = ({isMobile}) => {
i++; i++;
let movment = i * 245; let movment = i * 245;
document.querySelector(".melc-content-item").style.right = `${movment}px`; document.querySelector(".melc-content-item").style.right = `${movment}px`;
console.log(document.querySelector(".melc-content-item").style.right)
if(document.querySelector(".melc-content-item").style.right !== '0px'){
// setRightBtnColor('#df1452')
document.querySelector('.forward-btn').style.color = '#df1452'
}else{
document.querySelector('.forward-btn').style.color = '#ececec'
}
if(i == max_i){
document.querySelector('.back-btn').style.color = '#ececec'
}else{
document.querySelector('.back-btn').style.color = '#df1452'
}
} }
}; };
let s = 0; let s = 0;
@ -260,7 +286,7 @@ const MyExamList = ({isMobile}) => {
<div className="my-exam-list"> <div className="my-exam-list">
<div className="my-exam-list-content rounded-lg"> <div className="my-exam-list-content rounded-lg">
<h1 className='text-right w-full text-red52 pt-4 px-6'>لیست آزمون های من</h1> <h1 className='text-right w-full font-bold text-red52 pt-4 px-6'>لیست آزمون های من</h1>
<div className="melc-header"> <div className="melc-header">
{data.map((item, i) => ( {data.map((item, i) => (
<div <div
@ -276,8 +302,8 @@ const MyExamList = ({isMobile}) => {
</div> </div>
))} ))}
<div className="melc-h-move-btns"> <div className="melc-h-move-btns">
<IoIosArrowBack onClick={move_left} /> <span className="back-btn"><IoIosArrowBack onClick={move_left}/></span>
<IoIosArrowForward onClick={move_right} /> <span className="forward-btn"> <IoIosArrowForward onClick={move_right}/></span>
</div> </div>
</div> </div>
<ScrollContainer className="melc-content"> <ScrollContainer className="melc-content">

@ -12,6 +12,7 @@ import { Link } from 'react-router-dom';
import arrowIcon from './MobileSideMenu/arrow-down.svg' import arrowIcon from './MobileSideMenu/arrow-down.svg'
import exitIcon from '../../assets/img/group-9.svg' import exitIcon from '../../assets/img/group-9.svg'
import backIcon from './arrow-left-1.svg'; import backIcon from './arrow-left-1.svg';
import profileIcon from './MobileSideMenu/profile-active.svg'
const Header = ({ const Header = ({
isMobile, cart, isMobile, cart,
logOut logOut
@ -36,14 +37,20 @@ const Header = ({
subMenu && <div className={`w-1/6 p-4 flex flex-col text-right bg-white shadow-xl absolute top-[108.5%] rounded-lg left-5 transition duration-700 ease-in-out ${subMenu && 'subMenu'}`} subMenu && <div className={`w-1/6 p-4 flex flex-col text-right bg-white shadow-xl absolute top-[108.5%] rounded-lg left-5 transition duration-700 ease-in-out ${subMenu && 'subMenu'}`}
> >
<div className='flex items-center rtl text-right w-full py-2'>
<img src={profileIcon} />
کوروش زراندوز ( معلم شیمی )
</div>
<Link to='/adminpanel' onClick={() => setSubMenu(false)} className='w-full text-right border-b border-gray-200 py-2'> <Link to='/adminpanel' onClick={() => setSubMenu(false)} className='w-full text-right border-b border-gray-200 py-2'>
ورود به پنل ادمین ورود به پنل ادمین
</Link> </Link>
<Link to='/adminpanel/add-exam' onClick={() => setSubMenu(false)} className='w-full text-right border-b border-gray-200 py-2'> {/* <Link to='/adminpanel/add-exam' onClick={() => setSubMenu(false)} className='w-full text-right border-b border-gray-200 py-2'>
ورود به صفحه افزودن آزمون ورود به صفحه افزودن آزمون
</Link> </Link> */}
<Link to='/adminpanel/add-product' onClick={() => setSubMenu(false)} className='w-full text-right border-b border-gray-200 py-2'>
ورود به صفحه افزودن محصول
<Link to='/register' onClick={() => setSubMenu(false)} className='w-full text-right border-b border-gray-200 py-2'>
افزودن حساب کاربری جدید
</Link> </Link>
</div> </div>
} }
@ -62,9 +69,9 @@ const Header = ({
{ {
location.pathname.includes('messages') ? ( location.pathname.includes('messages') ? (
<div onClick={() => navigate(-1)} className="w-8 h-8 bg-red-100 rounded-md flex items-center justify-center"> <div onClick={() => navigate(-1)} className="w-8 h-8 bg-red-100 rounded-md flex items-center justify-center">
<img src={backIcon} className="h-4/5"/> <img src={backIcon} className="h-4/5" />
</div> </div>
): ( ) : (
<Link to='/shoppingCart'> <Link to='/shoppingCart'>
<div className='flex flex-col'> <div className='flex flex-col'>
<div className='absolute left-8 top-3 bg-red52 w-4 h-4 rounded-full text-xs flex items-center justify-center text-white'>{cart?.length}</div> <div className='absolute left-8 top-3 bg-red52 w-4 h-4 rounded-full text-xs flex items-center justify-center text-white'>{cart?.length}</div>
@ -84,7 +91,7 @@ const Header = ({
{location.pathname.includes('adminpanel') ? <div></div> : {location.pathname.includes('adminpanel') ? <div></div> :
<> <>
<div className="header-profile h-full flex items-center"> <div className="header-profile h-full flex items-center">
<img src={arrowIcon} className=" ml-4 w-6" onClick={() => setSubMenu(!subMenu)} /> <img src={arrowIcon} className={`cursor-pointer ml-4 w-6 ${subMenu && 'transform rotate-180 duration-900 transition'}`} onClick={() => setSubMenu(!subMenu)} />
<div className="header-profile-img-container w-10 h-10 bg-color2 ml-2 rounded-full overflow-hidden"> <div className="header-profile-img-container w-10 h-10 bg-color2 ml-2 rounded-full overflow-hidden">
<img src={avatar1} alt="avatar1" className='w-full' /> <img src={avatar1} alt="avatar1" className='w-full' />
</div> </div>

@ -26,11 +26,12 @@ $RegularFont:"IRANSansX-Regular";
@keyframes fadeInAnimation { @keyframes fadeInAnimation {
0% { 0% {
height: 0px; // height: 0px;
opacity: 0;
} }
100% { 100% {
height: 200px; height: fit-content;
opacity: 1;
} }
} }

@ -51,7 +51,7 @@ const Input = ({
type={type ? type : 'text'} type={type ? type : 'text'}
name="Login-box-form-item-input-name" name="Login-box-form-item-input-name"
id={`Login-box-form-item-input-name${id}`} id={`Login-box-form-item-input-name${id}`}
className={`Login-box-form-item-input w-full h-full px-4 outline-0 rounded-lg text-red52`} className={`Login-box-form-item-input w-full h-full px-4 outline-0 rounded-lg text-gray-700 focus:text-red52`}
style={{ direction: direction ? direction : "ltr", backgroundColor: bg }} style={{ direction: direction ? direction : "ltr", backgroundColor: bg }}
onFocus={() => focusHandler(id ? id : 0)} onFocus={() => focusHandler(id ? id : 0)}
onBlur={() => blurHandler(id ? id : 0)} onBlur={() => blurHandler(id ? id : 0)}

@ -326,7 +326,7 @@ useEffect(() => {
<Link <Link
to="/settings" to="/myServices"
className="nav-menu-container-item w-full h-1/6 flex flex-col items-center justify-center hover:bg-color2_5 cursor-pointer" className="nav-menu-container-item w-full h-1/6 flex flex-col items-center justify-center hover:bg-color2_5 cursor-pointer"
onClick={() => chaneNav(3)} onClick={() => chaneNav(3)}
> >
@ -399,7 +399,7 @@ useEffect(() => {
className="nav-menu-container-item-title text-sm" className="nav-menu-container-item-title text-sm"
style={4 === navId ? { color: "#fff" } : { color: "#A5A8AB" }} style={4 === navId ? { color: "#fff" } : { color: "#A5A8AB" }}
> >
پشتیبانی چت با اساتید
</div> </div>
</Link> </Link>
{/* ---------- */} {/* ---------- */}
@ -427,7 +427,7 @@ useEffect(() => {
className="nav-menu-container-item-title text-sm" className="nav-menu-container-item-title text-sm"
style={5 === navId ? { color: "#fff" } : { color: "#A5A8AB" }} style={5 === navId ? { color: "#fff" } : { color: "#A5A8AB" }}
> >
اطلاعات تماس پشتیبانی
</div> </div>
</Link> </Link>

@ -3,7 +3,156 @@ import { toast } from "react-toastify";
const initialState = { const initialState = {
loading: false, loading: false,
error: null, error: null,
list: [], list: [
{
id:1,
name: 'عربی دوازدهم',
price: 1000000,
vodTeacher: 'علی عبدالمالکی'
},
{
id:1,
name: 'عربی دوازدهم',
price: 1000000,
vodTeacher: 'علی عبدالمالکی'
},
{
id:1,
name: 'عربی دوازدهم',
price: 1000000,
vodTeacher: 'علی عبدالمالکی'
},
{
id:1,
name: 'عربی دوازدهم',
price: 1000000,
vodTeacher: 'علی عبدالمالکی'
},
{
id:1,
name: 'عربی دوازدهم',
price: 1000000,
vodTeacher: 'علی عبدالمالکی'
},
{
id:1,
name: 'عربی دوازدهم',
price: 1000000,
vodTeacher: 'علی عبدالمالکی'
},
{
id:1,
name: 'عربی دوازدهم',
price: 1000000,
vodTeacher: 'علی عبدالمالکی'
},
{
id:1,
name: 'عربی دوازدهم',
price: 1000000,
vodTeacher: 'علی عبدالمالکی'
},
{
id:1,
name: 'عربی دوازدهم',
price: 1000000,
vodTeacher: 'علی عبدالمالکی'
},
{
id:1,
name: 'عربی دوازدهم',
price: 1000000,
vodTeacher: 'علی عبدالمالکی'
},
{
id:1,
name: 'عربی دوازدهم',
price: 1000000,
vodTeacher: 'علی عبدالمالکی'
},
{
id:1,
name: 'عربی دوازدهم',
price: 1000000,
vodTeacher: 'علی عبدالمالکی'
},
{
id:1,
name: 'عربی دوازدهم',
price: 1000000,
vodTeacher: 'علی عبدالمالکی'
},
{
id:1,
name: 'عربی دوازدهم',
price: 1000000,
vodTeacher: 'علی عبدالمالکی'
},
{
id:1,
name: 'عربی دوازدهم',
price: 1000000,
vodTeacher: 'علی عبدالمالکی'
},
{
id:1,
name: 'عربی دوازدهم',
price: 1000000,
vodTeacher: 'علی عبدالمالکی'
},
{
id:1,
name: 'عربی دوازدهم',
price: 1000000,
vodTeacher: 'علی عبدالمالکی'
},
{
id:1,
name: 'عربی دوازدهم',
price: 1000000,
vodTeacher: 'علی عبدالمالکی'
},
{
id:1,
name: 'عربی دوازدهم',
price: 1000000,
vodTeacher: 'علی عبدالمالکی'
},
{
id:1,
name: 'عربی دوازدهم',
price: 1000000,
vodTeacher: 'علی عبدالمالکی'
},
{
id:1,
name: 'عربی دوازدهم',
price: 1000000,
vodTeacher: 'علی عبدالمالکی'
},
],
info: null, info: null,
searchResult: [], searchResult: [],
filterResult: [], filterResult: [],

@ -2,7 +2,21 @@ import proxy from "../proxy";
import { toast } from "react-toastify"; import { toast } from "react-toastify";
const initialState = { const initialState = {
status: proxy.status(), status: {
name:'کوروش',
lastName: 'زراندوز',
roles: [],
rolesString: [
{
id:1,
roleName: 'پایه ششم',
},
{
id:2,
roleName: 'مدیر',
},
]
},
loading: false, loading: false,
error: null, error: null,
list: null, list: null,

@ -33,9 +33,9 @@ export default function userFactor(state = initialState, action) {
case "userProduct/update": case "userProduct/update":
return { ...state, loading: false, error: null }; return { ...state, loading: false, error: null };
case "userProduct/add": case "userProduct/add":
if (window.location.pathname.indexOf("products") !== -1) {
toast.success("درخواست شما با موفقیت انجام شد."); toast.success("درخواست شما با موفقیت انجام شد.");
}
return { ...state, loading: false, error: null, sum: data.payPrice }; return { ...state, loading: false, error: null, sum: data.payPrice };
case "userProduct/delete": case "userProduct/delete":
return { ...state, loading: false, error: null }; return { ...state, loading: false, error: null };

@ -0,0 +1,12 @@
const separate = (number) => {
number += "";
number = number.replace(",", "");
let x = number.split(".");
let y = x[0];
let z = x.length > 1 ? "." + x[1] : "";
let rgx = /(\d+)(\d{3})/;
while (rgx.test(y)) y = y.replace(rgx, "$1" + "," + "$2");
return y + z;
};
export default separate;

@ -64,7 +64,7 @@ const AddExam = () => {
] ]
return( return(
<div className='flex flex-col w-[96%] py-[6%] bg-grayFD rtl'> <div className='flex flex-col w-[96%] overflow-scroll overflow-x-hidden py-[6%] bg-grayFD rtl' style={{height: '100vh'}}>
<div className='flex w-full items-center py-4 pb-8 px-10 border-b border-gray-300'> <div className='flex w-full items-center py-4 pb-8 px-10 border-b border-gray-300'>
<h1 className="text-blue3A text-lg font-bold w-1/5 text-right px-4 border-r-4 border-blue65"> <h1 className="text-blue3A text-lg font-bold w-1/5 text-right px-4 border-r-4 border-blue65">
ساخت آزمون جدید ساخت آزمون جدید

@ -47,6 +47,11 @@ const AddExamDescription = ({ grades, addExamState, dispatch, stepClick, backSte
range range
calendar={persian} calendar={persian}
locale={persian_fa} locale={persian_fa}
renderButton={(direction, handleClick) => (
<button className="text-blue-500 font-bold mx-2" onClick={handleClick}>
{direction === "right" ? ">" : "<"}
</button>
)}
render={<CostumeDatePickerInput title='تاریخ و زمان شروع آزمون'/>} render={<CostumeDatePickerInput title='تاریخ و زمان شروع آزمون'/>}
plugins={[ plugins={[
@ -59,6 +64,11 @@ const AddExamDescription = ({ grades, addExamState, dispatch, stepClick, backSte
range range
calendar={persian} calendar={persian}
locale={persian_fa} locale={persian_fa}
renderButton={(direction, handleClick) => (
<button className="text-blue-500 font-bold mx-2" onClick={handleClick}>
{direction === "right" ? ">" : "<"}
</button>
)}
render={<CostumeDatePickerInput title='تاریخ و زمان پایان آزمون'/>} render={<CostumeDatePickerInput title='تاریخ و زمان پایان آزمون'/>}
plugins={[ plugins={[

@ -262,11 +262,11 @@ const AddQuestionsFromBank = ({ grades, addExamState, dispatch, stepClick, backS
<div className=" rtl px-2 text-white bg-red52"> <div className=" rtl px-2 text-white bg-red52">
{item.selectedQuestions.length} سوال {item.selectedQuestions.length} سوال
</div> </div>
{
selectedCourse.id == item.id && <p className=" text-left px-4" > <p className=" text-left px-4" >
<span onClick={() => { dispatch({ type: 'REMOVE_EXAM_COURSE', payload: item }); setSelectedCourse(null); setFakeState(fakeState + 24) }}> x </span> <span onClick={() => { dispatch({ type: 'REMOVE_EXAM_COURSE', payload: item }); setSelectedCourse(null); setFakeState(fakeState + 24) }}> x </span>
</p> </p>
}
</div> </div>
<p className="text-red52"> <p className="text-red52">

@ -12,7 +12,7 @@ const SideAP = () => {
انتشار محصول انتشار محصول
</h1> </h1>
<div className="w-full px-6 flex rtl justify-between"> <div className="w-full px-6 flex rtl justify-between">
<button className="w-1/2 border border-blueED rounded-lg font-bold text-blueED py-4 ml-2" style={{background: 'rgba(16, 100, 205, 0.24)'}}> <button className="w-1/2 border border-blueED rounded-lg font-bold text-blueED py-4 ml-2" >
ذخیره در پیشنویس ذخیره در پیشنویس
</button> </button>
<button className="w-1/2 border border-blueCD rounded-lg font-bold text-white py-4 mr-2 bg-blueCD"> <button className="w-1/2 border border-blueCD rounded-lg font-bold text-white py-4 mr-2 bg-blueCD">

@ -52,7 +52,15 @@ const ContactUs = ({isMobile}) => {
<form className="flex flex-col w-full"> <form className="flex flex-col w-full">
<Input title='نام' gapSize='8' id={0} style={{ width: '100%' }} /> <Input title='نام' gapSize='8' id={0} style={{ width: '100%' }} />
<Input title='ایمیل' gapSize='8' id={1} style={{ width: '100%', background: 'rgba(249, 249, 249, 0.75)' }} /> <Input title='ایمیل' gapSize='8' id={1} style={{ width: '100%', background: 'rgba(249, 249, 249, 0.75)' }} type="email" onChange={(e) => {
let value = e.target.value
value = value.replace(/[^A-Za-z]/ig, '')
this.setState({
value,
})
}}/>
<select className="bg-white border border-solid border-gray-200 w-full my-4 p-3 rounded-lg text-gray-400 outline-red52"> <select className="bg-white border border-solid border-gray-200 w-full my-4 p-3 rounded-lg text-gray-400 outline-red52">
{departments.map((item, index) => ( {departments.map((item, index) => (
<option key={`Grade__${index}`}>{item.title}</option> <option key={`Grade__${index}`}>{item.title}</option>
@ -114,12 +122,26 @@ const ContactUs = ({isMobile}) => {
<form className="flex flex-col w-full"> <form className="flex flex-col w-full">
<Input title='نام' gapSize='8' id={0} style={{ width: '100%' }} /> <Input title='نام' gapSize='8' id={0} style={{ width: '100%' }} />
<Input title='ایمیل' gapSize='8' id={1} style={{ width: '100%' }} /> <Input title='ایمیل' type={'email'} gapSize='8' id={1} style={{ width: '100%' }} onChange={(e) => {
let value = e.target.value
value = value.replace(/[^A-Za-z]/ig, '')
this.setState({
value,
})
}} />
<select className="bg-white border border-solid border-gray-200 w-full my-4 p-3 rounded-lg text-gray-400 outline-red52"> <select className="bg-white border border-solid border-gray-200 w-full my-4 p-3 rounded-lg text-gray-400 outline-red52">
{departments.map((item, index) => ( {departments.map((item, index) => (
<option key={`Grade__${index}`}>{item.title}</option> <option key={`Grade__${index}`}>{item.title}</option>
))} ))}
</select> </select>
<select className="bg-white border border-solid border-gray-200 w-full my-4 mt-0 p-3 rounded-lg text-gray-400 outline-red52">
<option>انتخاب محصول / خدمات</option>
{departments.map((item, index) => (
<option key={`Grade__${index}`}>{item.title}</option>
))}
</select>
<textarea className="w-full border-gray-200 border p-3 rounded-lg text-gray-400 outline-red52" rows='7' cols='70' placeholder="متن پیام را اینجا تایپ کنید"> <textarea className="w-full border-gray-200 border p-3 rounded-lg text-gray-400 outline-red52" rows='7' cols='70' placeholder="متن پیام را اینجا تایپ کنید">
</textarea> </textarea>

@ -12,7 +12,10 @@ import SimpleCalendar from '../../components/Calendar'
import MobileHome from "./mobile"; import MobileHome from "./mobile";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { publicApi } from "../../redux/actions"; import { publicApi } from "../../redux/actions";
// import { Calendar } from "react-multi-date-picker"
// import persian from "react-date-object/calendars/persian"
// import persian_fa from "react-date-object/locales/persian_fa"
import './cal.css';
const Dashboard = ({ const Dashboard = ({
ActiveUserFullInfo, ActiveUserFullInfo,
@ -48,6 +51,49 @@ const Dashboard = ({
/> */} /> */}
<div className="w-full mb-4"> <div className="w-full mb-4">
{/* <Calendar
calendar={persian}
locale={persian_fa}
className="custom-calendar red"
showOtherDays
format="YYYY/MM/dddd"
weekDays={['شنبه', 'یک شنبه', 'دو شنبه', 'سه شنبه' , 'چهار شنبه', 'پنج شنبه', 'جمعه']}
mapDays={({ date }) => {
let thisEvent;
if ([4, 5, 6, 7].includes(date.day)) {thisEvent = false}
if([{
day: 4,
event: 'جشن',
},
{
day: 8,
event: 'شادی',
},
{
day: 12,
event: 'پایکوبی',
},
{
day: 21,
event: 'خنده',
},
].filter(itm => itm.day)){
thisEvent = true
console.log('a+')
}
if (thisEvent == false) return {
className: "highlight border-solid border-b border-red-500 rounded-md",
// onClick: () => setEvents()
}
}}
>
</Calendar> */}
<SimpleCalendar /> <SimpleCalendar />
</div> </div>
@ -60,7 +106,7 @@ const Dashboard = ({
<div className="dashboard-right-part-row2 w-full mt-4 flex items-start justify-between flex-row-reverse"> <div className="dashboard-right-part-row2 w-full mt-4 flex items-start justify-between flex-row-reverse">
<LastActivity /> <LastActivity />
{/* {ActiveUserFullInfo && ( {/* {ActiveUserFullInfo && (b
<div className="dashboard-blur-box w-full h-full absolute top-0 left-0 backdrop-blur z-40"> <div className="dashboard-blur-box w-full h-full absolute top-0 left-0 backdrop-blur z-40">
<UserFullInfo <UserFullInfo
buyBtn={true} buyBtn={true}

@ -0,0 +1,24 @@
.custom-calendar .rmdp-top-class,
.custom-calendar .rmdp-calendar > div:not(:first-child),
.custom-calendar .rmdp-day-picker {
width:100%;
padding: 1%;
/* height: 100%; */
}
.custom-calendar,
.custom-calendar .rmdp-calendar,
.custom-calendar .rmdp-day-picker > div {
width: 100%;
height: 100%;
}
.custom-calendar .rmdp-day {
width: unset;
flex: 1;
}
.custom-calendar .rmdp-week {
height: 14.5%;
}

@ -35,7 +35,7 @@ const Services = ({
pushToCart, pushToCart,
}) => { }) => {
const [filterCheck, setFilterCheck] = useState([false, false, false, false]); const [filterCheck, setFilterCheck] = useState(null);
const [filter, setFilter] = useState({ const [filter, setFilter] = useState({
search: "", search: "",
grade: "", grade: "",
@ -105,11 +105,11 @@ const Services = ({
const chooseGame = (id) => { const chooseGame = (id) => {
setGameId(id); setGameId(id);
}; };
if (!isMobile){ if (!isMobile) {
return ( return (
<div <div
className="flex items-start justify-between" className="flex items-start justify-between"
style={{ width: "93.5%", direction: "rtl" }} style={{ width: "93.5%", direction: "rtl", height: '100vh' }}
> >
{popup ? ( {popup ? (
<ServicePopUp <ServicePopUp
@ -119,10 +119,10 @@ if (!isMobile){
) : null} ) : null}
<div <div
className="w-3/4 flex flex-col justify-center " className="w-3/4 flex flex-col justify-center "
style={{ marginTop: "5.5%" }} style={{ paddingTop:'5.5%', height: '100vh' }}
> >
<div <div
className="relative h-48 w-full border-b border-red82OP my-4 px-10" className="h-48 w-full border-b border-red82OP my-4 px-10"
style={{ direction: "ltr" }} style={{ direction: "ltr" }}
> >
{/* { {/* {
@ -161,7 +161,7 @@ if (!isMobile){
/> />
</div> </div>
{/* filters */} {/* filters */}
{gameId != 6 && <div className="flex mx-2 my-4 justify-center"> {gameId != 6 && <div className="flex mx-10 my-4 justify-start">
<div className="flex items-center "> <div className="flex items-center ">
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
@ -220,24 +220,20 @@ if (!isMobile){
</g> </g>
</svg> </svg>
</div> </div>
<div className="flex items-center mx-4 pl-6 border-l-2 border-gray-300"> <div className="flex items-center mx-6 pl-6 border-l-2 border-gray-300">
<div <div
className={`flex w-32 border-2 p-2 mx-2 justify-center items-center rounded-md cursor-pointer className={`flex w-32 border-2 p-2 px-4 mx-2 justify-center items-center rounded-md cursor-pointer
hover:border-red52 hover:text-red52 hover:bg-pinkF5 hover:border-red52 hover:text-red52 hover:bg-pinkF5
${ ${filterCheck == 'Online'
filterCheck[0]
? "border-red52 text-red52 bg-pinkF5" ? "border-red52 text-red52 bg-pinkF5"
: "border-gray200 text-gray-400" : "border-gray200 text-gray-400"
}`} }`}
onClick={(prevState) => onClick={(prevState) =>
setFilterCheck([ setFilterCheck('Online')
...prevState,
(filterCheck[0] = !filterCheck[0]),
])
} }
> >
<h3>آنلاین</h3> <h3>آنلاین</h3>
{filterCheck[0] && ( {filterCheck == 'Online' && (
<div className="flex w-full" style={{ direction: "ltr" }}> <div className="flex w-full" style={{ direction: "ltr" }}>
<div className="w-4 h-4 text-white text-sm rounded-full flex justify-center items-center bg-red52"> <div className="w-4 h-4 text-white text-sm rounded-full flex justify-center items-center bg-red52">
<svg <svg
@ -262,22 +258,18 @@ if (!isMobile){
)} )}
</div> </div>
<div <div
className={`flex w-32 border-2 p-2 mx-2 justify-center items-center rounded-md cursor-pointer className={`flex w-32 border-2 p-2 mx-2 px-4 justify-center items-center rounded-md cursor-pointer
hover:border-red52 hover:text-red52 hover:bg-pinkF5 hover:border-red52 hover:text-red52 hover:bg-pinkF5
${ ${filterCheck == 'Physical'
filterCheck[0]
? "border-red52 text-red52 bg-pinkF5" ? "border-red52 text-red52 bg-pinkF5"
: "border-gray200 text-gray-400" : "border-gray200 text-gray-400"
}`} }`}
onClick={(prevState) => onClick={(prevState) =>
setFilterCheck([ setFilterCheck('Physical')
...prevState,
(filterCheck[0] = !filterCheck[0]),
])
} }
> >
<h3>حضوری</h3> <h3>حضوری</h3>
{filterCheck[0] && ( {filterCheck == 'Physical' && (
<div className="flex w-full" style={{ direction: "ltr" }}> <div className="flex w-full" style={{ direction: "ltr" }}>
<div className="w-4 h-4 text-white text-sm rounded-full flex justify-center items-center bg-red52"> <div className="w-4 h-4 text-white text-sm rounded-full flex justify-center items-center bg-red52">
<svg <svg
@ -314,28 +306,27 @@ if (!isMobile){
</div>} </div>}
<div <div
className={`flex ${ className={`flex
gameId == 2 && "flex-col" } items-center w-full justify-center overflow-x-hidden overflow-scroll flex-wrap h-full `}
} items-center w-full justify-center flex-wrap `}
> >
{books?.map((product, index) => ( {books?.map((product, index) => (
<Link <div
// to={"/class/" + product?.id} // to={"/class/" + product?.id}
to="#"
key={`PRODUCT__${gameId}__${index}`} key={`PRODUCT__${gameId}__${index}`}
onClick={() => { onClick={() => {
setPopUpContent({ setPopUpContent({
id: gameId, id: gameId,
title: product?.name, title: product?.name,
video: "", video: "",
teacher: product.vodTeacher, teacher: product?.vodTeacher,
description: description:
"در این قسمت یک توضیحات کوتاه در مورد دوره خواهد آمد که بصورت دو خط در این قسمت قرار میگیرد در این قسمت یک توضیحات کوتاه در مورد دوره خواهد آمد که بصورت دو خط در این قسمت", "در این قسمت یک توضیحات کوتاه در مورد دوره خواهد آمد که بصورت دو خط در این قسمت قرار میگیرد در این قسمت یک توضیحات کوتاه در مورد دوره خواهد آمد که بصورت دو خط در این قسمت",
price: product.product[0].price, price: product?.price,
classHour: 21, classHour: 21,
classMinute: 56, classMinute: 56,
image: 'https://narafella.ir/wp-content/uploads/2021/08/books-min.jpg', image: 'https://narafella.ir/wp-content/uploads/2021/08/books-min.jpg',
examCont : [ examCont: [
{ {
title: 'بخش اول آزمون ' + product.name, title: 'بخش اول آزمون ' + product.name,
date: '۱۴۰۰/۱۲/۱۳', date: '۱۴۰۰/۱۲/۱۳',
@ -359,7 +350,7 @@ if (!isMobile){
}, },
] ]
}); });
if(gameId !== 2){ if (gameId !== 2) {
setPopUp(true) setPopUp(true)
} }
console.log(gameId) console.log(gameId)
@ -374,7 +365,7 @@ if (!isMobile){
index={Number(index)} index={Number(index)}
productName={`${product?.name}`} productName={`${product?.name}`}
productCat={`پایه ${grades[product?.gradeId]}`} productCat={`پایه ${grades[product?.gradeId]}`}
productPrice={product.product[0].price} productPrice={product?.price}
// productImg={"https://dnvn.ir/api/v1/file/" + product?.fileIds} // productImg={"https://dnvn.ir/api/v1/file/" + product?.fileIds}
numberOfRegards={160} numberOfRegards={160}
productHolderBorder="" productHolderBorder=""
@ -382,7 +373,7 @@ if (!isMobile){
teacher={product.vodTeacher} teacher={product.vodTeacher}
catId={gameId} catId={gameId}
onClick={() => null} onClick={() => null}
btnOnClick={() =>{ btnOnClick={() => {
pushToCart({ pushToCart({
productId: product?.id, productId: product?.id,
@ -394,11 +385,11 @@ if (!isMobile){
} }
} }
/> />
</Link> </div>
))} ))}
{ {
gameId == 6 && gameId == 6 &&
<div className="w-3/4 p-8 py-10 flex mt-10 justify-between items-center border-2 rounded-xl border-red52 " > <div className="w-3/4 p-8 py-10 flex mt-10 justify-between text-right items-center border-2 rounded-xl border-red52 " >
<div className="w-1/5"> <div className="w-1/5">
<h1 className="text-red26 font-bold">افزایش مبلغ دلخواه</h1> <h1 className="text-red26 font-bold">افزایش مبلغ دلخواه</h1>
@ -423,14 +414,15 @@ if (!isMobile){
} }
</div> </div>
</div> </div>
{!isMobile && <div className="w-1/4 fixed left-0" style={{ height: "100vh" }}> {!isMobile && <div className="w-1/4 left-0" style={{ height: "100vh" }}>
<ShoppingCart /> <ShoppingCart />
</div> } </div>}
</div> </div>
);} );
}
// Mobile Version // Mobile Version
else{ else {
return( return (
<div className="flex flex-col items-center mt-16 mb-40 rtl"> <div className="flex flex-col items-center mt-16 mb-40 rtl">
<Games <Games
@ -501,8 +493,7 @@ if (!isMobile){
<div <div
className={`flex w-32 border-2 p-2 mx-2 justify-center items-center rounded-md cursor-pointer className={`flex w-32 border-2 p-2 mx-2 justify-center items-center rounded-md cursor-pointer
hover:border-red52 hover:text-red52 hover:bg-pinkF5 hover:border-red52 hover:text-red52 hover:bg-pinkF5
${ ${filterCheck[0]
filterCheck[0]
? "border-red52 text-red52 bg-pinkF5" ? "border-red52 text-red52 bg-pinkF5"
: "border-gray200 text-gray-400" : "border-gray200 text-gray-400"
}`} }`}
@ -541,8 +532,7 @@ if (!isMobile){
<div <div
className={`flex w-32 border-2 p-2 mx-2 justify-center items-center rounded-md cursor-pointer className={`flex w-32 border-2 p-2 mx-2 justify-center items-center rounded-md cursor-pointer
hover:border-red52 hover:text-red52 hover:bg-pinkF5 hover:border-red52 hover:text-red52 hover:bg-pinkF5
${ ${filterCheck[1]
filterCheck[1]
? "border-red52 text-red52 bg-pinkF5" ? "border-red52 text-red52 bg-pinkF5"
: "border-gray200 text-gray-400" : "border-gray200 text-gray-400"
}`} }`}
@ -602,7 +592,7 @@ if (!isMobile){
classHour: 21, classHour: 21,
classMinute: 56, classMinute: 56,
image: 'https://narafella.ir/wp-content/uploads/2021/08/books-min.jpg', image: 'https://narafella.ir/wp-content/uploads/2021/08/books-min.jpg',
examCont : [ examCont: [
{ {
title: 'بخش اول آزمون ' + product.name, title: 'بخش اول آزمون ' + product.name,
date: '۱۴۰۰/۱۲/۱۳', date: '۱۴۰۰/۱۲/۱۳',
@ -679,13 +669,13 @@ if (!isMobile){
/> />
</div> </div>
<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"
style={{background: 'rgba(211, 246, 255, 0.44)'}}> style={{ background: 'rgba(211, 246, 255, 0.44)' }}>
افزودن به سبد خرید افزودن به سبد خرید
</button> </button>
</div> </div>
} }
</div> </div>
</div> </div>
) )
} }

Loading…
Cancel
Save