From 48a7083099245255d0c36018f5fcb6286c6209bd Mon Sep 17 00:00:00 2001 From: Reza_ashrafi Date: Fri, 11 Feb 2022 20:34:15 +0330 Subject: [PATCH] reza added filter to desktop --- src/App.scss | 14 + src/assets/icons/alert.svg | 6 +- src/assets/icons/dropdown-blue.svg | 2 +- src/components/Button/index.js | 20 +- src/components/Checkbox/index.css | 6 +- src/components/CourseChapter/index.css | 2 +- src/components/CourseChapter/index.js | 46 +-- src/components/Footer/index.js | 32 ++- src/components/Input/index.scss | 2 +- src/components/Navbar/cart-blue.svg | 8 +- src/components/Navbar/index.js | 7 +- src/components/Product/index.js | 34 +-- .../ProductStatusCard/arrow-icon.svg | 12 +- .../ProductStatusCard/delivery-icon.svg | 16 +- .../ProductStatusCard/icon-shop.svg | 13 +- src/components/ProductStatusCard/index.js | 6 +- .../ProductStatusCard/info-circle.svg | 6 +- .../ProductStatusCard/shield-tick.svg | 4 +- src/components/ProductTab/index.js | 10 +- src/components/ProductTab/table/index.css | 6 - src/components/ProductTab/table/index.js | 7 +- src/components/Progress/index.js | 4 +- src/components/Switch/index.js | 8 +- src/components/Switch/index.scss | 24 +- src/components/Textarea/index.js | 4 +- .../VerticalExpandableProductFilter/index.js | 6 +- src/components/VodProduct/index.js | 12 +- src/redux/actions/book.js | 8 +- src/redux/actions/index.js | 8 +- src/redux/actions/public.js | 9 +- src/redux/actions/transport.js | 17 ++ src/redux/reducers/book.js | 71 ++--- src/redux/reducers/index.js | 1 + src/redux/reducers/transport.js | 28 ++ src/utils/filter.js | 61 ++++ src/views/Activation/components/Header.js | 4 +- src/views/Address/index.js | 60 ++-- src/views/Auth/Desktop/index.js | 6 +- src/views/Auth/SignUp/index.js | 6 +- src/views/Contact/index.js | 10 +- src/views/DeliveryForm/Address/index.js | 18 +- src/views/DeliveryForm/TransportDate/index.js | 14 +- .../DeliveryForm/TransportMethod/index.js | 99 +++++-- src/views/DeliveryForm/index.js | 2 +- src/views/Faq/components/NotFound.js | 10 +- src/views/Faq/components/Question.js | 29 +- src/views/Faq/index.js | 13 +- src/views/Home/Desktop/Part2/index.js | 63 ++-- src/views/Home/Desktop/Part4/index.js | 60 ++-- .../Home/Desktop/SalesContainer/index.js | 24 +- src/views/Home/Desktop/index.js | 1 - src/views/Order/components/Book.js | 10 +- src/views/Order/index.js | 56 ++-- src/views/Orders/components/Order.js | 17 +- .../Product/Desktop/ProductOverAll/index.js | 45 ++- src/views/Product/index.js | 2 +- src/views/Products/index.js | 2 +- src/views/Products/layouts/Main.js | 268 ++++++++++++------ src/views/Products/layouts/Sidebar.js | 143 ++++++++-- src/views/ShoppingCart/Product/index.js | 8 +- src/views/ShoppingCart/index.js | 30 +- src/views/Video/components/Desktop/Table.js | 9 +- src/views/Video/components/Desktop/Videos.js | 41 +-- src/views/Video/components/Season.js | 14 +- src/views/Video/index.js | 81 +++--- src/views/VideoDisplay/index.js | 2 +- tailwind.config.js | 39 +-- 67 files changed, 1030 insertions(+), 676 deletions(-) delete mode 100644 src/components/ProductTab/table/index.css create mode 100644 src/redux/actions/transport.js create mode 100644 src/redux/reducers/transport.js diff --git a/src/App.scss b/src/App.scss index 4ba4d46..a6a3350 100644 --- a/src/App.scss +++ b/src/App.scss @@ -22,6 +22,20 @@ display: none; } +.bold{ + font-family: ExtraBold; +} + +.shadow-all{ + box-shadow: 0px 0px 10px rgba(0,0,0,0.08); +} + +//slider +.styles-module_item-tracker__3bypy{ + padding-top : 20px; + // transform: translateY(-20px) !important; +} + @font-face { font-family: Black; src: url("./assets/font/IranSansX/Farsi/Black.ttf"); diff --git a/src/assets/icons/alert.svg b/src/assets/icons/alert.svg index c9bbfca..ed19205 100644 --- a/src/assets/icons/alert.svg +++ b/src/assets/icons/alert.svg @@ -1,9 +1,9 @@ - - - + + + diff --git a/src/assets/icons/dropdown-blue.svg b/src/assets/icons/dropdown-blue.svg index 26e9ee6..8b03880 100644 --- a/src/assets/icons/dropdown-blue.svg +++ b/src/assets/icons/dropdown-blue.svg @@ -1,6 +1,6 @@ - + diff --git a/src/components/Button/index.js b/src/components/Button/index.js index bab8788..5c9d36a 100644 --- a/src/components/Button/index.js +++ b/src/components/Button/index.js @@ -13,28 +13,32 @@ export default function Button({ active, borderType, loading, + disabled, }) { return ( ); } - - +Button.defaultProps = { + color: "", +}; diff --git a/src/components/Checkbox/index.css b/src/components/Checkbox/index.css index d7d7f77..7fecbcd 100644 --- a/src/components/Checkbox/index.css +++ b/src/components/Checkbox/index.css @@ -77,12 +77,12 @@ } .checkbox:hover span:first-child { - border-color: #0077ff; + border-color: #06BAC0; } .checkbox-input:checked + .checkbox span:first-child { - background: #0077ff; - border-color: #0077ff; + background: #06BAC0; + border-color: #06BAC0; animation: zoom-in-out 0.3s ease; } diff --git a/src/components/CourseChapter/index.css b/src/components/CourseChapter/index.css index 4714abe..7aa5aef 100644 --- a/src/components/CourseChapter/index.css +++ b/src/components/CourseChapter/index.css @@ -7,7 +7,7 @@ } .hasScrollbar::-webkit-scrollbar-thumb{ - background:#196EC0; + background:rgb(18, 207, 127); border-radius: 10px; height: 20px; } diff --git a/src/components/CourseChapter/index.js b/src/components/CourseChapter/index.js index df92b20..a1d20f9 100644 --- a/src/components/CourseChapter/index.js +++ b/src/components/CourseChapter/index.js @@ -26,35 +26,43 @@ const CourseChapter = ({ }; return (
-

