some update and change

main
alireza khaji 2 years ago
parent 666fa19f38
commit 6f6092ed27
  1. 4
      src/App.js
  2. BIN
      src/assets/img/photo-placeholder.png
  3. 8
      src/assets/img/vuesax-linear-arrow-left.svg
  4. 12
      src/assets/img/vuesax-linear-element-equal.svg
  5. 12
      src/assets/img/vuesax-linear-element-equal2.svg
  6. 12
      src/assets/img/vuesax-linear-map.svg
  7. 12
      src/assets/img/vuesax-linear-map2.svg
  8. 18
      src/assets/img/vuesax-linear-myService.svg
  9. 18
      src/assets/img/vuesax-linear-myService2.svg
  10. 7
      src/assets/img/vuesax-linear-sms1.svg
  11. 8
      src/assets/img/vuesax-linear-sms2.svg
  12. 405
      src/components/Product/index.js
  13. 7
      src/components/ShoppingCart/index.js
  14. 214
      src/components/header/Header.js
  15. 232
      src/components/nav/Nav.js
  16. 7
      src/redux/reducers/user.js
  17. 224
      src/view/LoginSignUp/SignUpBox.js
  18. 379
      src/view/LoginSignUp/index.js
  19. 40
      src/view/dashboard2/Games.js
  20. 1303
      src/view/register/index.js
  21. 338
      src/view/services/index.js
  22. 1
      tailwind.config.js
  23. 16172
      yarn.lock

@ -651,6 +651,10 @@ function App() {
localStorage.setItem('login', false)
};
if(location==="/"){
window.location.replace("/services");
}
// useEffect(() => {
// setLOGIN(true);
// }, [loginStorage])

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

@ -0,0 +1,8 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<g id="vuesax_linear_arrow-left" data-name="vuesax/linear/arrow-left" transform="translate(-364 -252)">
<g id="arrow-left">
<path id="Vector" d="M7.1,15.84.577,9.32a1.986,1.986,0,0,1,0-2.8L7.1,0" transform="translate(371.902 256.08)" fill="none" stroke="#521326" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"/>
<path id="Vector-2" data-name="Vector" d="M0,0H24V24H0Z" transform="translate(388 276) rotate(180)" fill="none" opacity="0"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 582 B

@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" width="52" height="52" viewBox="0 0 52 52">
<g id="vuesax_linear_element-equal" data-name="vuesax/linear/element-equal" transform="translate(-108 -316)">
<g id="element-equal" transform="translate(108 316)">
<path id="Vector" d="M18.417,13.585V4.832C18.417,1.387,17.03,0,13.585,0H4.832C1.387,0,0,1.387,0,4.832v8.753c0,3.445,1.387,4.832,4.832,4.832h8.753C17.03,18.417,18.417,17.03,18.417,13.585Z" transform="translate(29.25 4.333)" fill="none" stroke="#a5a8ab" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-2" data-name="Vector" d="M18.417,14.127V4.29C18.417,1.235,17.03,0,13.585,0H4.832C1.387,0,0,1.235,0,4.29v9.815c0,3.077,1.387,4.29,4.832,4.29h8.753C17.03,18.417,18.417,17.182,18.417,14.127Z" transform="translate(4.333 4.333)" fill="none" stroke="#a5a8ab" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-3" data-name="Vector" d="M18.417,13.585V4.832C18.417,1.387,17.03,0,13.585,0H4.832C1.387,0,0,1.387,0,4.832v8.753c0,3.445,1.387,4.832,4.832,4.832h8.753C17.03,18.417,18.417,17.03,18.417,13.585Z" transform="translate(4.333 29.25)" fill="none" stroke="#a5a8ab" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-4" data-name="Vector" d="M0,0H13" transform="translate(32.5 33.583)" fill="none" stroke="#a5a8ab" stroke-linecap="round" stroke-width="2"/>
<path id="Vector-5" data-name="Vector" d="M0,0H13" transform="translate(32.5 42.25)" fill="none" stroke="#a5a8ab" stroke-linecap="round" stroke-width="2"/>
<path id="Vector-6" data-name="Vector" d="M0,0H52V52H0Z" fill="none" opacity="0"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" width="52" height="52" viewBox="0 0 52 52">
<g id="vuesax_linear_element-equal2" data-name="vuesax/linear/element-equal2" transform="translate(-108 -316)">
<g id="element-equal" transform="translate(108 316)">
<path id="Vector" d="M18.417,13.585V4.832C18.417,1.387,17.03,0,13.585,0H4.832C1.387,0,0,1.387,0,4.832v8.753c0,3.445,1.387,4.832,4.832,4.832h8.753C17.03,18.417,18.417,17.03,18.417,13.585Z" transform="translate(29.25 4.333)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-2" data-name="Vector" d="M18.417,14.127V4.29C18.417,1.235,17.03,0,13.585,0H4.832C1.387,0,0,1.235,0,4.29v9.815c0,3.077,1.387,4.29,4.832,4.29h8.753C17.03,18.417,18.417,17.182,18.417,14.127Z" transform="translate(4.333 4.333)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-3" data-name="Vector" d="M18.417,13.585V4.832C18.417,1.387,17.03,0,13.585,0H4.832C1.387,0,0,1.387,0,4.832v8.753c0,3.445,1.387,4.832,4.832,4.832h8.753C17.03,18.417,18.417,17.03,18.417,13.585Z" transform="translate(4.333 29.25)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-4" data-name="Vector" d="M0,0H13" transform="translate(32.5 33.583)" fill="none" stroke="#fff" stroke-linecap="round" stroke-width="2"/>
<path id="Vector-5" data-name="Vector" d="M0,0H13" transform="translate(32.5 42.25)" fill="none" stroke="#fff" stroke-linecap="round" stroke-width="2"/>
<path id="Vector-6" data-name="Vector" d="M0,0H52V52H0Z" fill="none" opacity="0"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" width="49.637" height="49.637" viewBox="0 0 49.637 49.637">
<g id="vuesax_linear_map" data-name="vuesax/linear/map" transform="translate(-492 -252)">
<g id="map" transform="translate(492 252)">
<path id="Vector" d="M16.546,5.646V18.056c0,5.171-1.034,8.79-3.351,11.127L0,15.987,15.987,0A25.444,25.444,0,0,1,16.546,5.646Z" transform="translate(28.955 12.968)" fill="none" stroke="#a5a8ab" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-2" data-name="Vector" d="M40.806,8.831,8.831,40.806C2.606,39.379,0,35.077,0,26.887V14.478C0,4.136,4.136,0,14.478,0H26.887C35.077,0,39.379,2.606,40.806,8.831Z" transform="translate(4.136 4.136)" fill="none" stroke="#a5a8ab" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-3" data-name="Vector" d="M29.183,13.2c-2.337,2.316-5.956,3.351-11.127,3.351H5.646A25.445,25.445,0,0,1,0,15.987L15.987,0Z" transform="translate(12.968 28.955)" fill="none" stroke="#a5a8ab" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-4" data-name="Vector" d="M.176,4.545c1.406-6.06,10.507-6.06,11.913,0C12.9,8.1,10.662,11.122,8.7,12.983a3.724,3.724,0,0,1-5.129,0C1.6,11.122-.652,8.1.176,4.545Z" transform="translate(12.73 11.959)" fill="none" stroke="#a5a8ab" stroke-width="2"/>
<path id="Vector-5" data-name="Vector" d="M0,0H49.637V49.637H0Z" fill="none" opacity="0"/>
<path id="Vector-6" data-name="Vector" d="M.495.5H.513" transform="translate(18.315 17.494)" fill="none" stroke="#a5a8ab" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" width="49.637" height="49.637" viewBox="0 0 49.637 49.637">
<g id="vuesax_linear_map2" data-name="vuesax/linear/map2" transform="translate(-492 -252)">
<g id="map" transform="translate(492 252)">
<path id="Vector" d="M16.546,5.646V18.056c0,5.171-1.034,8.79-3.351,11.127L0,15.987,15.987,0A25.444,25.444,0,0,1,16.546,5.646Z" transform="translate(28.955 12.968)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-2" data-name="Vector" d="M40.806,8.831,8.831,40.806C2.606,39.379,0,35.077,0,26.887V14.478C0,4.136,4.136,0,14.478,0H26.887C35.077,0,39.379,2.606,40.806,8.831Z" transform="translate(4.136 4.136)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-3" data-name="Vector" d="M29.183,13.2c-2.337,2.316-5.956,3.351-11.127,3.351H5.646A25.445,25.445,0,0,1,0,15.987L15.987,0Z" transform="translate(12.968 28.955)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-4" data-name="Vector" d="M.176,4.545c1.406-6.06,10.507-6.06,11.913,0C12.9,8.1,10.662,11.122,8.7,12.983a3.724,3.724,0,0,1-5.129,0C1.6,11.122-.652,8.1.176,4.545Z" transform="translate(12.73 11.959)" fill="none" stroke="#fff" stroke-width="2"/>
<path id="Vector-5" data-name="Vector" d="M0,0H49.637V49.637H0Z" fill="none" opacity="0"/>
<path id="Vector-6" data-name="Vector" d="M.495.5H.513" transform="translate(18.315 17.494)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -0,0 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" width="52" height="52" viewBox="0 0 52 52">
<g id="vuesax_linear_myService" data-name="vuesax/linear/myService" transform="translate(-108 -316)">
<g id="element-equal" transform="translate(108 316)">
<path id="Vector" d="M18.417,13.585V4.832C18.417,1.387,17.03,0,13.585,0H4.832C1.387,0,0,1.387,0,4.832v8.753c0,3.445,1.387,4.832,4.832,4.832h8.753C17.03,18.417,18.417,17.03,18.417,13.585Z" transform="translate(29.25 4.333)" fill="none" stroke="#a5a8ab" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-2" data-name="Vector" d="M18.417,13.585V4.832C18.417,1.387,17.03,0,13.585,0H4.832C1.387,0,0,1.387,0,4.832v8.753c0,3.445,1.387,4.832,4.832,4.832h8.753C17.03,18.417,18.417,17.03,18.417,13.585Z" transform="translate(4.333 29.25)" fill="none" stroke="#a5a8ab" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-3" data-name="Vector" d="M0,0H13" transform="translate(32.5 33.583)" fill="none" stroke="#a5a8ab" stroke-linecap="round" stroke-width="2"/>
<path id="Vector-4" data-name="Vector" d="M0,0H13" transform="translate(32.5 42.25)" fill="none" stroke="#a5a8ab" stroke-linecap="round" stroke-width="2"/>
<path id="Vector-5" data-name="Vector" d="M0,0H52V52H0Z" fill="none" opacity="0"/>
<g id="vuesax_linear_user" data-name="vuesax/linear/user" transform="translate(-106.243 -186.635)">
<g id="user" transform="translate(108 188)">
<path id="Vector-6" data-name="Vector" d="M9.475,4.737A4.737,4.737,0,1,1,4.737,0,4.737,4.737,0,0,1,9.475,4.737Z" transform="translate(6.632 0.895)" fill="none" stroke="#a5a8ab" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-7" data-name="Vector" d="M16.278,6.632C16.278,2.966,12.63,0,8.139,0S0,2.966,0,6.632" transform="translate(3.231 14.212)" fill="none" stroke="#a5a8ab" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-8" data-name="Vector" d="M0,0H22.739V22.739H0Z" fill="none" opacity="0"/>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

@ -0,0 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" width="52" height="52" viewBox="0 0 52 52">
<g id="vuesax_linear_myService2" data-name="vuesax/linear/myService2" transform="translate(-108 -316)">
<g id="element-equal" transform="translate(108 316)">
<path id="Vector" d="M18.417,13.585V4.832C18.417,1.387,17.03,0,13.585,0H4.832C1.387,0,0,1.387,0,4.832v8.753c0,3.445,1.387,4.832,4.832,4.832h8.753C17.03,18.417,18.417,17.03,18.417,13.585Z" transform="translate(29.25 4.333)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-2" data-name="Vector" d="M18.417,13.585V4.832C18.417,1.387,17.03,0,13.585,0H4.832C1.387,0,0,1.387,0,4.832v8.753c0,3.445,1.387,4.832,4.832,4.832h8.753C17.03,18.417,18.417,17.03,18.417,13.585Z" transform="translate(4.333 29.25)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-3" data-name="Vector" d="M0,0H13" transform="translate(32.5 33.583)" fill="none" stroke="#fff" stroke-linecap="round" stroke-width="2"/>
<path id="Vector-4" data-name="Vector" d="M0,0H13" transform="translate(32.5 42.25)" fill="none" stroke="#fff" stroke-linecap="round" stroke-width="2"/>
<path id="Vector-5" data-name="Vector" d="M0,0H52V52H0Z" fill="none" opacity="0"/>
<g id="vuesax_linear_user" data-name="vuesax/linear/user" transform="translate(-106.243 -186.635)">
<g id="user" transform="translate(108 188)">
<path id="Vector-6" data-name="Vector" d="M9.475,4.737A4.737,4.737,0,1,1,4.737,0,4.737,4.737,0,0,1,9.475,4.737Z" transform="translate(6.632 0.895)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-7" data-name="Vector" d="M16.278,6.632C16.278,2.966,12.63,0,8.139,0S0,2.966,0,6.632" transform="translate(3.231 14.212)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-8" data-name="Vector" d="M0,0H22.739V22.739H0Z" fill="none" opacity="0"/>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

@ -0,0 +1,7 @@
<svg id="vuesax_linear_sms1" data-name="vuesax/linear/sms1" xmlns="http://www.w3.org/2000/svg" width="49.637" height="49.637" viewBox="0 0 49.637 49.637">
<g id="sms">
<path id="Vector" d="M31.023,35.16H10.341C4.136,35.16,0,32.057,0,24.819V10.341C0,3.1,4.136,0,10.341,0H31.023c6.2,0,10.341,3.1,10.341,10.341V24.819C41.364,32.057,37.228,35.16,31.023,35.16Z" transform="translate(4.136 7.239)" fill="none" stroke="#a5a8ab" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-2" data-name="Vector" d="M20.682,0,14.209,5.171a6.547,6.547,0,0,1-7.756,0L0,0" transform="translate(14.477 18.614)" fill="none" stroke="#a5a8ab" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-3" data-name="Vector" d="M0,0H49.637V49.637H0Z" fill="none" opacity="0"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 834 B

