Calendar Fixed

main
Pedram Keshavarzi 3 years ago
parent 11c7c34fdf
commit 35875fda6c
  1. 2
      src/App.js
  2. 12
      src/components/Calendar/CalendarComponents/Calendar.js
  3. 23
      src/components/Calendar/CalendarComponents/components/DaysList.js
  4. 4
      src/components/Calendar/CalendarComponents/components/Header.js
  5. 37
      src/components/Calendar/index.css
  6. 20
      src/components/Calendar/index.js
  7. 14
      src/components/Product/index.js
  8. 8
      src/components/exam/Carousel/index.css
  9. 4
      src/components/header/Header.js
  10. 6
      src/components/nav/Nav.js
  11. 151
      src/redux/reducers/book.js
  12. 16
      src/redux/reducers/user.js
  13. 6
      src/view/contact/index.js
  14. 50
      src/view/dashboard/Dashboard.js
  15. 24
      src/view/dashboard/cal.css
  16. 12
      src/view/services/index.js

@ -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>

@ -90,7 +90,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 +99,7 @@
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
transition: all 0.6s ease; transition: all 0.1s ease;
} }
.melc-content-item-more{ .melc-content-item-more{
@ -181,7 +181,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 +256,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; */

@ -42,8 +42,8 @@ const Header = ({
<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>
} }

@ -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,

@ -120,6 +120,12 @@ const ContactUs = ({isMobile}) => {
<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%;
}

@ -319,19 +319,19 @@ if (!isMobile){
} items-center w-full justify-center flex-wrap `} } 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',
@ -374,7 +374,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=""
@ -394,7 +394,7 @@ if (!isMobile){
} }
} }
/> />
</Link> </div>
))} ))}
{ {
gameId == 6 && gameId == 6 &&

Loading…
Cancel
Save