سرفصل دوره

+

+ سرفصل دوره +

- {book?.name} - + {book?.name} + {"پایه" + " " + grades[book?.gradeId]}
-
- {/*

- {(seasons.length > 0 && playList.length > 0) && +

+

+ {seasons?.length > 0 && + playList?.length > 0 && seasons?.filter((item) => item?.id === playList[0]?.categoryId)[0] ?.name} -

*/} +

{/* {video?.duration} */}
{playList?.map((video, index) => ( -
+
@@ -96,19 +104,19 @@ const CourseChapter = ({ disabled={true} > {/* top */} -
+

{video?.name}

{duration(video?.duration)} @@ -122,14 +130,14 @@ const CourseChapter = ({ >
{/* bottom */} - پخش + {selectedVideo?.id === video?.id ? "در حال پخش" : "پخش"}
diff --git a/src/components/Footer/index.js b/src/components/Footer/index.js index 7756b3e..c03ea1c 100644 --- a/src/components/Footer/index.js +++ b/src/components/Footer/index.js @@ -1,8 +1,8 @@ -import React from "react"; +import React, { useEffect } from "react"; import { Link } from "react-router-dom"; import _ from "lodash"; -// import enamadlogo from './enamad-pic.svg'; +import enamadlogo from "./enamad-pic.svg"; import callIcon from "../../assets/icons/vuesax-linear-call-calling.svg"; import samandehi from "./samandehi-pic.svg"; import iosIcon from "./IOS.svg"; @@ -11,6 +11,9 @@ import bazarIcon from "./Bazar.svg"; import lightBlueLine from "./light-blue-line.svg"; const FooterDesign1 = ({ color, bg, items, hasHeader }) => { + useEffect(() => { + console.log(window.location.host); + }, []); const enamad = ''; return ( @@ -57,7 +60,11 @@ const FooterDesign1 = ({ color, bg, items, hasHeader }) => {
    {item.links.map((link, index) => (
  • - + {link.name}
  • @@ -67,16 +74,21 @@ const FooterDesign1 = ({ color, bg, items, hasHeader }) => { ))}
-
+ {window.location.host === "www.danovin.ir" ? ( +
+ ) : ( + + )} +
diff --git a/src/components/Input/index.scss b/src/components/Input/index.scss index 9b0bf19..1f05250 100644 --- a/src/components/Input/index.scss +++ b/src/components/Input/index.scss @@ -1,4 +1,4 @@ -$primary: #196EC0; +$primary: #23C933; $gray: #dbdbdb; $danger: #E00A0A; $success: #23C933; diff --git a/src/components/Navbar/cart-blue.svg b/src/components/Navbar/cart-blue.svg index c33a0b3..0764444 100644 --- a/src/components/Navbar/cart-blue.svg +++ b/src/components/Navbar/cart-blue.svg @@ -1,9 +1,9 @@ - - - - + + + + diff --git a/src/components/Navbar/index.js b/src/components/Navbar/index.js index 9f4b3df..5a1dd0d 100644 --- a/src/components/Navbar/index.js +++ b/src/components/Navbar/index.js @@ -195,7 +195,8 @@ function Navbar({
) : (
@@ -212,7 +213,7 @@ function Navbar({
  • {page.name} @@ -227,7 +228,7 @@ function Navbar({ >
    e.stopPropagation()} > diff --git a/src/components/Product/index.js b/src/components/Product/index.js index bd850bc..ee25398 100644 --- a/src/components/Product/index.js +++ b/src/components/Product/index.js @@ -18,47 +18,36 @@ import discountImg from "./discount.png"; const ProductDesign = ({ grades, - colors, likeBtn, discount, discountPricePercent, discountPrice, productContent, star, - productTags, product, priceDirection, - productTitleAlignment, priceHolder, - productHolderBorder, - productHolderBorderColor, - productTitleColor, productExcerptTextColor, productCat, - productCatTextColor, rangeHolder, - verticalImg, rangeWidth, addToCartHolder, - productName, - productPrice, writeGHEIMAT, - numberOfRegards, - productHolderHoverBorder, hoverMode, starRate, imageSize, + type }) => { const [isHovering, setIsHovering] = useState(false); return ( -
    +
    setIsHovering(true)} onMouseLeave={() => setIsHovering(false)} > @@ -86,10 +75,10 @@ const ProductDesign = ({
    {/* img */}
    {/* product content */}
    -
    +

    - {product?.product[1]?.name} + {product?.product[type]?.name}

    {productContent && (

    - {"پایه" + " " + grades[product.gradeId]} + {"پایه" + " " + grades[product?.gradeId]} )}

    @@ -151,8 +140,8 @@ const ProductDesign = ({

    )}
    -

    - {separate(product?.product[1]?.price)} تومان +

    + {separate(product.product[type]?.price)} تومان

    {/* add to cart */} @@ -219,6 +208,7 @@ export default connect(mapStateToProps)(ProductDesign); ProductDesign.defaultProps = { // icons on product image + type : 0, colors: false, likeBtn: false, discount: false, diff --git a/src/components/ProductStatusCard/arrow-icon.svg b/src/components/ProductStatusCard/arrow-icon.svg index 930bd30..8760e2a 100644 --- a/src/components/ProductStatusCard/arrow-icon.svg +++ b/src/components/ProductStatusCard/arrow-icon.svg @@ -1,11 +1,11 @@ - - - - + + + + - - + + diff --git a/src/components/ProductStatusCard/delivery-icon.svg b/src/components/ProductStatusCard/delivery-icon.svg index e4cc601..1b2ce22 100644 --- a/src/components/ProductStatusCard/delivery-icon.svg +++ b/src/components/ProductStatusCard/delivery-icon.svg @@ -1,11 +1,11 @@ - - - - - - - - + + + + + + + + diff --git a/src/components/ProductStatusCard/icon-shop.svg b/src/components/ProductStatusCard/icon-shop.svg index 564b601..c981bd6 100644 --- a/src/components/ProductStatusCard/icon-shop.svg +++ b/src/components/ProductStatusCard/icon-shop.svg @@ -1,12 +1,11 @@ - + - - - - - - + + + + + diff --git a/src/components/ProductStatusCard/index.js b/src/components/ProductStatusCard/index.js index 9963b13..3fb29f5 100644 --- a/src/components/ProductStatusCard/index.js +++ b/src/components/ProductStatusCard/index.js @@ -53,7 +53,7 @@ const ProductStatusCard = ({
    ))}
    -

    +

    {separate(price)} تومان

    @@ -66,7 +66,7 @@ const ProductStatusCard = ({
    -

    +

    بازگشت بی چون و چرا

    diff --git a/src/components/ProductStatusCard/info-circle.svg b/src/components/ProductStatusCard/info-circle.svg index 4910bd7..316dc07 100644 --- a/src/components/ProductStatusCard/info-circle.svg +++ b/src/components/ProductStatusCard/info-circle.svg @@ -1,6 +1,6 @@ - - - + + + diff --git a/src/components/ProductStatusCard/shield-tick.svg b/src/components/ProductStatusCard/shield-tick.svg index fd2e0f8..933d500 100644 --- a/src/components/ProductStatusCard/shield-tick.svg +++ b/src/components/ProductStatusCard/shield-tick.svg @@ -1,5 +1,5 @@ - - + + diff --git a/src/components/ProductTab/index.js b/src/components/ProductTab/index.js index 6b2f444..5cce6d5 100644 --- a/src/components/ProductTab/index.js +++ b/src/components/ProductTab/index.js @@ -2,7 +2,7 @@ import React, { useState } from "react"; import Table from "./table"; const ProductTab = ({ tabs }) => { - const [selectedTab, setSelectedTab] = useState(tabs[1]); + const [selectedTab, setSelectedTab] = useState(tabs[0]); return (

    @@ -10,8 +10,8 @@ const ProductTab = ({ tabs }) => {
      {tabs.map((tab, index) => (
    • setSelectedTab(tab)} key={index} @@ -38,11 +38,11 @@ ProductTab.defaultProps = { }, { title: "پرسش", - components: "نقد و بررسی", + components:
      این بخش فعلا قابل دسترسی نیست.
      , }, { title: "سوال", - components: "پرسش و پاسخ", + components:
      این بخش فعلا قابل دسترسی نیست.
      , }, ], }; diff --git a/src/components/ProductTab/table/index.css b/src/components/ProductTab/table/index.css deleted file mode 100644 index cd4a70a..0000000 --- a/src/components/ProductTab/table/index.css +++ /dev/null @@ -1,6 +0,0 @@ -.specifications-li:hover div{ - background-color: rgba(25,110,192,0.15); -} -.specifications-li div{ - transition: all 0.2s; -} \ No newline at end of file diff --git a/src/components/ProductTab/table/index.js b/src/components/ProductTab/table/index.js index f688760..a8c1cea 100644 --- a/src/components/ProductTab/table/index.js +++ b/src/components/ProductTab/table/index.js @@ -1,5 +1,4 @@ import React, { useState } from "react"; -import './index.css'; const persian = { weight: "وزن", @@ -17,14 +16,14 @@ const Table = ({ specifications }) => { return (
        {Object.keys(specifications).map((specification, index) => ( -
      • +
      • {persian[specification]}
        -
        +
        {specifications[specification]}
      • diff --git a/src/components/Progress/index.js b/src/components/Progress/index.js index 8d9bf15..9ea1a4d 100644 --- a/src/components/Progress/index.js +++ b/src/components/Progress/index.js @@ -8,9 +8,9 @@ function Progress({ percent, deskTop }) { }, 1000); }, [percent]); return ( -
        +
        diff --git a/src/components/Switch/index.js b/src/components/Switch/index.js index 972368d..a5161d4 100644 --- a/src/components/Switch/index.js +++ b/src/components/Switch/index.js @@ -1,11 +1,11 @@ import React from "react"; import "./index.scss"; -export default function index() { +export default function Switch({checked}) { return ( -
        - - +
        + +
        ); } diff --git a/src/components/Switch/index.scss b/src/components/Switch/index.scss index 86b36a1..cfacfcb 100644 --- a/src/components/Switch/index.scss +++ b/src/components/Switch/index.scss @@ -9,26 +9,28 @@ // justify-content: center; // } -.switch { +.switchbox { position: relative; input[type="checkbox"] { visibility: hidden; position: absolute; &:checked + label { transform: rotate(0deg); - background-color: #000; + background-color: rgb(18, 207, 127); + border-color: rgb(18, 207, 127) !important; &:before { - transform: translateX(35.5px); + transform: translateX(24px); background-color: #fff; + border-color: rgb(18, 207, 127) !important; } } } label { display: flex; - width: 70px; - height: 34px; - border: 3px solid; + width: 50px; + height: 25px; + border: 3px solid #aaa; border-radius: 99em; position: relative; transition: transform 0.3s ease-in-out; @@ -41,12 +43,12 @@ content: ""; display: block; position: absolute; - width: 24px; - height: 24px; - background-color: #000; + width: 17px; + height: 17px; + background-color: #aaa; border-radius: 50%; - top: 2px; - left: 3px; + top: 1px; + left: 1px; } } } diff --git a/src/components/Textarea/index.js b/src/components/Textarea/index.js index c2574ae..71cbb73 100644 --- a/src/components/Textarea/index.js +++ b/src/components/Textarea/index.js @@ -8,8 +8,8 @@ export default function Textarea({ placeholder, theme, backgroundColor }) {