@ -1,7 +1,7 @@
<svg id="vuesax_linear_sms2" data-name="vuesax/linear/sms2" xmlns="http://www.w3.org/2000/svg" width="46.091" height="46.091" viewBox="0 0 46.091 46.091">
<svg id="vuesax_linear_sms2" data-name="vuesax/linear/sms2" xmlns="http://www.w3.org/2000/svg" width="49.637" height="49.637" viewBox="0 0 49.637 49.637">
<g id="sms">
<path id="Vector" d="M28.807,32.648H9.6c-5.761,0-9.6-2.881-9.6-9.6V9.6C0,2.881,3.841,0,9.6,0h19.2c5.761,0,9.6,2.881,9.6,9.6V23.046C38.409,29.767,34.568,32.648,28.807,32.648Z" transform="translate(3.841 6.722)" fill="none" stroke="#fff" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/>
<path id="Vector-2" data-name="Vector" d="M19.2,0,13.194,4.8a6.08,6.08,0,0,1-7.2,0L0,0" transform="translate(13.443 17.284)" fill="none" stroke="#fff" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/>
<path id="Vector-3" data-name="Vector" d="M0,0H46.091V46.091H0Z" fill="none" opacity="0"/>
<path id="Vector" d="M31.023,35.16H10.341C4.136,35.16,0,32.057,0,24.819V10.341C0,3.1,4.136,0,10.341,0H31.023c6.2,0,10.341,3.1,10.341,10.341V24.819C41.364,32.057,37.228,35.16,31.023,35.16Z" transform="translate(4.136 7.239)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-2" data-name="Vector" d="M20.682,0,14.209,5.171a6.547,6.547,0,0,1-7.756,0L0,0" transform="translate(14.477 18.614)" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
<path id="Vector-3" data-name="Vector" d="M0,0H49.637V49.637H0Z" fill="none" opacity="0"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 800 B

After

Width:  |  Height:  |  Size: 828 B

@ -2,7 +2,8 @@ import React, { useState } from "react";
import { BsExclamationSquareFill } from "react-icons/bs";
import { connect } from "react-redux";
import { Link } from "react-router-dom";
import imgPlaceHolder from "../../assets/img/photo-placeholder.png";
const ProductDesign = ({
colors,
@ -38,265 +39,397 @@ const ProductDesign = ({
btnOnClick,
catId,
isMobile,
onClick
onClick,
product,
}) => {
const [isHovering, setIsHovering] = useState(false);
// alert(catId);
let rulesAccepted = JSON.parse(
localStorage.getItem("userData")
).rulesAccepted;
const emkanat = [
{
title: 'دستشویی',
title: "دستشویی",
isActive: true,
},
{
title: 'آب خوری',
title: "آب خوری",
isActive: true,
},
{
title: 'تخته هوشمند',
title: "تخته هوشمند",
isActive: true,
},
{
title: 'کامپیوتر',
title: "کامپیوتر",
isActive: true,
},
{
title: 'کتابخانه',
title: "کتابخانه",
isActive: true,
},
{
title: 'مشاوره تحصیلی',
title: "مشاوره تحصیلی",
isActive: true,
},
{
title: 'آزمایشگاه',
title: "آزمایشگاه",
isActive: false,
},
]
];
let description = "دستشویی,کتابخانه,آزمایشگاه";
if (catId == 3) {
return (
<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' }}
<div
className={`flex flex-col pt-4 text-right rounded-xl justify-start w-full m-4 border border-red82OP${
isMobile && "w-11/12"
}`}
style={{ width: !isMobile && "100%", direction: "rtl" }}
>
<div className="border-b border-red82OP pb-2 px-4" onClick={onClick}>
<div className="border-b border-red82OP pb-2 px-4 ">
<h1 className="text-red52 text-lg font-bold">{productName}</h1>
<p className="text-red26 text-sm my-2">
در این قسمت یک توضیحات کوتاه در مورد دوره خواهد آمد که بصورت دو خط در این قسمت قرار میگیرد
<p
className="text-red26 text-sm my-2 h-10 w-full overflow-hidden text-ellipsis"
style={{
WebkitLineClamp: "2",
WebkitBoxOrient: "vertical",
display: "-webkit-box",
}}
>
{product?.description}
</p>
</div>
<div className="flex border-b border-red82OP px-4 py-2">
<div>
<h1 className="font-bold text-red26">
استاد : {teacher}
</h1>
<h1 className="font-bold text-red26">استاد : {teacher}</h1>
</div>
</div>
<div className="flex border-b border-red82OP px-4 py-2 text-red26" onClick={onClick}>
<div
className="flex border-b border-red82OP px-4 py-2 text-red26"
// onClick={onClick}
>
<h1>نوع گروه : A</h1>
</div>
<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 className="flex flex-col items-center justify-center">
{!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]"
>
تکمیل اطلاعات کاربری و افزودن به سبد خرید
</Link>
)}
{rulesAccepted && (
<div
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
className={`bg-pinkF5 text-red26 rounded-md w-36 border-2 border-red52 px-1 py-2 text-xs flex justify-center hover:bg-red52 hover:text-white
`}
>
<button className="" onClick={btnOnClick}>افزودن به سبد خرید</button>
<button className="" onClick={btnOnClick}>
افزودن به سبد خرید
</button>
</div>
)}
<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>
);
}
if (catId == 5) {
return (
<div className="w-full flex justify-center">
<div className={`flex ${isMobile ? 'flex-col w-11/12 border-red52' : 'border-red82OP pt-4'} border my-4 rounded-lg `} style={{width: !isMobile && '90%' }}>
<div className={` ${isMobile ? 'w-full h-24 ' : 'w-60 p-4 flex items-center justify-center' }`}>
<div className="w-full flex justify-center px-6">
<div
className={`flex ${
isMobile ? "flex-col w-11/12 border-red52" : "border-red82OP pt-4"
} border my-4 rounded-lg `}
style={{ width: !isMobile && "100%" }}
>
<div
className={` ${
isMobile
? "w-full h-24 "
: "w-60 p-4 flex items-center justify-center"
}`}
>
{/* image */}
<img src="https://fa.tripyar.com/uploads/picture/2977/2.jpg" className={` rounded-md ${isMobile ? 'rounded-b-none w-full h-full object-none' : ' bg-green-500'} `} />
</div>
<div className="flex flex-col text-right">
<h1 className="font-bold text-red52 border-b border-red82OP p-2 ">دبیرستان غیر انتفاعی مدرسان هوشمند</h1>
<p className={`font-bold ${isMobile ? 'text-xs text-center' : 'text-sm '} text-red26 border-b border-red82OP py-2`}>تهران خیابان انقلاب اسلامی حدفاصل ابوریحان و فلسطین پلاک2 </p>
<img
src={
product?.fileId
? `https://new.andishmand.ir/api/v1/file/${product?.fileId}`
: imgPlaceHolder
}
className={` rounded-md w-full ${
isMobile
? "rounded-b-none w-full h-full object-none"
: " bg-green-500"
} `}
/>
</div>
<div className="flex flex-col text-right" style={!isMobile?{width:"calc(100% - 15rem)"}:null}>
<h1 className="font-bold text-red52 border-b border-red82OP p-2 ">
{product?.name}
</h1>
<p
className={`font-bold ${
isMobile ? "text-xs text-center" : "text-sm "
} text-red26 border-b border-red82OP py-2`}
>
آدرس: {product?.address}
</p>
<div className="flex justify-between border-b border-red82OP ">
<div className={`border-l font-bold text-red26 ${isMobile ? 'flex justify-center items-center w-1/2 text-xs' : ' w-1/4 p-2 pr-0 text-sm'} border-red82OP `}>
شماره تلفن: ۰۲۱۶۶۴۵۶۷۳۸
<div
className={`border-l font-bold text-red26 ${
isMobile
? "flex justify-center items-center w-1/2 text-xs"
: " w-1/4 p-2 pr-0 text-sm"
} border-red82OP `}
>
شماره تلفن: {product?.phone}
</div>
<div className={`${isMobile ? 'text-xs ' : 'border-l text-sm'} font-bold flex justify-center w-1/2 text-red26 border-red82OP p-2 `}>
<div
className={`${
isMobile ? "text-xs " : "border-l text-sm"
} font-bold flex justify-center w-1/2 text-red26 border-red82OP p-2 `}
>
<p>
{!isMobile && ' آدرس وبسایت : '}
www.google.com</p>
{!isMobile && " آدرس وبسایت : "}
{product?.url}
</p>
</div>
{!isMobile && <div className="text-sm font-bold text-red26 p-2 w-1/4 text-center">
{!isMobile && (
<div className="text-sm font-bold text-red26 p-2 w-1/4 text-center">
آدرس بروی نقشه
</div>}
</div>
<div className={`flex ${isMobile && 'flex-col'}`}>
{isMobile && <h1 className="text-red52 text-sm font-bold p-2 pb-0">امکانات </h1>}
<div className={`w-${isMobile? 'full' : '3/5 pb-6'} flex flex-wrap border-l border-red82OP`}>
{!isMobile && 'امکانات :'}
{
emkanat.map((item, index) => (
<div className={`flex ${isMobile ? 'w-1/2 justify-start text-xs font-bold' : 'justify-center text-sm'} items-center p-1 px-2`} key={`SCHOOL_SPE__${index}`}>
<div className={`${isMobile ? 'w-4 h-4' : 'w-6 h-6'} text-white ml-1 rounded-full flex justify-center items-center ${item.isActive ? 'bg-green17' : 'bg-gray-200'}`}>
)}
</div>
<div className={`flex w-full ${isMobile && "flex-col"}`}>
{isMobile && (
<h1 className="text-red52 text-sm font-bold p-2 pb-0">
امکانات{" "}
</h1>
)}
<div
className={`w-3/5 pb-6"
flex flex-wrap border-l border-red82OP`}
style={
isMobile ? { width: "100%", paddingBottom: "0px" } : null
}
>
{!isMobile && "امکانات :"}
<svg width="37" height="37" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7.75 12L10.58 14.83L16.25 9.17004" stroke="#fff" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
{product?.description?.split(",").map((item, index) => (
<div
className={`flex ${
isMobile
? "w-1/2 justify-start text-xs font-bold"
: "justify-center text-sm"
} items-center p-1 px-2`}
key={`SCHOOL_SPE__${index}`}
>
<div
className={`${
isMobile ? "w-4 h-4" : "w-6 h-6"
} text-white ml-1 rounded-full flex justify-center items-center ${"bg-green17"}`}
>
<svg
width="37"
height="37"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M7.75 12L10.58 14.83L16.25 9.17004"
stroke="#fff"
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
</div>
<p>{item.title}</p>
<p>{item}</p>
</div>
))
}
{isMobile &&
))}
{isMobile && (
<div className="w-full border-t border-red82OP flex items-center justify-center h-16">
<h1 className="font-black text-sm text-red26 ">مشاهده آدرس بروی نقشه</h1>
</div>}
<h1 className="font-black text-sm text-red26 ">
مشاهده آدرس بروی نقشه
</h1>
</div>
<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>
)}
</div>
<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>
<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]"
>
تکمیل اطلاعات کاربری و رزرو پیش ثبت نام
</Link>
)}
{rulesAccepted && (
<div
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>
</div>
)}
</div>
</div>
</div>
</div>
</div>
</div>
)
);
}
if(catId == 2){
return(
<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' }}
if (catId == 2) {
return (
<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" }}
>
<div className="border-b border-red82OP pb-2 px-4" onClick={onClick}>
<h1 className="text-red52 text-lg font-bold">آزمون {productName}</h1>
<p className="text-red26 text-sm my-2">
در این قسمت یک توضیحات کوتاه در مورد دوره خواهد آمد که بصورت دو خط در این قسمت قرار میگیرد
در این قسمت یک توضیحات کوتاه در مورد دوره خواهد آمد که بصورت دو خط
در این قسمت قرار میگیرد
</p>
</div>
<div className="flex border-b border-red82OP text-center" onClick={onClick}>
<div
className="flex border-b border-red82OP text-center"
onClick={onClick}
>
<div className="w-1/2 border-l border-red82OP py-2 ">
<h1 className="font-bold text-red26">
نوع آزمون : آنلاین
</h1>
<h1 className="font-bold text-red26">نوع آزمون : آنلاین</h1>
</div>
<div className="w-1/2 py-2 " onClick={onClick}>
<h1 className="font-bold text-red26">
بودجه بندی آزمون
</h1>
<h1 className="font-bold text-red26">بودجه بندی آزمون</h1>
</div>
</div>
<div className="flex border-b border-red82OP text-center text-xs" onClick={onClick}>
<div className="w-1/2 border-l border-red82OP py-2 " onClick={onClick}>
<h1 className="font-bold text-red26">
تاریخ برگزاری : 1400/02/13
</h1>
<div
className="flex border-b border-red82OP text-center text-xs"
onClick={onClick}
>
<div
className="w-1/2 border-l border-red82OP py-2 "
onClick={onClick}
>
<h1 className="font-bold text-red26">تاریخ برگزاری : 1400/02/13</h1>
</div>
<div className="w-1/2 py-2 " onClick={onClick}>
<h1 className="font-bold text-red26">
تعداد آزمون : 18
</h1>
<h1 className="font-bold text-red26">تعداد آزمون : 18</h1>
</div>
</div>
<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
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>
</div>
</div>
</div>
)
);
}
if(catId == 1){
if (catId == 1) {
return (
<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' }}
<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" }}
>
<img
src="https://narafella.ir/wp-content/uploads/2021/08/books-min.jpg"
className="rounded-t-xl"
onClick={onClick}
/>
<img src="https://narafella.ir/wp-content/uploads/2021/08/books-min.jpg" className="rounded-t-xl" onClick={onClick}/>
<div className={`border-b border-red82OP py-2 px-4 ${isMobile ? 'bg-blueFF text-right' : 'text-center '}`} onClick={onClick}>
<h1 className={`text-${isMobile ? 'blueE3' : 'blue-5F'} text-lg font-bold`}>کتاب {productName}</h1>
<div
className={`border-b border-red82OP py-2 px-4 ${
isMobile ? "bg-blueFF text-right" : "text-center "
}`}
onClick={onClick}
>
<h1
className={`text-${
isMobile ? "blueE3" : "blue-5F"
} text-lg font-bold`}
>
کتاب {productName}
</h1>
<p className="text-blue7E text-sm mb-2">
در این قسمت یک توضیحات کوتاه در مورد دوره خواهد آمد که بصورت دو خط در این قسمت قرار میگیرد
در این قسمت یک توضیحات کوتاه در مورد دوره خواهد آمد که بصورت دو خط
در این قسمت قرار میگیرد
</p>
</div>
<div className="flex justify-between px-4 items-center">
<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
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
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
`}
>
<button onClick={btnOnClick}>افزودن به سبد خرید</button>
</div>
</div>
</div>
)
}
else{
return <div></div>
);
} else {
return <div></div>;
}
};
const mapStateToProps = (state) => ({
isMobile: state.publicApi.isMobile,
});
const mapDispatchToProps = ({});
const mapDispatchToProps = {};
export default connect(mapStateToProps, mapDispatchToProps)(ProductDesign);
ProductDesign.defaultProps = {
// icons on product image
colors: false,
@ -334,5 +467,5 @@ ProductDesign.defaultProps = {
//میتونیم تعیین کنیم که قیمت و دکمه اضاف به سبد خرید کنار یکدیگر باشند یا زیر هم
priceDirection: "flex-row",
// productImg: book,
writeGHEIMAT: false
writeGHEIMAT: false,
};

@ -39,11 +39,12 @@ function ShoppingCart({
getFactorInfo({userId});
setHeaderOptions(headerOptions);
}, []);
console.log("Cart----------======================-------------------");
console.log(schoolList);
return(isMobile ?
<div className="w-full flex flex-col justify-between items-center bg-gray-200 rtl left-0 pt-24" 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%'}}>
{
schoolList.map((school, index) => (
@ -135,7 +136,7 @@ function ShoppingCart({
:
<div className="flex flex-col justify-between items-center bg-gray-100 left-0 pt-24" style={{height: '100vh'}}>
<div className="flex flex-col justify-between items-center bg-gray-100 left-0 pt-14" style={{height: '100vh'}}>
<div className={`w-full flex items-center flex-col ${list?.length > 1 && 'overflow-x-hidden overflow-scroll'}`} style={{height: '60%'}}>
{
schoolList.map((school, index) => (

@ -36,86 +36,185 @@ const Header = ({
setUserStatus()
}, [])
let UserData =JSON.parse(localStorage.getItem("userData"));
return (
<>
<div className={`header w-full h-[6.5%] bg-white fixed top-0 left-0 flex items-center ${!isMobile ? 'shadow-md z-10' : 'z-40'}`}>
{
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={`header w-full h-[6.5%] bg-white fixed top-0 left-0 flex items-center ${
!isMobile ? "shadow-md z-10" : "z-40"
}`}
>
{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 className="flex items-center rtl text-right w-full py-2">
<img
src={
UserData.picFileId
? `https://new.andishmand.ir/api/v1/file/${UserData.picFileId}`
: profileIcon
}
/>
{UserData?.displayName || "نامشخص"} ({" "}
{UserData?.job || "دانش آموز"} )
</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 to='/adminpanel/add-exam' onClick={() => setSubMenu(false)} className='w-full text-right border-b border-gray-200 py-2'>
ورود به صفحه افزودن آزمون
</Link> */}
<Link to='/register' 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>
</div>
}
{
isMobile ?
<div className='flex w-full items-center justify-between rtl px-4'>
)}
{isMobile ? (
<div className="flex w-full items-center justify-between rtl px-4">
<div onClick={() => setMenuPopup(!menuPopup)}>
<svg width="35" height="35" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3 5H21" stroke="#df1452" strokeWidth="1.5" strokeLinecap="round" />
<path d="M3 10H21" stroke="#df1452" strokeWidth="1.5" strokeLinecap="round" />
<path d="M3 15H21" stroke="#df1452" strokeWidth="1.5" strokeLinecap="round" />
<path d="M3 20H21" stroke="#df1452" strokeWidth="1.5" strokeLinecap="round" />
<svg
width="35"
height="35"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3 5H21"
stroke="#df1452"
strokeWidth="1.5"
strokeLinecap="round"
/>
<path
d="M3 10H21"
stroke="#df1452"
strokeWidth="1.5"
strokeLinecap="round"
/>
<path
d="M3 15H21"
stroke="#df1452"
strokeWidth="1.5"
strokeLinecap="round"
/>
<path
d="M3 20H21"
stroke="#df1452"
strokeWidth="1.5"
strokeLinecap="round"
/>
</svg>
</div>
<Link to='/'> <img src={logoIcon} className="h-10" /> </Link>
{
location.pathname.includes('messages') ? (
<div onClick={() => navigate(-1)} className="w-8 h-8 bg-red-100 rounded-md flex items-center justify-center">
<Link to="/">
{" "}
<img src={logoIcon} className="h-10" />{" "}
</Link>
{location.pathname.includes("messages") ? (
<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" />
</div>
) : (
<Link to='/shoppingCart'>
<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>
<svg width="35" height="35" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7.5 7.67001V6.70001C7.5 4.45001 9.31 2.24001 11.56 2.03001C14.24 1.77001 16.5 3.88001 16.5 6.51001V7.89001" stroke="#df1452" strokeWidth="1.5" strokeMiterlimit="10" strokeLinecap="round" strokeLinejoin="round" />
<path d="M8.99999 22H15C19.02 22 19.74 20.39 19.95 18.43L20.7 12.43C20.97 9.99 20.27 8 16 8H7.99999C3.72999 8 3.02999 9.99 3.29999 12.43L4.04999 18.43C4.25999 20.39 4.97999 22 8.99999 22Z" stroke="#df1452" strokeWidth="1.5" strokeMiterlimit="10" strokeLinecap="round" strokeLinejoin="round" />
<path d="M15.4955 12H15.5045" stroke="#df1452" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
<path d="M8.49451 12H8.50349" stroke="#df1452" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
<Link to="/shoppingCart">
<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>
<svg
width="35"
height="35"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M7.5 7.67001V6.70001C7.5 4.45001 9.31 2.24001 11.56 2.03001C14.24 1.77001 16.5 3.88001 16.5 6.51001V7.89001"
stroke="#df1452"
strokeWidth="1.5"
strokeMiterlimit="10"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M8.99999 22H15C19.02 22 19.74 20.39 19.95 18.43L20.7 12.43C20.97 9.99 20.27 8 16 8H7.99999C3.72999 8 3.02999 9.99 3.29999 12.43L4.04999 18.43C4.25999 20.39 4.97999 22 8.99999 22Z"
stroke="#df1452"
strokeWidth="1.5"
strokeMiterlimit="10"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M15.4955 12H15.5045"
stroke="#df1452"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M8.49451 12H8.50349"
stroke="#df1452"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
</div>
</Link>
)
}
</div> :
)}
</div>
) : (
<>
{location.pathname.includes('adminpanel') ? <div></div> :
{location.pathname.includes("adminpanel") ? (
<div></div>
) : (
<>
<div className="header-profile h-full flex items-center">
<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">
<img src={avatar1} alt="avatar1" className='w-full' />
<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-white ml-2 rounded-full overflow-hidden">
<img
src={
UserData.picFileId
? `https://new.andishmand.ir/api/v1/file/${UserData.picFileId}`
: profileIcon
}
alt="avatar1"
className="w-full"
/>
</div>
<div className="header-profile-text-container w-fit text-right ml-4">
<div className="header-profile-text-container-name text-sm">
{user.displayName ? user.displayName : user?.firstName + ' ' + user?.lastName}
{user.displayName
? user.displayName
: user?.firstName + " " + user?.lastName}
</div>
<div className="header-profile-text-container-role text-xs">
{grades[user.gradeIds]}
</div>
</div>
</div>
<div className="header-line w-px h-[90%] bg-color1 ml-6"></div>
<div className="header-date-and-time text-right ml-6">
<Clock />
<div className="header-date-and-date text-sm">
<span className="header-date-and-date-text1 text-color3 ml-2">
@ -134,9 +233,9 @@ const Header = ({
</div>
<div className="header-line w-px h-[90%] bg-color1 ml-6"></div>
</>
}
)}
</>
}
)}
{/* <div className="header-search w-[51.5%] h-full ml-6 flex items-center">
<img src={searchIcon} alt="searchIcon" className="header-search-icon" />
@ -148,34 +247,33 @@ const Header = ({
/>
</div> */}
</div>
{
isMobile && menuPopup &&
{isMobile && menuPopup && (
<>
<div className='h-screen top-0 w-full z-30 backdrop-blur bg-black bg-opacity-20 fixed'></div>
<div className='w-full flex'>
<MobileSideMenu profilePic={avatar1} users={[
<div className="h-screen top-0 w-full z-30 backdrop-blur bg-black bg-opacity-20 fixed"></div>
<div className="w-full flex">
<MobileSideMenu
profilePic={avatar1}
users={[
{
name: user?.displayName,
title: grades[user.gradeIds]
title: grades[user.gradeIds],
},
{
name: 'کوروش زراندوز',
title: 'پادشاه کوروش توپیا'
name: "کوروش زراندوز",
title: "پادشاه کوروش توپیا",
},
]}
close={() => setMenuPopup(false)}
/>
<button className='flex items-center justify-center fixed z-40 top-10 left-3 text-xl font-bold text-red52 w-12 h-12 rounded-xl '
<button
className="flex items-center justify-center fixed z-40 top-10 left-3 text-xl font-bold text-red52 w-12 h-12 rounded-xl "
onClick={() => setMenuPopup(false)}
>
<img src={exitIcon} className="w-full" />
</button>
</div>
</>
}
)}
</>
);
}

@ -10,6 +10,14 @@ import { Link, useLocation } from "react-router-dom";
import MinimalNav from "./minimalNav";
import { user } from "../../redux/actions";
import navIcon1 from "../../assets/img/vuesax-linear-element-equal.svg";
import navIcon1_w from "../../assets/img/vuesax-linear-element-equal2.svg";
import navIcon2 from "../../assets/img/vuesax-linear-myService.svg";
import navIcon2_w from "../../assets/img/vuesax-linear-myService2.svg";
import navIcon3 from "../../assets/img/vuesax-linear-sms1.svg";
import navIcon3_w from "../../assets/img/vuesax-linear-sms2.svg";
import navIcon4 from "../../assets/img/vuesax-linear-map.svg";
import navIcon4_w from "../../assets/img/vuesax-linear-map2.svg";
// defineLordIconElement(loadAnimation);
// let oldNavItemId = 1;
@ -165,12 +173,10 @@ useEffect(() => {
</div>
)
} else {
return (
type === "default" ?
return type === "default" ? (
<div className="nav h-full w-[6.5%] fixed top-0 right-0 z-20 overflow-hidden bg-grayEC border-l border-l-color1">
<div className="h-1/6 flex items-center">
<img src={logo} alt="logo" className="logo w-full" />
</div>
<div
className="back-item-img w-full h-[12.5%] bg-red52 absolute right-0 z-20 transition-all duration-300"
@ -186,7 +192,7 @@ useEffect(() => {
{/* ------------ */}
<div className="nav-menu-container w-full h-3/4 flex-col items-center absolute z-30 right-0">
<Link
{/* <Link
to="/"
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(1)}
@ -248,167 +254,93 @@ useEffect(() => {
className="nav-menu-container-item-title px-2"
style={1 === navId ? { color: "#fff", fontSize: '0.7vw' } : { color: "#A5A8AB", fontSize: '0.7vw' }}
>
منوی اصلی
پیشخوان
</div>
</Link>
</Link> */}
{/* ---------- */}
<Link
to="/services"
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(2)}
onClick={() => chaneNav(1)}
>
<div className="flex items-center justify-center" style={{width: '7vw'}}>
<svg
id="empty-wallet"
xmlns="http://www.w3.org/2000/svg"
width="46.091"
height="46.091"
viewBox="0 0 46.091 46.091"
className="nav-menu-container-item-img w-2/6"
<div
className="flex items-center justify-center"
style={{ width: "7vw" }}
>
<g id="Group" transform="translate(4.801 3.929)">
<path
id="Vector"
d="M29.844,11.139a3.857,3.857,0,0,0-1.152,3.13A4.1,4.1,0,0,0,32.84,17.86h3.649v2.285a7.237,7.237,0,0,1-7.221,7.221H7.221A7.237,7.237,0,0,1,0,20.146V7.221A7.237,7.237,0,0,1,7.221,0H29.268a7.237,7.237,0,0,1,7.221,7.221V9.986H32.61A3.827,3.827,0,0,0,29.844,11.139Z"
transform="translate(0 10.955)"
fill="none"
stroke={navId === 2 ? "#fff" : "#a5a8ab"}
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
/>
<path
id="Vector-2"
data-name="Vector"
d="M0,19.9V11.128A5.469,5.469,0,0,1,3.534,6L18.782.239a3.649,3.649,0,0,1,4.936,3.418v7.3"
transform="translate(0 0)"
fill="none"
stroke={navId === 2 ? "#fff" : "#a5a8ab"}
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
/>
</g>
<path
id="Vector-3"
data-name="Vector"
d="M9.85,1.959V5.915A1.972,1.972,0,0,1,7.93,7.874H4.166A4.1,4.1,0,0,1,.018,4.283,3.857,3.857,0,0,1,1.17,1.152,3.827,3.827,0,0,1,3.935,0H7.93A1.972,1.972,0,0,1,9.85,1.959Z"
transform="translate(33.473 24.87)"
fill="none"
stroke={navId === 2 ? "#fff" : "#a5a8ab"}
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
/>
<path
id="Vector-4"
data-name="Vector"
d="M0,0H13.443"
transform="translate(13.443 23.046)"
fill="none"
stroke={navId === 2 ? "#fff" : "#a5a8ab"}
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
/>
<path
id="Vector-5"
data-name="Vector"
d="M0,0H46.091V46.091H0Z"
fill="none"
opacity="0"
/>
</svg>
{navId !== 1 && (
<img src={navIcon1} alt="navIcon1" className="w-[30px]" />
)}
{navId === 1 && (
<img src={navIcon1_w} alt="navIcon1" className="w-[30px]" />
)}
</div>
<div
className="nav-menu-container-item-title px-2 "
style={2 === navId ? { color: "#fff", fontSize: '0.7vw' } : { color: "#A5A8AB", fontSize: '0.7vw' }}
style={
1 === navId
? { color: "#fff", fontSize: "0.7vw" }
: { color: "#A5A8AB", fontSize: "0.7vw" }
}
>
انتخاب خدمات
</div>
</Link>
{/* ---------- */}
<Link
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"
onClick={() => chaneNav(3)}
onClick={() => chaneNav(2)}
>
<div className="w-20 flex items-center justify-center" style={{width: '7vw'}}>
<svg id="vuesax_linear_setting-2" data-name="vuesax/linear/setting-2" xmlns="http://www.w3.org/2000/svg" width="37.091" height="37.091" viewBox="0 0 46.091 46.091">
<g id="setting-2">
<path id="Vector" d="M11.523,5.761A5.761,5.761,0,1,1,5.761,0,5.761,5.761,0,0,1,11.523,5.761Z" transform="translate(17.284 17.284)" fill="none" stroke={navId === 3 ? "#fff" : "#a5a8ab"} strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" />
<path id="Vector-2" data-name="Vector" d="M0,19.817v-3.38a3.66,3.66,0,0,1,3.649-3.649c3.476,0,4.9-2.458,3.15-5.473A3.647,3.647,0,0,1,8.143,2.341L11.465.44a3.205,3.205,0,0,1,4.379,1.152l.211.365c1.728,3.015,4.571,3.015,6.318,0l.211-.365A3.205,3.205,0,0,1,26.963.44l3.322,1.9A3.647,3.647,0,0,1,31.63,7.315c-1.748,3.015-.326,5.473,3.15,5.473a3.66,3.66,0,0,1,3.649,3.649v3.38a3.66,3.66,0,0,1-3.649,3.649c-3.476,0-4.9,2.458-3.15,5.473a3.643,3.643,0,0,1-1.344,4.974l-3.322,1.9a3.205,3.205,0,0,1-4.379-1.152l-.211-.365c-1.728-3.015-4.571-3.015-6.318,0l-.211.365a3.205,3.205,0,0,1-4.379,1.152l-3.322-1.9A3.647,3.647,0,0,1,6.8,28.939c1.748-3.015.326-5.473-3.15-5.473A3.66,3.66,0,0,1,0,19.817Z" transform="translate(3.841 4.919)" fill="none" stroke={navId === 3 ? "#fff" : "#a5a8ab"} strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" />
<path id="Vector-3" data-name="Vector" d="M0,0H46.091V46.091H0Z" fill="none" opacity="0" />
</g>
</svg>
<div
className="w-20 flex items-center justify-center"
style={{ width: "7vw" }}
>
{navId !== 2 && (
<img src={navIcon2} alt="navIcon1" className="w-[30px]" />
)}
{navId === 2 && (
<img src={navIcon2_w} alt="navIcon1" className="w-[30px]" />
)}
</div>
<div
className="nav-menu-container-item-title text-sm"
style={3 === navId ? { color: "#fff", fontSize: '0.7vw' } : { color: "#A5A8AB", fontSize: '0.7vw' }}
style={
2 === navId
? { color: "#fff", fontSize: "0.7vw" }
: { color: "#A5A8AB", fontSize: "0.7vw" }
}
>
خدمات من
</div>
</Link>
{/* ---------- */}
<Link
to="/messages"
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(4)}
onClick={() => chaneNav(3)}
>
<div className="flex items-center justify-center" style={{width: '7vw'}}>
<svg
id="vuesax_linear_sms"
data-name="vuesax/linear/sms"
xmlns="http://www.w3.org/2000/svg"
width="46.091"
height="46.091"
viewBox="0 0 46.091 46.091"
className="nav-menu-container-item-img w-2/6"
<div
className="flex items-center justify-center"
style={{ width: "7vw" }}
>
<g id="sms">
<path
id="Vector"
d="M28.807,32.648H9.6c-5.761,0-9.6-2.881-9.6-9.6V9.6C0,2.881,3.841,0,9.6,0h19.2c5.761,0,9.6,2.881,9.6,9.6V23.046C38.409,29.767,34.568,32.648,28.807,32.648Z"
transform="translate(3.841 6.722)"
fill="none"
stroke={navId === 4 ? "#fff" : "#a5a8ab"}
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
/>
<path
id="Vector-2"
data-name="Vector"
d="M19.2,0,13.194,4.8a6.08,6.08,0,0,1-7.2,0L0,0"
transform="translate(13.443 17.284)"
fill="none"
stroke={navId === 4 ? "#fff" : "#a5a8ab"}
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
/>
<path
id="Vector-3"
data-name="Vector"
d="M0,0H46.091V46.091H0Z"
fill="none"
opacity="0"
/>
</g>
</svg>
{navId !== 3 && (
<img src={navIcon3} alt="navIcon1" className="w-[30px]" />
)}
{navId === 3 && (
<img src={navIcon3_w} alt="navIcon1" className="w-[30px]" />
)}
</div>
<div
className="nav-menu-container-item-title text-sm"
style={4 === navId ? { color: "#fff", fontSize: '0.7vw' } : { color: "#A5A8AB", fontSize: '0.7vw' }}
style={
3 === navId
? { color: "#fff", fontSize: "0.7vw" }
: { color: "#A5A8AB", fontSize: "0.7vw" }
}
>
چت با اساتید
</div>
@ -418,32 +350,27 @@ useEffect(() => {
<Link
to="/contacts"
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(5)}
onClick={() => chaneNav(4)}
>
<svg id="vuesax_linear_calculator" data-name="vuesax/linear/calculator" xmlns="http://www.w3.org/2000/svg" width="36.091" height="36.091" viewBox="0 0 46.091 46.091">
<g id="calculator" transform="translate(0)">
<path id="Vector" d="M13.443,38.409h7.682c9.6,0,13.443-3.841,13.443-13.443V13.443C34.568,3.841,30.727,0,21.125,0H13.443C3.841,0,0,3.841,0,13.443V24.966C0,34.568,3.841,38.409,13.443,38.409Z" transform="translate(5.761 3.841)" fill="none" stroke={navId === 5 ? "#fff" : "#a5a8ab"} strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" />
<path id="Vector-2" data-name="Vector" d="M17.284,2.881V4.8A2.889,2.889,0,0,1,14.4,7.682H2.881A2.889,2.889,0,0,1,0,4.8V2.881A2.889,2.889,0,0,1,2.881,0H14.4A2.877,2.877,0,0,1,17.284,2.881Z" transform="translate(14.403 11.676)" fill="none" stroke={navId === 5 ? "#fff" : "#a5a8ab"} strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" />
<path id="Vector-3" data-name="Vector" d="M.636.5H.658" transform="translate(14.989 26.387)" fill="none" stroke={navId === 5 ? "#fff" : "#a5a8ab"} strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" />
<path id="Vector-4" data-name="Vector" d="M.636.5H.658" transform="translate(22.4 26.387)" fill="none" stroke={navId === 5 ? "#fff" : "#a5a8ab"} strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" />
<path id="Vector-5" data-name="Vector" d="M.636.5H.658" transform="translate(29.812 26.387)" fill="none" stroke={navId === 5 ? "#fff" : "#a5a8ab"} strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" />
<path id="Vector-6" data-name="Vector" d="M.636.5H.658" transform="translate(14.989 33.108)" fill="none" stroke={navId === 5 ? "#fff" : "#a5a8ab"} strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" />
<path id="Vector-7" data-name="Vector" d="M.636.5H.658" transform="translate(22.4 33.108)" fill="none" stroke={navId === 5 ? "#fff" : "#a5a8ab"} strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" />
<path id="Vector-8" data-name="Vector" d="M.636.5H.658" transform="translate(29.812 33.108)" fill="none" stroke={navId === 5 ? "#fff" : "#a5a8ab"} strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" />
<path id="Vector-9" data-name="Vector" d="M0,0H46.091V46.091H0Z" transform="translate(46.091 46.091) rotate(180)" fill="none" opacity="0" />
</g>
</svg>
{navId !== 4 && (
<img src={navIcon4} alt="navIcon1" className="w-[30px]" />
)}
{navId === 4 && (
<img src={navIcon4_w} alt="navIcon1" className="w-[30px]" />
)}
<div
className="nav-menu-container-item-title text-sm"
style={5 === navId ? { color: "#fff" , fontSize: '0.7vw' } : { color: "#A5A8AB", fontSize: '0.7vw' }}
style={
4 === navId
? { color: "#fff", fontSize: "0.7vw" }
: { color: "#A5A8AB", fontSize: "0.7vw" }
}
>
پشتیبانی
تماس با ما
</div>
</Link>
<Link
to="/"
className="nav-menu-container-item w-full h-1/6 flex flex-col items-center justify-center hover:bg-color2_5 cursor-pointer"
@ -503,20 +430,23 @@ useEffect(() => {
</svg>
<div
className="nav-menu-container-item-title text-sm translate-y-[-10%]"
style={6 === navId ? { color: "#fff", fontSize: '0.7vw' } : { color: "#A5A8AB", fontSize: '0.7vw' }}
style={
6 === navId
? { color: "#fff", fontSize: "0.7vw" }
: { color: "#A5A8AB", fontSize: "0.7vw" }
}
>
خروج
</div>
</Link>
</div>
</div> : type === 'minimal' ?
</div>
) : type === "minimal" ? (
//MINIMAL
<MinimalNav logOut={logOut}/>
: <div></div>
<MinimalNav logOut={logOut} />
) : (
<div></div>
);
}
};

@ -41,9 +41,10 @@ export default function user(state = initialState, action) {
return { ...state, loading: false, status: data.profile, error: null };
case "user/login":
case "user/otp/login":
if (data.profile.username == null) {
window.location.replace('/register')
}
window.location.replace("/services");
// if (data.profile.username == null) {
// window.location.replace("/services");
// }
return {
...state,
loading: false,

@ -0,0 +1,224 @@
import { useState } from "react";
import { toast } from "react-toastify";
import logo from "../../assets/img/logo.png";
import backIcon from "../../assets/img/vuesax-linear-arrow-left.svg";
const SignUpBox = ({ setSignUp }) => {
const [step, setStep] = useState(0);
const [data, setData] = useState(null);
const submitHandler = () => {
let input = document.querySelectorAll("input");
let firstName = input[0].value;
let lastName = input[1].value;
let nationalId = input[2].value;
let cellphone = input[3].value;
if (firstName.length < 1) {
toast.error("لطفاً نام دانشاموز را وارد کنید");
} else if (lastName.length < 1) {
toast.error("لطفاً نام خانوادگی دانشاموز را وارد کنید");
} else if (nationalId.length < 10) {
toast.error("لطفاً کد ملی دانشاموز را وارد کنید");
} else if (cellphone.length < 11) {
toast.error("لطفاً شماره موبایل را به درستی وارد کنید");
} else {
setData({
firstName,
lastName,
nationalId,
cellphone,
});
setStep(1);
}
};
//backHandler---------------------
const backHandler = () => {
if (step === 1) {
setStep(0);
} else {
setSignUp(false);
}
};
//codeFocuseHandler--------------
const codeFocuseHandler=(index)=>{
let box = document.querySelectorAll(".codeInput");
if(index!==3){
box[index+1].focus()
}else{
if(box[0].value!=="" && box[1].value!=="" && box[2].value!=="" && box[3].value!==""){
let code = Number(
box[0].value + box[1].value + box[2].value + box[3].value
);
alert(code);
}
//api send
}
}
return (
<div className="SignUpBox w-full h-full flex flex-col items-center justify-center bg-white absolute top-0 left-0 rounded-lg ">
{/* ---------back-btn-------------- */}
<div
className="w-12 h-12 rounded-lg bg-[#F1F1F1] flex items-center justify-center absolute top-5 left-5 cursor-pointer"
onClick={backHandler}
>
<img src={backIcon} alt="backIcon" className="w-2/4" />
</div>
{/* ---logo----- */}
<img src={logo} alt="logo" className="w-1/3" />
{/* -----title--- */}
<div
className="w-[85%] text-[#521326] text-lg font-bold mt-5 text-right"
style={{ direction: "rtl" }}
>
{step === 0 ? "ثبت نام" : "تائیدیه ثبتنام"}
</div>
{/* -----form--- */}
{step === 0 && (
<div className="w-[85%]">
<Input label="نام دانشآموز" index={0} />
<Input label="نام خانوادگی دانشآموز" index={1} />
<Input label="کد ملی دانشآموز" index={2} />
<Input label="شماره موبایل" index={3} />
</div>
)}
{/* -------SendCodeText----------- */}
{step === 1 && <SendCodeAgain cellphone={data.cellphone} />}
{/* ----------code----------------- */}
{step === 1 && (
<div className="w-[85%] flex items-center justify-between mt-5" style={{direction:"ltr"}}>
<input
type="text"
name="codeInput"
className="codeInput w-[20%] aspect-square rounded-lg bg-[#FFF6F6] flex items-center justify-center outline-0 text-center text-[#DF1452] text-xl"
maxLength={1}
onChange={() => codeFocuseHandler(0)}
/>
<input
type="text"
name="codeInput"
className="codeInput w-[20%] aspect-square rounded-lg bg-[#FFF6F6] flex items-center justify-center outline-0 text-center text-[#DF1452] text-xl"
maxLength={1}
onChange={() => codeFocuseHandler(1)}
/>
<input
type="text"
name="codeInput"
className="codeInput w-[20%] aspect-square rounded-lg bg-[#FFF6F6] flex items-center justify-center outline-0 text-center text-[#DF1452] text-xl"
maxLength={1}
onChange={() => codeFocuseHandler(2)}
/>
<input
type="text"
name="codeInput"
className="codeInput w-[20%] aspect-square rounded-lg bg-[#FFF6F6] flex items-center justify-center outline-0 text-center text-[#DF1452] text-xl"
maxLength={1}
onChange={() => codeFocuseHandler(3)}
/>
</div>
)}
{/* -----btn--- */}
{step === 0 && (
<div
className="w-[85%] h-[50px] rounded-lg bg-[#DF1452] flex items-center justify-center text-lg text-white mt-5 cursor-pointer"
onClick={submitHandler}
>
ثبت اطلاعات و دریافت کد
</div>
)}
{step === 1 && (
<div
className="w-[85%] h-[50px] rounded-lg bg-[#DF1452] flex items-center justify-center text-lg text-white mt-5 cursor-pointer"
// onClick={submitHandler}
>
تایید
</div>
)}
</div>
);
};
export default SignUpBox;
//----------------------------------
const Input = ({ label,index }) => {
const onFocushandler=(i)=>{
let box = document.querySelectorAll(".Input");
let label = document.querySelectorAll(".Input-label");
let line = document.querySelectorAll(".line");
box[i].style.borderColor = "#DF1452";
label[i].style.color = "#DF1452";
label[i].style.fontSize = "12px";
if(window.innerWidth>1270){
label[i].style.transform = "translate(-15px,-25px)";
}else{
label[i].style.transform = "translate(-15px,-20px)";
}
line[i].style.display="block";
}
const onBlurHandler = (e,i) => {
if(e.target.value.length===0){
let box = document.querySelectorAll(".Input");
let label = document.querySelectorAll(".Input-label");
let line = document.querySelectorAll(".line");
box[i].style.borderColor = "#ECECEC";
label[i].style.color = "#8A8A8A";
label[i].style.fontSize = "16px";
label[i].style.transform = "translate(0px,0px)";
line[i].style.display = "none";
}
};
return (
<div className="Input w-full h-[40px] res1_2:h-[50px] relative border border-[#ECECEC] rounded-lg mt-5 flex items-center box-border">
<div
className="line h-[2px] absolute top-[-1.5px] rigth-[5%] bg-white right-[20px] hidden"
style={{ width: `${label.length * 6}px` }}
></div>
<input
type="text"
className="w-full h-full absolute top-0 right-0 outline-0 outline-transparent rounded-lg bg-transparent px-5 text-lg text-[#DF1452]"
onFocus={() => onFocushandler(index)}
onBlur={(e) => onBlurHandler(e, index)}
/>
<div className="Input-label text-[#8A8A8A] absolute right-[10px] pointer-events-none transition-all duration-300 ease-out">
{label}
</div>
</div>
);
};
//--------------------------------------
const SendCodeAgain = ({cellphone}) => {
const [min, setMin] = useState(2);
const [sec, setSec] = useState(30);
const [showBtn, setShowbtn] = useState(false);
setTimeout(() => {
if (sec === 0 && min === 0) {
setShowbtn(true);
}
if (sec === 0 && !showBtn) {
setSec(59);
setMin(min - 1);
} else {
setSec(sec - 1);
}
}, 1000);
return (
<>
{!showBtn && (
<div className="Code-container-send-code-again mt-6 text-sm w-[85%] text-right">
تا {min}:{sec} دیگر یک کد 4 رقمی به شماره {cellphone} ارسال خواهد شد. لطفا کد
را در کادر زیر وارد کنید
</div>
)}
{showBtn && (
<div className="Code-container-send-code-again mt-6 text-sm w-[85%] text-right cursor-pointer hover:text-red1">
ارسال مجدد کد
</div>
)}
</>
);
};

@ -1,25 +1,26 @@
import React, { useEffect, useState, useRef } from "react";
import { Link } from "react-router-dom";
import logo from "../../assets/img/logo.png";
import firstPic from '../../assets/img/undraw_professor_-8-lrt.svg';
import secondPic from '../../assets/img/undraw_quiz_nlyh.svg';
import thirdPic from '../../assets/img/undraw_certificate_re_yadi.svg';
import { Slide } from 'react-slideshow-image';
import './index.css';
import firstPic from "../../assets/img/undraw_professor_-8-lrt.svg";
import secondPic from "../../assets/img/undraw_quiz_nlyh.svg";
import thirdPic from "../../assets/img/undraw_certificate_re_yadi.svg";
import { Slide } from "react-slideshow-image";
import "./index.css";
import VerificationInput from "../../components/verificationInput";
import { useNavigate } from "react-router-dom";
import Input from "../../components/input/signUpInput";
import onInput from "../../utils/onInput";
import Timer from "../../components/Timer";
import LoginSignUpMobile from './mobile'
import LoginSignUpMobile from "./mobile";
import { connect } from "react-redux";
import { user, publicApi } from "../../redux/actions";
import axios from "axios";
import { ApiConfig } from "../../constants/defaultValues";
import SignUpBox from "./SignUpBox";
const LoginSignUp = ({ activeLogin,
const LoginSignUp = ({
activeLogin,
sendOtp,
sendPhoneNumber,
loginFlag,
@ -27,13 +28,15 @@ const LoginSignUp = ({ activeLogin,
headerOptions,
setHeaderOptions,
isMobile,
bnLogin
bnLogin,
}) => {
const [steps, setSteps] = useState(0);
const [index, setIndex] = useState(1);
const [register, setRegister] = useState(false);
const timeoutRef = useRef(null);
const [ppSection, setPpSection] = useState(false);
//ark add------------------------------------------
const [signUp, setSignUp] = useState(false);
const focusHandler = (id) => {
let inputs = document.querySelectorAll(".Login-box-form-item");
@ -68,11 +71,11 @@ const LoginSignUp = ({ activeLogin,
resetTimeout();
timeoutRef.current = setTimeout(
() => {
setIndex((prevIndex) => prevIndex + 1
setIndex(
(prevIndex) => prevIndex + 1
// prevIndex === slideContents.length - 1 ? 0 : prevIndex + 1
)
if (index === slideContents.length)
setTimeout(setIndex(1), 1000)
);
if (index === slideContents.length) setTimeout(setIndex(1), 1000);
},
delay
@ -86,27 +89,27 @@ const LoginSignUp = ({ activeLogin,
{
id: 0,
image: firstPic,
title: 'یک معلم دیوانه در کمین شما نشسته است مراقب باشید',
description: 'معلمی که دانش آموزانش رو شب ها شکار می کند و این متن شاید باعث تعجب شما شده باشد که آیا طراح دیوانه شده است یا خیر ؟ ',
title: "یک معلم دیوانه در کمین شما نشسته است مراقب باشید",
description:
"معلمی که دانش آموزانش رو شب ها شکار می کند و این متن شاید باعث تعجب شما شده باشد که آیا طراح دیوانه شده است یا خیر ؟ ",
},
{
id: 1,
image: secondPic,
title: 'یک آزمون سخت و افتضاح در راه هست!',
description: 'لورم ایپسوم نمیخواستم استفاده کنم برای همین این متنای عجیب رو مینویسم ببینم چجوری میشه تهش بالاخره اونا هم قراره یه متن عجیب بنویسن ',
title: "یک آزمون سخت و افتضاح در راه هست!",
description:
"لورم ایپسوم نمیخواستم استفاده کنم برای همین این متنای عجیب رو مینویسم ببینم چجوری میشه تهش بالاخره اونا هم قراره یه متن عجیب بنویسن ",
},
{
id: 2,
image: thirdPic,
title: 'یک اسلاید عجیب غریب دیگر در راه هست',
description: 'معلمی که دانش آموزانش رو شب ها شکار می کند و این متن شاید باعث تعجب شما شده باشد که آیا طراح دیوانه شده است یا خیر ؟ ',
title: "یک اسلاید عجیب غریب دیگر در راه هست",
description:
"معلمی که دانش آموزانش رو شب ها شکار می کند و این متن شاید باعث تعجب شما شده باشد که آیا طراح دیوانه شده است یا خیر ؟ ",
},
];
const delay = 2500;
const [level, setLevel] = useState("phonenumber");
const [signUpFields, setSignUpFiels] = useState({});
const [error, setError] = useState("");
@ -157,12 +160,11 @@ const LoginSignUp = ({ activeLogin,
signUpFields?.cellphone?.slice(0, 2) === "09" &&
signUpFields?.cellphone.length === 11
) {
setSteps(2)
setSteps(2);
sendPhoneNumber({ cellphone: signUpFields?.cellphone });
setError(undefined);
console.log(signUpFields.cellphone)
console.log(signUpFields.cellphone);
} else {
setError("شماره موبایل خود را چک کنید.");
}
@ -182,11 +184,10 @@ const LoginSignUp = ({ activeLogin,
signUpFields?.otp2 +
signUpFields?.otp3 +
signUpFields?.otp4,
userToken: '1',
applicationToken: '1',
userToken: "1",
applicationToken: "1",
});
setError(undefined);
} else {
setError("کد وارد شده را چک کنید.");
}
@ -204,8 +205,8 @@ const LoginSignUp = ({ activeLogin,
sendOtp({
cellphone: signUpFields?.cellphone,
otp: signUpFields?.otp,
userToken: '1',
applicationToken: '1',
userToken: "1",
applicationToken: "1",
});
}
}, [signUpFields]);
@ -224,119 +225,194 @@ const LoginSignUp = ({ activeLogin,
}
}, [loginFlag]);
useEffect(() => {
console.log(resend)
}, [resend])
console.log(resend);
}, [resend]);
const light = theme === "light";
return (
isMobile ? <LoginSignUpMobile activeLogin={activeLogin}/>:
<div className="w-full flex items-center justify-center" style={{ height: '100vh', direction: 'rtl' }}>
return isMobile ? (
<LoginSignUpMobile activeLogin={activeLogin} />
) : (
<div
className="w-full flex items-center justify-center"
style={{ height: "100vh", direction: "rtl" }}
>
<div className="w-3/4 border h-4/5 items-center border-solid border-gray-200 flex rounded-xl">
{/* form */}
<div className="flex w-2/5 flex-col h-full max-h-full justify-between items-center p-6">
<div className="flex w-2/5 flex-col h-full max-h-full justify-between items-center p-6 relative">
<div className="h-12 w-full flex justify-end">
{steps != 0 && !ppSection &&
<div className="w-12 h-12 bg-gray-200 rounded-xl flex items-center justify-center text-gray-500 m-0 text-2xl font-light cursor-pointer" onClick={() => {
if(ppSection){
setPpSection(false)
}else{
setSteps(steps - 1)
{steps != 0 && !ppSection && (
<div
className="w-12 h-12 bg-gray-200 rounded-xl flex items-center justify-center text-gray-500 m-0 text-2xl font-light cursor-pointer"
onClick={() => {
if (ppSection) {
setPpSection(false);
} else {
setSteps(steps - 1);
}
}}>
}}
>
{`>`}
</div>
)}
{ppSection && (
<div
className="w-12 h-12 bg-gray-200 rounded-xl flex items-center justify-center text-gray-500 m-0 text-2xl font-light cursor-pointer"
onClick={() => {
if (ppSection) {
setPpSection(false);
} else {
setSteps(steps - 1);
}
{
ppSection &&
<div className="w-12 h-12 bg-gray-200 rounded-xl flex items-center justify-center text-gray-500 m-0 text-2xl font-light cursor-pointer" onClick={() => {
if(ppSection){
setPpSection(false)
}else{
setSteps(steps - 1)
}
}}>
}}
>
{`>`}
</div>
}
)}
</div>
{signUp && <SignUpBox setSignUp={setSignUp} />}
{/* privacy policy Section */}
{
ppSection ? <div className="h-4/5 w-full flex flex-col items-center">
<h1 className="text-lg font-bold text-red52"> قوانین و شرایط استفاده</h1>
{ppSection ? (
<div className="h-4/5 w-full flex flex-col items-center">
<h1 className="text-lg font-bold text-red52">
{" "}
قوانین و شرایط استفاده
</h1>
<div className="w-full h-full text-gray-500 text-justify px-6 py-4 overflow-x-hidden overflow-scroll">
بند اول: موارد مربوط به آموزش مخاطبین
پیر مردی هر روز تو محله می دید پسر کی با کفش های پاره و پای برهنه با توپ پلاستیکی فوتبال بازی می کند، روزی رفت ی کتانی نو خرید و اومد و به پسرک گفت بیا این کفشا رو بپوشپسرک کفشا رو پوشید و خوشحال رو به پیر مرد کرد و گفت: شما خدایید؟! پیر مرد لبش را گزید و گفت نه! پسرک گفت پس دوست خدایی، چون من دیشب فقط به خدا گفتم كه کفش ندارم
هر نفسی که فرو می بریم، مرگی را که مدام به ما دست اندازی میکند پس میزند... در نهایت این مرگ است که باید پیروز شود، زیرا از هنگام تولد بخشی از سرنوشت ما شده و فقط مدت کوتاهی پیش از بلعیدن طعمه اش، با آن بازی می کند. با این همه، ما تا آنجا که ممکن است، با علاقه فراوان و دلواپسی زیاد به زندگی ادامه می دهیم، همان طور که تا آنجا که ممکن است طولانی تر در یک حباب صابون می دمیم تا بزرگتر شود، گر چه با قطعیتی تمام می دانیم که خواهد ترکید.
پیر مردی هر روز تو محله می دید پسر کی با کفش های پاره و پای برهنه با توپ پلاستیکی فوتبال بازی می کند، روزی رفت ی کتانی نو خرید و اومد و به پسرک گفت بیا این کفشا رو بپوشپسرک کفشا رو پوشید و خوشحال رو به پیر مرد کرد و گفت: شما خدایید؟! پیر مرد لبش را گزید و گفت نه! پسرک گفت پس دوست خدایی، چون من دیشب فقط به خدا گفتم كه کفش ندارم
بند دوم: موارد مربوط به آموزش مخاطبین
خالد حسینی تو رمان باد بادک باز مینویسه : ﻣﺮﺩ ﺁﻫﺴﺘﻪ ﺩﺭ ﮔﻮﺵ ﻓﺮﺯﻧﺪ ﺗﺎﺯﻩ ﺑﻪ ﺑﻠﻮﻍ ﺭﺳﯿﺪﻩ ﺍﺵ ﺑﺮﺍﯼ ﭘﻨﺪ ﭼﻨﯿﻦ ﻧﺠﻮﺍ ﮐﺮﺩ : ﭘﺴﺮﻡ ﺩﺭ ﺯﻧﺪﮔﯽ ﻫﺮﮔﺰ ﺩﺯﺩﯼ ﻧﮑﻦ ﭘﺴﺮ ﻣﺘﻌﺠﺐ ﻣﺒﻬﻮﺕ ﺑﻪ ﭘﺪﺭ ﻧﮕﺎﻩ ﮐﺮﺩ ﺑﺪﯾﻦ ﻣﻌﻨﺎ ﮐﻪ ﺍﻭ ﻫﺮﮔﺰ ﺩﺳﺖ ﮐﺞ ﻧﺪﺍﺷﺘﻪ ﭘﺪﺭ ﺑﻪ ﻧﮕﺎﻩ ﻣﺘﻌﺠﺐ ﻓﺮﺯﻧﺪ ﻟﺒﺨﻨﺪﯼ ﺯﺩ ﺍﺩﺍﻣﻪ ﺩﺍﺩ : ﺩﺭ ﺯﻧﺪﮔﯽ ﺩﺭﻭﻍ ﻧﮕﻮ ﭼﺮﺍ ﮐﻪ ﺍﮔﺮ ﮔﻔﺘﯽ ﺻﺪﺍﻗﺖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ ﺍﯼ، ﺧﯿﺎﻧﺖ ﻧﮑﻦ ﮐﻪ ﺍﮔﺮ ﮐﺮﺩﯼ ﻋﺸﻖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ ﺍﯼ، ﺧﺸﻮﻧﺖ ﻧﮑﻦ ﺍﮔﺮ ﮐﺮﺩﯼ ﻣﺤﺒﺖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ ﺍﯼ، ﻧﺎ ﺣﻖ ﻧﮕﻮ ﺍﮔﺮ ﮔﻔﺘﯽ ﺣﻖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ ﺍﯼ، ﺑﯽ ﺣﯿﺎﯾﯽ ﻧﮑﻦ ﺍﮔﺮ ﮐﺮﺩﯼ ﺷﺮﺍﻓﺖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ ﺍی... ﭘﺲ ﺩﺭ ﺯﻧﺪﮔﯽ ﻓﻘﻂ ﺩﺯﺩﯼ نکن
پیر مردی هر روز تو محله می دید پسر کی با کفش های پاره و پای برهنه با توپ پلاستیکی فوتبال بازی می کند، روزی رفت ی کتانی نو خرید و اومد و به پسرک گفت بیا این کفشا رو بپوشپسرک کفشا رو پوشید و خوشحال رو به پیر مرد کرد و گفت: شما خدایید؟! پیر مرد لبش را گزید و گفت نه! پسرک گفت پس دوست خدایی، چون من دیشب فقط به خدا گفتم كه کفش ندارم
هر نفسی که فرو می بریم، مرگی را که مدام به ما دست اندازی میکند پس میزند... در نهایت این مرگ است که باید پیروز شود، زیرا از هنگام تولد بخشی از سرنوشت ما شده و فقط مدت کوتاهی پیش از بلعیدن طعمه اش، با آن بازی می کند. با این همه، ما تا آنجا که ممکن است، با علاقه فراوان و دلواپسی زیاد به زندگی ادامه می دهیم، همان طور که تا آنجا که ممکن است طولانی تر در یک حباب صابون می دمیم تا بزرگتر شود، گر چه با قطعیتی تمام می دانیم که خواهد ترکید.
پیر مردی هر روز تو محله می دید پسر کی با کفش های پاره و پای برهنه با توپ پلاستیکی فوتبال بازی می کند، روزی رفت ی کتانی نو خرید و اومد و به پسرک گفت بیا این کفشا رو بپوشپسرک کفشا رو پوشید و خوشحال رو به پیر مرد کرد و گفت: شما خدایید؟! پیر مرد لبش را گزید و گفت نه! پسرک گفت پس دوست خدایی، چون من دیشب فقط به خدا گفتم كه کفش ندارم
بند سوم: موارد مربوط به آموزش مخاطبین
خالد حسینی تو رمان باد بادک باز مینویسه : ﻣﺮﺩ ﺁﻫﺴﺘﻪ ﺩﺭ ﮔﻮﺵ ﻓﺮﺯﻧﺪ ﺗﺎﺯﻩ ﺑﻪ ﺑﻠﻮﻍ ﺭﺳﯿﺪﻩ ﺍﺵ ﺑﺮﺍﯼ ﭘﻨﺪ ﭼﻨﯿﻦ ﻧﺠﻮﺍ ﮐﺮﺩ : ﭘﺴﺮﻡ ﺩﺭ ﺯﻧﺪﮔﯽ ﻫﺮﮔﺰ ﺩﺯﺩﯼ ﻧﮑﻦ ﭘﺴﺮ ﻣﺘﻌﺠﺐ ﻣﺒﻬﻮﺕ ﺑﻪ ﭘﺪﺭ ﻧﮕﺎﻩ ﮐﺮﺩ ﺑﺪﯾﻦ ﻣﻌﻨﺎ ﮐﻪ ﺍﻭ ﻫﺮﮔﺰ ﺩﺳﺖ ﮐﺞ ﻧﺪﺍﺷﺘﻪ ﭘﺪﺭ ﺑﻪ ﻧﮕﺎﻩ ﻣﺘﻌﺠﺐ ﻓﺮﺯﻧﺪ ﻟﺒﺨﻨﺪﯼ ﺯﺩ ﺍﺩﺍﻣﻪ ﺩﺍﺩ : ﺩﺭ ﺯﻧﺪﮔﯽ ﺩﺭﻭﻍ ﻧﮕﻮ ﭼﺮﺍ ﮐﻪ ﺍﮔﺮ ﮔﻔﺘﯽ ﺻﺪﺍﻗﺖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ ﺍﯼ، ﺧﯿﺎﻧﺖ ﻧﮑﻦ ﮐﻪ ﺍﮔﺮ ﮐﺮﺩﯼ ﻋﺸﻖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ ﺍﯼ، ﺧﺸﻮﻧﺖ ﻧﮑﻦ ﺍﮔﺮ ﮐﺮﺩﯼ ﻣﺤﺒﺖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ ﺍﯼ، ﻧﺎ ﺣﻖ ﻧﮕﻮ ﺍﮔﺮ ﮔﻔﺘﯽ ﺣﻖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ ﺍﯼ، ﺑﯽ ﺣﯿﺎﯾﯽ ﻧﮑﻦ ﺍﮔﺮ ﮐﺮﺩﯼ ﺷﺮﺍﻓﺖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ ﺍی... ﭘﺲ ﺩﺭ ﺯﻧﺪﮔﯽ ﻓﻘﻂ ﺩﺯﺩﯼ نکن
بند اول: موارد مربوط به آموزش مخاطبین پیر مردی هر روز تو محله می
دید پسر کی با کفش های پاره و پای برهنه با توپ پلاستیکی فوتبال
بازی می کند، روزی رفت ی کتانی نو خرید و اومد و به پسرک گفت بیا
این کفشا رو بپوشپسرک کفشا رو پوشید و خوشحال رو به پیر مرد کرد و
گفت: شما خدایید؟! پیر مرد لبش را گزید و گفت نه! پسرک گفت پس دوست
خدایی، چون من دیشب فقط به خدا گفتم كه کفش ندارم هر نفسی که فرو
می بریم، مرگی را که مدام به ما دست اندازی میکند پس میزند...
در نهایت این مرگ است که باید پیروز شود، زیرا از هنگام تولد بخشی
از سرنوشت ما شده و فقط مدت کوتاهی پیش از بلعیدن طعمه اش، با آن
بازی می کند. با این همه، ما تا آنجا که ممکن است، با علاقه فراوان
و دلواپسی زیاد به زندگی ادامه می دهیم، همان طور که تا آنجا که
ممکن است طولانی تر در یک حباب صابون می دمیم تا بزرگتر شود، گر
چه با قطعیتی تمام می دانیم که خواهد ترکید. پیر مردی هر روز تو
محله می دید پسر کی با کفش های پاره و پای برهنه با توپ پلاستیکی
فوتبال بازی می کند، روزی رفت ی کتانی نو خرید و اومد و به پسرک
گفت بیا این کفشا رو بپوشپسرک کفشا رو پوشید و خوشحال رو به پیر
مرد کرد و گفت: شما خدایید؟! پیر مرد لبش را گزید و گفت نه! پسرک
گفت پس دوست خدایی، چون من دیشب فقط به خدا گفتم كه کفش ندارم بند
دوم: موارد مربوط به آموزش مخاطبین خالد حسینی تو رمان باد بادک
باز مینویسه : ﻣﺮﺩ ﺁﻫﺴﺘﻪ ﺩﺭ ﮔﻮﺵ ﻓﺮﺯﻧﺪ ﺗﺎﺯﻩ ﺑﻪ ﺑﻠﻮﻍ ﺭﺳﯿﺪﻩ ﺍﺵ ﺑﺮﺍﯼ
ﭘﻨﺪ ﭼﻨﯿﻦ ﻧﺠﻮﺍ ﮐﺮﺩ : ﭘﺴﺮﻡ ﺩﺭ ﺯﻧﺪﮔﯽ ﻫﺮﮔﺰ ﺩﺯﺩﯼ ﻧﮑﻦ ﭘﺴﺮ ﻣﺘﻌﺠﺐ
ﻣﺒﻬﻮﺕ ﺑﻪ ﭘﺪﺭ ﻧﮕﺎﻩ ﮐﺮﺩ ﺑﺪﯾﻦ ﻣﻌﻨﺎ ﮐﻪ ﺍﻭ ﻫﺮﮔﺰ ﺩﺳﺖ ﮐﺞ ﻧﺪﺍﺷﺘﻪ ﭘﺪﺭ ﺑﻪ
ﻧﮕﺎﻩ ﻣﺘﻌﺠﺐ ﻓﺮﺯﻧﺪ ﻟﺒﺨﻨﺪﯼ ﺯﺩ ﺍﺩﺍﻣﻪ ﺩﺍﺩ : ﺩﺭ ﺯﻧﺪﮔﯽ ﺩﺭﻭﻍ ﻧﮕﻮ ﭼﺮﺍ
ﮐﻪ ﺍﮔﺮ ﮔﻔﺘﯽ ﺻﺪﺍﻗﺖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ ﺍﯼ، ﺧﯿﺎﻧﺖ ﻧﮑﻦ ﮐﻪ ﺍﮔﺮ ﮐﺮﺩﯼ ﻋﺸﻖ ﺭﺍ
ﺩﺯﺩﯾﺪﻩ ﺍﯼ، ﺧﺸﻮﻧﺖ ﻧﮑﻦ ﺍﮔﺮ ﮐﺮﺩﯼ ﻣﺤﺒﺖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ ﺍﯼ، ﻧﺎ ﺣﻖ ﻧﮕﻮ ﺍﮔﺮ
ﮔﻔﺘﯽ ﺣﻖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ ﺍﯼ، ﺑﯽ ﺣﯿﺎﯾﯽ ﻧﮑﻦ ﺍﮔﺮ ﮐﺮﺩﯼ ﺷﺮﺍﻓﺖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ
ﺍی... ﭘﺲ ﺩﺭ ﺯﻧﺪﮔﯽ ﻓﻘﻂ ﺩﺯﺩﯼ نکن پیر مردی هر روز تو محله می دید
پسر کی با کفش های پاره و پای برهنه با توپ پلاستیکی فوتبال بازی
می کند، روزی رفت ی کتانی نو خرید و اومد و به پسرک گفت بیا این
کفشا رو بپوشپسرک کفشا رو پوشید و خوشحال رو به پیر مرد کرد و
گفت: شما خدایید؟! پیر مرد لبش را گزید و گفت نه! پسرک گفت پس دوست
خدایی، چون من دیشب فقط به خدا گفتم كه کفش ندارم هر نفسی که فرو
می بریم، مرگی را که مدام به ما دست اندازی میکند پس میزند...
در نهایت این مرگ است که باید پیروز شود، زیرا از هنگام تولد بخشی
از سرنوشت ما شده و فقط مدت کوتاهی پیش از بلعیدن طعمه اش، با آن
بازی می کند. با این همه، ما تا آنجا که ممکن است، با علاقه فراوان
و دلواپسی زیاد به زندگی ادامه می دهیم، همان طور که تا آنجا که
ممکن است طولانی تر در یک حباب صابون می دمیم تا بزرگتر شود، گر
چه با قطعیتی تمام می دانیم که خواهد ترکید. پیر مردی هر روز تو
محله می دید پسر کی با کفش های پاره و پای برهنه با توپ پلاستیکی
فوتبال بازی می کند، روزی رفت ی کتانی نو خرید و اومد و به پسرک
گفت بیا این کفشا رو بپوشپسرک کفشا رو پوشید و خوشحال رو به پیر
مرد کرد و گفت: شما خدایید؟! پیر مرد لبش را گزید و گفت نه! پسرک
گفت پس دوست خدایی، چون من دیشب فقط به خدا گفتم كه کفش ندارم بند
سوم: موارد مربوط به آموزش مخاطبین خالد حسینی تو رمان باد بادک
باز مینویسه : ﻣﺮﺩ ﺁﻫﺴﺘﻪ ﺩﺭ ﮔﻮﺵ ﻓﺮﺯﻧﺪ ﺗﺎﺯﻩ ﺑﻪ ﺑﻠﻮﻍ ﺭﺳﯿﺪﻩ ﺍﺵ ﺑﺮﺍﯼ
ﭘﻨﺪ ﭼﻨﯿﻦ ﻧﺠﻮﺍ ﮐﺮﺩ : ﭘﺴﺮﻡ ﺩﺭ ﺯﻧﺪﮔﯽ ﻫﺮﮔﺰ ﺩﺯﺩﯼ ﻧﮑﻦ ﭘﺴﺮ ﻣﺘﻌﺠﺐ
ﻣﺒﻬﻮﺕ ﺑﻪ ﭘﺪﺭ ﻧﮕﺎﻩ ﮐﺮﺩ ﺑﺪﯾﻦ ﻣﻌﻨﺎ ﮐﻪ ﺍﻭ ﻫﺮﮔﺰ ﺩﺳﺖ ﮐﺞ ﻧﺪﺍﺷﺘﻪ ﭘﺪﺭ ﺑﻪ
ﻧﮕﺎﻩ ﻣﺘﻌﺠﺐ ﻓﺮﺯﻧﺪ ﻟﺒﺨﻨﺪﯼ ﺯﺩ ﺍﺩﺍﻣﻪ ﺩﺍﺩ : ﺩﺭ ﺯﻧﺪﮔﯽ ﺩﺭﻭﻍ ﻧﮕﻮ ﭼﺮﺍ
ﮐﻪ ﺍﮔﺮ ﮔﻔﺘﯽ ﺻﺪﺍﻗﺖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ ﺍﯼ، ﺧﯿﺎﻧﺖ ﻧﮑﻦ ﮐﻪ ﺍﮔﺮ ﮐﺮﺩﯼ ﻋﺸﻖ ﺭﺍ
ﺩﺯﺩﯾﺪﻩ ﺍﯼ، ﺧﺸﻮﻧﺖ ﻧﮑﻦ ﺍﮔﺮ ﮐﺮﺩﯼ ﻣﺤﺒﺖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ ﺍﯼ، ﻧﺎ ﺣﻖ ﻧﮕﻮ ﺍﮔﺮ
ﮔﻔﺘﯽ ﺣﻖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ ﺍﯼ، ﺑﯽ ﺣﯿﺎﯾﯽ ﻧﮑﻦ ﺍﮔﺮ ﮐﺮﺩﯼ ﺷﺮﺍﻓﺖ ﺭﺍ ﺩﺯﺩﯾﺪﻩ
ﺍی... ﭘﺲ ﺩﺭ ﺯﻧﺪﮔﯽ ﻓﻘﻂ ﺩﺯﺩﯼ نکن
</div>
</div>
:
) : (
<>
<img src={logo} className="h-1/6" />
<div className="flex flex-col w-4/5 items-start justify-start leading-normal">
{
steps == 2 ? <h1 className="text-red26 w-full text-lg font-bold">تاییدیه ثبت نام</h1> : <>
<h1 className="text-red26 text-lg font-bold">ورود یا ثبت نام</h1>
<h1 className="text-red26 text-right font-bold" style={{fontSize: '100%'}}>سامانه ثبت نام مدارس موسسه علمی اندیشمند</h1>
{steps == 2 ? (
<h1 className="text-red26 w-full text-lg font-bold">
تاییدیه ثبت نام
</h1>
) : (
<>
<h1 className="text-red26 text-lg font-bold">
ورود یا ثبت نام
</h1>
<h1
className="text-red26 text-right font-bold"
style={{ fontSize: "100%" }}
>
سامانه ثبت نام مدارس موسسه علمی اندیشمند
</h1>
</>
}
)}
<p className="text-gray-500 text-sm mt-1">
{
steps == 2 ? <div className="">
{resend ?
{steps == 2 ? (
<div className="">
{resend ? (
<div>
<span className="ml-2">کد تایید ارسال نشد؟</span>
<button className="text-red52"
<button
className="text-red52"
onClick={() => {
checkPhoneNumber(signUpFields?.cellphone);
setResend(false)
setResend(false);
}}
>درخواست مجدد کد تایید</button>
>
درخواست مجدد کد تایید
</button>
</div>
:<>
) : (
<>
یک کد چهار رقمی تا &nbsp;{" "}
<Timer seconds={120} refresh={() => {setResend(true)}} /> &nbsp; دیگر برای شماره
&nbsp;{" "}
<Timer
seconds={120}
refresh={() => {
setResend(true);
}}
/>{" "}
&nbsp; دیگر برای شماره &nbsp;{" "}
<span className="text-red52 text-sm">
{signUpFields?.cellphone}
</span>{" "}
&nbsp; ارسال خواهد شد.
</> } </div> : steps == 1 ?
</>
)}{" "}
</div>
) : steps == 1 ? (
<div>
<br />
کاربر گرامی لطفا شماره موبایل خود را وارد کنید
<br />
</div>
: <div className="text-right mt-1" style={{fontSize: '100%'}}>
) : (
<div
className="text-right mt-1"
style={{ fontSize: "100%" }}
>
کاربر گرامی لطفا یکی از دو گزینه زیر را انتخاب نمایید.
<br />
در صورتی که عضو نیستید روی دکمه ثبت نام بزنید
</div>
}
)}
</p>
{
steps == 0 &&
{steps == 0 && (
<>
<Link
to=""
className="Login-box-form-btn w-full h-12 rounded-lg bg-red52 text-white flex items-center justify-center mt-6"
onClick={() => {
setSteps(1);
}}
>
ورود
@ -345,9 +421,7 @@ const LoginSignUp = ({ activeLogin,
to=""
className="Login-box-form-btn w-full h-12 rounded-lg border border-solid border-red52 text-red52 flex items-center justify-center mt-4"
onClick={() => {
setSteps(1);
setRegister(true);
setSignUp(true)
}}
>
ثبت نام
@ -388,20 +462,16 @@ const LoginSignUp = ({ activeLogin,
>
ورود ادمین
</Link> */}
</>
}
{
steps == 1 &&
)}
{steps == 1 && (
<>
<Input
title={"شماره موبایل"}
name="cellphone"
regex={onInput.numberOnly}
onChange={(name, value) => onChange(name, value)}
value={signUpFields?.cellphone}
maxLength="11"
direction="ltr"
/>
@ -412,22 +482,15 @@ const LoginSignUp = ({ activeLogin,
className="Login-box-form-btn w-full h-12 rounded-lg bg-red52 text-white flex items-center justify-center mt-4"
onClick={(e) => {
// setSteps(2);
checkPhoneNumber(e)
checkPhoneNumber(e);
}}
>
ارسال کد تاییدیه
</Link>
</>
}
{
steps == 2 &&
)}
{steps == 2 && (
<>
<div className="w-full flex flex-col mt-5">
<div className="w-full mt-5 flex flex-row-reverse justify-center">
<input
@ -438,7 +501,9 @@ const LoginSignUp = ({ activeLogin,
onChange={(e) =>
onChange(
e.target.name,
(e.target.value = onInput.numberOnly(e.target.value))
(e.target.value = onInput.numberOnly(
e.target.value
))
)
}
maxlength="1"
@ -452,7 +517,9 @@ const LoginSignUp = ({ activeLogin,
onChange={(e) =>
onChange(
e.target.name,
(e.target.value = onInput.numberOnly(e.target.value))
(e.target.value = onInput.numberOnly(
e.target.value
))
)
}
maxlength="1"
@ -466,7 +533,9 @@ const LoginSignUp = ({ activeLogin,
onChange={(e) =>
onChange(
e.target.name,
(e.target.value = onInput.numberOnly(e.target.value))
(e.target.value = onInput.numberOnly(
e.target.value
))
)
}
maxlength="1"
@ -480,7 +549,10 @@ const LoginSignUp = ({ activeLogin,
onChange={(e) =>
onChange(
e.target.name,
(e.target.value = onInput.englishAndNumberWithoutSpace(e.target.value))
(e.target.value =
onInput.englishAndNumberWithoutSpace(
e.target.value
))
)
}
maxlength="1"
@ -489,11 +561,10 @@ const LoginSignUp = ({ activeLogin,
</div>
<Link
to={register == true ? '/register' : `/`}
to={register == true ? "/register" : `/`}
className="Login-box-form-btn w-full h-12 rounded-lg bg-red52 text-white flex items-center justify-center mt-4"
onClick={(e) => {
checkOtp(e)
checkOtp(e);
// activeLogin()
// setTimeout(() => window.location.reload(), 200)
}}
@ -505,7 +576,10 @@ const LoginSignUp = ({ activeLogin,
شماره خود را اشتباه وارد کردید؟{" "}
<button
className="bg-transparent border-none text-red52 font-medium"
onClick={() => {setSteps(1); setLevel("phonenumber")}}
onClick={() => {
setSteps(1);
setLevel("phonenumber");
}}
>
اصلاح شماره تلفن
</button>
@ -513,44 +587,53 @@ const LoginSignUp = ({ activeLogin,
</div>
</div>
</>
}
</div>
)}
</div>
<div className="w-full flex flex-col items-center justify-center">
<p className="w-2/5 text-xs text-center text-red26">
ثبت نام شما در سامانه به منزله قبول
<Link to="" onClick={() => setPpSection(true)} className="font-bold"> شرایط و قوانین استفاده </Link>
<Link
to=""
onClick={() => setPpSection(true)}
className="font-bold"
>
{" "}
شرایط و قوانین استفاده{" "}
</Link>
میباشد
</p>
</div>
</>
}
)}
<p className="text-gray-300 text-xs">1401 - 1400</p>
</div>
{/* Slider */}
<div className="bg-grayEC w-3/5 rounded-tl-xl h-full rounded-bl-xl flex flex-col items-center justify-center" >
<div className="slideshow justify-center" style={{ direction: 'ltr' }}>
<div className="bg-grayEC w-3/5 rounded-tl-xl h-full rounded-bl-xl flex flex-col items-center justify-center">
<div
className="slideshow justify-center"
style={{ direction: "ltr" }}
>
<div
className="slideshowSlider w-full"
style={{ transform: `translate3d(${-index * 100}%, 0, 0)` }}
>
{[slideContents[slideContents.length - 1],
...slideContents, slideContents[0]
{[
slideContents[slideContents.length - 1],
...slideContents,
slideContents[0],
].map((item, index) => (
<div
className="slide"
key={`sildeNo${index}`}
>
<div className="slide" key={`sildeNo${index}`}>
<div className="w-full flex flex-col justify-center items-center">
<img src={item.image} className="h-72" />
<h1 className="w-4/5 text-xl my-2 text-red26 font-bold whitespace-normal">{item.title}</h1>
<p className=" px-12 text-right text-sm whitespace-normal">{item.description}</p>
<h1 className="w-4/5 text-xl my-2 text-red26 font-bold whitespace-normal">
{item.title}
</h1>
<p className=" px-12 text-right text-sm whitespace-normal">
{item.description}
</p>
</div>
</div>
))}
@ -560,7 +643,9 @@ const LoginSignUp = ({ activeLogin,
{slideContents.map((_, idx) => (
<div
key={idx}
className={`slideshowDot${index === idx + 1 ? " active" : ""}`}
className={`slideshowDot${
index === idx + 1 ? " active" : ""
}`}
onClick={() => {
setIndex(idx + 1);
}}
@ -570,26 +655,20 @@ const LoginSignUp = ({ activeLogin,
</div>
</div>
</div>
</div>
);
};
const mapStateToProps = (state) => ({
loginFlag : state.user.status,
loginFlag: state.user.status,
isMobile: state.publicApi.isMobile,
});
});
const mapDispatchToProps = {
const mapDispatchToProps = {
sendOtp: user.otp_login,
sendPhoneNumber: user.otp,
bnLogin: user.bnLogin,
setHeaderOptions: publicApi.setHeaderOptions,
};
export default connect(
mapStateToProps,
mapDispatchToProps
)(LoginSignUp);
};
export default connect(mapStateToProps, mapDispatchToProps)(LoginSignUp);

@ -13,40 +13,40 @@ import ScrollContainer from 'react-indiana-drag-scroll'
const Games = ({ gameId, chooseGame, selectedGames, isMobile, setTypes }) => {
const [data, setData] = useState([
{
id: 1,
img: img4,
title: 'کتاب های آموزشی',
includedProductTypes: [1]
},
{
id: 2,
img: img3,
title: 'بسته های آزمون',
includedProductTypes: [2, 3]
id: 5,
img: img2,
title: "پیش ثبت نام مدارس",
includedProductTypes: [7],
},
{
id: 3,
img: img1,
title: 'کلاس های آموزشی',
includedProductTypes: [4, 5]
title: "کلاس های آموزشی",
includedProductTypes: [4, 5],
},
{
id: 4,
img: img5,
title: 'دوره های مجازی',
includedProductTypes: [6]
title: "دوره های مجازی",
includedProductTypes: [6],
},
{
id: 5,
img: img2,
title: 'پیش ثبت نام مدارس',
includedProductTypes: [7]
id: 1,
img: img4,
title: "کتاب های آموزشی",
includedProductTypes: [1],
},
{
id: 2,
img: img3,
title: "بسته های آزمون",
includedProductTypes: [2, 3],
},
{
id: 6,
img: img6,
title: 'سایر خدمات',
includedProductTypes: [8]
title: "سایر خدمات",
includedProductTypes: [8],
},
]);
return (

File diff suppressed because it is too large Load Diff

@ -3,6 +3,7 @@ import { book, publicApi, userProduct } from "../../redux/actions";
import { connect } from "react-redux";
import { Link } from "react-router-dom";
import Product from "../../components/Product";
import { CgDanger } from "react-icons/cg";
// import ScrollContainer from 'react-indiana-drag-scroll'
@ -66,7 +67,7 @@ const Services = ({
classMinute: "",
});
const [sharzhVal, setSharzhVal] = useState('');
const [selectedProductTypes, setSelectedProductTypes] = useState([1]);
const [selectedProductTypes, setSelectedProductTypes] = useState([7]);
// const onChange = (name, value) => {
// setFilter({ ...filter, [name]: value });
// };
@ -112,9 +113,10 @@ const Services = ({
role: "",
},
];
console.log("book---------)))))))))))))))))))))-------------------");
console.log(books);
const [selectedGames, setSelectedGames] = useState([]);
const [gameId, setGameId] = useState(1);
const [gameId, setGameId] = useState(5);
const chooseGame = (id) => {
setGameId(id);
console.log(selectedProductTypes)
@ -124,61 +126,38 @@ const Services = ({
return (
<div
className="flex items-start justify-between"
style={{ width: "93.5%", direction: "rtl", height: '100vh' }}
style={{ width: "93.5%", direction: "rtl", height: "100vh" }}
>
{popup ? (
<ServicePopUp
content={popUpContent}
closeOnClick={() => setPopUp(false)}
sendPrice={val => setPopUpContent({...popUpContent, price: popUpContent.price + val})}
sendPrice={(val) =>
setPopUpContent({
...popUpContent,
price: popUpContent.price + val,
})
}
/>
) : null}
<div
className="w-3/4 flex flex-col justify-center "
style={{ paddingTop:'5.5%', height: '100vh' }}
className="w-[76.5%] h-[100vh] flex flex-col justify-center pt-[3.5%]"
// style={{ paddingTop:'5.5%', height: '100vh' }}
>
<div
className="h-48 w-full border-b border-red82OP my-4 px-10"
className="h-48 w-full border-b border-red82OP my-4 px-6"
style={{ direction: "ltr" }}
>
{/* {
services.map((item, index) => (
<div
className="flex flex-col justify-center items-center transition-all duration-200 m-4 rounded-xl border-2 border-red82OP hover:cursor-pointer hover:bg-pinkF5"
style={{ minWidth: '175px', height: '175px' }}
onClick={() => setChecked(prevState => [...prevState, checked[index] = !checked[index]])}
>
{
checked[index] ? <div className="flex w-full px-4 " style={{ direction: 'ltr' }}>
<div className="w-6 h-6 text-white text-sm rounded-full flex justify-center items-center bg-red52">
<svg width="37" height="37" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7.75 12L10.58 14.83L16.25 9.17004" stroke="#fff" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
</svg>
</div>
</div> : <div className="h-6"></div>
}
<img src={item.image} className=" h-20 mb-4" />
<h2 className="w-full text-md text-gray-400 font-bold">{item.title}</h2>
</div>
))
} */}
<Games
selectedGames={selectedGames}
gameId={gameId}
chooseGame={chooseGame}
setTypes={val => setSelectedProductTypes(val)}
setTypes={(val) => setSelectedProductTypes(val)}
/>
</div>
{/* filters */}
{gameId != 6 && <div className="flex mx-10 my-4 justify-start">
{gameId != 6 && (
<div className="flex mx-6 justify-start">
<div className="flex items-center ">
<svg
xmlns="http://www.w3.org/2000/svg"
@ -238,21 +217,23 @@ const Services = ({
</svg>
</div>
<div className="flex items-center mx-6 pl-6 border-l-2 border-gray-300">
{
filterCheck.map((filter) => (
{filterCheck.map((filter) => (
<div
key={`FILTER_${filter.id}`}
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
${selectedFilters.includes(filter.id)
${
selectedFilters.includes(filter.id)
? "border-red52 text-red52 bg-pinkF5"
: "border-gray200 text-gray-400"
}`}
onClick={(prevState) =>{
if(selectedFilters.includes(filter.id)){
setSelectedFilters(selectedFilters.filter(itm => itm !== filter.id))
}else{
setSelectedFilters([...selectedFilters, filter.id])
onClick={(prevState) => {
if (selectedFilters.includes(filter.id)) {
setSelectedFilters(
selectedFilters.filter((itm) => itm !== filter.id)
);
} else {
setSelectedFilters([...selectedFilters, filter.id]);
}
}}
>
@ -277,12 +258,9 @@ const Services = ({
</svg>
</div>
</div>
)}
</div>
))
}
))}
{/* <div
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
@ -321,7 +299,6 @@ const Services = ({
</div> */}
</div>
<div className="flex items-center mx-4 pl-6">
<select className="bg-white border-2 border-solid border-gray-300 w-72 p-3 rounded-lg text-gray-400 outline-red52">
{services.map((item, index) => (
@ -329,21 +306,22 @@ const Services = ({
))}
</select>
</div>
</div>}
</div>
)}
<div
className={`flex
} w-full justify-center overflow-x-hidden overflow-scroll flex-wrap h-full `}
>
{ books?.filter(itm => selectedProductTypes.includes(itm.productType)).map((product, index) => (
<div className="flex w-full overflow-x-hidden overflow-scroll flex-wrap h-full gap-x-[5%] px-6">
{books
?.filter((itm) => selectedProductTypes.includes(itm.productType))
.map((product, index) => (
<div
// to={"/class/" + product?.id}
className="w-[30%]"
key={`PRODUCT__${gameId}__${index}`}
style={gameId===5?{width:"100%"}:null}
>
{/* {console.log(product)} */}
{(selectedProductTypes.includes(4) ||
selectedProductTypes.includes(7)) && (
<Product
key={index}
productsType={filter.productsType}
@ -369,46 +347,45 @@ const Services = ({
price: gameId == 2 ? 0 : product?.price,
classHour: 21,
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: [
{
title: 'بخش اول آزمون ' + product.name,
date: '۱۴۰۰/۱۲/۱۳',
time: '۱۴:۴۶',
numberOfQ: '۱۸',
price: 10000
title: "بخش اول آزمون " + product.name,
date: "۱۴۰۰/۱۲/۱۳",
time: "۱۴:۴۶",
numberOfQ: "۱۸",
price: 10000,
},
{
title: 'بخش دوم آزمون ' + product.name,
date: '۱۴۰۰/۱۲/۱۴',
time: '۱۴:۴۶',
numberOfQ: '۱۸',
price: 10000
title: "بخش دوم آزمون " + product.name,
date: "۱۴۰۰/۱۲/۱۴",
time: "۱۴:۴۶",
numberOfQ: "۱۸",
price: 10000,
},
{
title: 'بخش سوم آزمون ' + product.name,
date: '۱۴۰۰/۱۲/۱۵',
time: '۱۴:۴۶',
numberOfQ: '۳۲',
price: 250000
title: "بخش سوم آزمون " + product.name,
date: "۱۴۰۰/۱۲/۱۵",
time: "۱۴:۴۶",
numberOfQ: "۳۲",
price: 250000,
},
]
],
});
if (gameId !== 5) {
setPopUp(true)
setPopUp(true);
}
console.log(gameId)
console.log(gameId);
}}
btnOnClick={() => {
if(selectedProductTypes.includes(7)){
if (selectedProductTypes.includes(7)) {
pushSchoolToCart({
productId: product?.id,
count: 1,
})
}
else{
});
} else {
pushToCart({
productId: product?.id,
@ -416,47 +393,64 @@ const Services = ({
});
}
// console.log(gameId)
setTimeout(() => setPopUp(false), 0)
setTimeout(() => setPopUp(false), 0);
// console.log(popup)
// console.log(product.id)
}
}
}}
/>
)}
</div>
))}
{
gameId == 6 &&
<div className="w-4/5 px-8 h-48 flex justify-between text-right items-center border-2 rounded-xl border-red52 " >
{(!selectedProductTypes.includes(4) &&
!selectedProductTypes.includes(7) && gameId !== 6) && (
<div className="w-full h-28 flex flex-col items-center justify-center mx-auto rounded">
<CgDanger className="text-4xl" />
<div className="text-xl mt-4" style={{ direction: "rtl" }}>
این بخش هنوز فعال نشده است.
</div>
</div>
)}
{gameId == 6 && (
<div className="w-4/5 mx-auto h-48 flex justify-between text-right items-center border-2 rounded-xl border-red52 ">
<div className="w-1/5 mx-1">
<h1 className="text-red26 font-bold">افزایش مبلغ دلخواه</h1>
<p className="text-red26 text-sm">لطفا مبلغ دلخواه خود را در کادر روبرو وارد کنید</p>
<p className="text-red26 text-sm">
لطفا مبلغ دلخواه خود را در کادر روبرو وارد کنید
</p>
</div>
<div className="flex mx-1">
<input
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"
value={(separate(sharzhVal))}
onChange={e => setSharzhVal(e.target.value)}
/><p className="border flex justify-center items-center border-red52 rounded-lg h-12 w-12 text-center rounded-r-none border-r-0 px-4">ریال</p>
value={separate(sharzhVal)}
onChange={(e) => setSharzhVal(e.target.value)}
/>
<p className="border flex justify-center items-center border-red52 rounded-lg h-12 w-12 text-center rounded-r-none border-r-0 px-4">
ریال
</p>
</div>
<div className="flex mx-1">
<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>
<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
placeholder="شارژ حساب"
className="border border-red52 rounded-lg h-12 w-60 text-right rounded-r-none border-r-0 px-4 outline-none"
/>
</div>
<button className="cursor-pointer text-red26 border border-red52 rounded-lg bg-red82OP font-bold text-sm px-6 h-12 mx-2">افزودن به اعتبار</button>
<button className="cursor-pointer text-red26 border border-red52 rounded-lg bg-red82OP font-bold text-sm px-6 h-12 mx-2">
افزودن به اعتبار
</button>
</div>
}
)}
</div>
</div>
{!isMobile && <div className="w-1/4 left-0" style={{ height: "100vh" }}>
{/* --------------left-part------------------------------------- */}
{!isMobile && (
<div className="w-[23.5%] left-0" style={{ height: "100vh" }}>
<ShoppingCart />
</div>}
</div>
)}
</div>
);
}
@ -464,17 +458,16 @@ const Services = ({
else {
return (
<div className="flex flex-col items-center mt-16 mb-40 rtl">
<Games
selectedGames={selectedGames}
gameId={gameId}
chooseGame={chooseGame}
setTypes={val => setSelectedProductTypes(val)}
setTypes={(val) => setSelectedProductTypes(val)}
/>
<div className="w-11/12 border-b border-gray-200"></div>
{
gameId !== 6 && <div className="flex items-center mx-4 my-4">
{gameId !== 6 && (
<div className="flex items-center mx-4 my-4">
<svg
xmlns="http://www.w3.org/2000/svg"
width="40"
@ -531,21 +524,23 @@ const Services = ({
</g>
</g>
</svg>
{
filterCheck.map((filter) => (
{filterCheck.map((filter) => (
<div
key={`FILTER_${filter.id}`}
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
${selectedFilters.includes(filter.id)
${
selectedFilters.includes(filter.id)
? "border-red52 text-red52 bg-pinkF5"
: "border-gray200 text-gray-400"
}`}
onClick={(prevState) =>{
if(selectedFilters.includes(filter.id)){
setSelectedFilters(selectedFilters.filter(itm => itm !== filter.id))
}else{
setSelectedFilters([...selectedFilters, filter.id])
onClick={(prevState) => {
if (selectedFilters.includes(filter.id)) {
setSelectedFilters(
selectedFilters.filter((itm) => itm !== filter.id)
);
} else {
setSelectedFilters([...selectedFilters, filter.id]);
}
}}
>
@ -570,28 +565,22 @@ const Services = ({
</svg>
</div>
</div>
)}
</div>
))
}
))}
</div>
}
<div className="w-11/12 border-b border-gray-200"></div>
)}
<div className="w-11/12 border-b-4 border-gray-200"></div>
<div className={`flex items-center w-full justify-center flex-col`}>
{books
?.filter((itm) => selectedProductTypes.includes(itm.productType))
.map((product, index) => (
<div
className={`flex items-center w-full justify-center flex-col `}
>
{ books?.filter(itm => selectedProductTypes.includes(itm.productType)).map((product, index) => (
<div
// to={"/class/" + product?.id}
className="bg-black"
key={`PRODUCT__${gameId}__${index}`}
>
{/* {console.log(product)} */}
{selectedProductTypes.includes(4) && (
<Product
key={index}
productsType={filter.productsType}
@ -617,46 +606,45 @@ const Services = ({
price: gameId == 2 ? 0 : product?.price,
classHour: 21,
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: [
{
title: 'بخش اول آزمون ' + product.name,
date: '۱۴۰۰/۱۲/۱۳',
time: '۱۴:۴۶',
numberOfQ: '۱۸',
price: 10000
title: "بخش اول آزمون " + product.name,
date: "۱۴۰۰/۱۲/۱۳",
time: "۱۴:۴۶",
numberOfQ: "۱۸",
price: 10000,
},
{
title: 'بخش دوم آزمون ' + product.name,
date: '۱۴۰۰/۱۲/۱۴',
time: '۱۴:۴۶',
numberOfQ: '۱۸',
price: 10000
title: "بخش دوم آزمون " + product.name,
date: "۱۴۰۰/۱۲/۱۴",
time: "۱۴:۴۶",
numberOfQ: "۱۸",
price: 10000,
},
{
title: 'بخش سوم آزمون ' + product.name,
date: '۱۴۰۰/۱۲/۱۵',
time: '۱۴:۴۶',
numberOfQ: '۳۲',
price: 250000
title: "بخش سوم آزمون " + product.name,
date: "۱۴۰۰/۱۲/۱۵",
time: "۱۴:۴۶",
numberOfQ: "۳۲",
price: 250000,
},
]
],
});
if (gameId !== 5) {
setPopUp(true)
setPopUp(true);
}
console.log(gameId)
console.log(gameId);
}}
btnOnClick={() => {
if(selectedProductTypes.includes(7)){
if (selectedProductTypes.includes(7)) {
pushSchoolToCart({
productId: product?.id,
count: 1,
})
}
else{
});
} else {
pushToCart({
productId: product?.id,
@ -664,49 +652,53 @@ const Services = ({
});
}
// console.log(gameId)
setTimeout(() => setPopUp(false), 0)
setTimeout(() => setPopUp(false), 0);
// console.log(popup)
// console.log(product.id)
}
}
}}
/>
)}
</div>
))}
{
gameId == 6 &&
<div className="w-full p-8 py-10 flex flex-col justify-between items-center " >
{gameId == 6 && (
<div className="w-full p-8 py-10 flex flex-col justify-between items-center ">
<div className="w-full text-right mb-4">
<h1 className="text-red26 font-bold">افزایش مبلغ دلخواه</h1>
<p className="text-red26 text-sm">لطفا مبلغ دلخواه خود را در کادر روبرو وارد کنید</p>
<p className="text-red26 text-sm">
لطفا مبلغ دلخواه خود را در کادر روبرو وارد کنید
</p>
</div>
<div className="flex w-full mb-4">
<input
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"
value={(separate(sharzhVal))}
onChange={e => setSharzhVal(e.target.value)}
/><p className="border flex justify-center items-center border-red5B rounded-lg h-14 w-1/4 text-center rounded-r-none border-r-0 px-4">ریال</p>
value={separate(sharzhVal)}
onChange={(e) => setSharzhVal(e.target.value)}
/>
<p className="border flex justify-center items-center border-red5B rounded-lg h-14 w-1/4 text-center rounded-r-none border-r-0 px-4">
ریال
</p>
</div>
<div className="flex w-full mb-4">
<p className="border flex justify-center items-center border-red52 rounded-lg h-14 w-1/5 text-center rounded-l-none border-l-0 px-10">بابت</p>
<p className="border flex justify-center items-center border-red52 rounded-lg h-14 w-1/5 text-center rounded-l-none border-l-0 px-10">
بابت
</p>
<input
placeholder="شارژ حساب"
className="border border-red52 rounded-lg h-14 w-4/5 text-center rounded-r-none border-r-0 px-4 outline-none"
/>
</div>
<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)' }}>
<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)" }}
>
افزودن به سبد خرید
</button>
</div>
}
)}
</div>
</div>
)
);
}
};

@ -57,6 +57,7 @@ module.exports = {
},
screens: {
res1: "1410px",
res1_2:"1270px",
res2: "1230px",
},
},

16172
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save