From 451ae76cb17be9abe207236e27b73f09f94bfcb9 Mon Sep 17 00:00:00 2001 From: Ehsan Date: Fri, 30 Aug 2024 11:59:53 +0330 Subject: [PATCH] design and responsive page doctor and account --- .../component/ProfressDetail.js | 8 +-- app/component/comment/ItemUser.js | 13 ++-- app/component/openLocation/Content.js | 40 +++++++++++ app/component/openLocation/index.js | 51 ++++++++++++++ components/clinic/components/contact/index.js | 2 +- components/doctor/detailDoctor/Link.js | 2 +- .../doctor/detailDoctor/cards/AboutDcotor.js | 2 +- .../cards/comments/chart/ProgressAll.js | 2 +- .../cards/comments/chart/index.js | 25 +++++-- .../detailDoctor/cards/comments/index.js | 14 ++-- .../cards/comments/modal/ModalAnswer.js | 66 +++++++++++++++++++ .../detailDoctor/cards/locations/Item.js | 60 ++++++++++++++--- components/doctor/index.js | 2 +- components/icons/ArrowBottomGrayD.js | 2 +- components/icons/ArrowLeftBlueA.js | 4 +- 15 files changed, 251 insertions(+), 42 deletions(-) rename components/doctor/detailDoctor/cards/comments/chart/ProgressDetail.js => app/component/ProfressDetail.js (74%) create mode 100644 app/component/openLocation/Content.js create mode 100644 app/component/openLocation/index.js create mode 100644 components/doctor/detailDoctor/cards/comments/modal/ModalAnswer.js diff --git a/components/doctor/detailDoctor/cards/comments/chart/ProgressDetail.js b/app/component/ProfressDetail.js similarity index 74% rename from components/doctor/detailDoctor/cards/comments/chart/ProgressDetail.js rename to app/component/ProfressDetail.js index 63452c1..17d17b6 100644 --- a/components/doctor/detailDoctor/cards/comments/chart/ProgressDetail.js +++ b/app/component/ProfressDetail.js @@ -1,14 +1,14 @@ import { numberToArStyle } from "@/helper" import { LinearProgress } from "@mui/material" -function Progress({ data }) { +function ProgressDetail({ data }) { return ( -
  • +
  • {data.label}

    { if (nameIsLike === 'is_like' && data.is_dislike) { @@ -48,14 +48,14 @@ function ItemUser({ update, setUpdate, list, setList, data, loading }) { )} -
    +
    {loading ? ( <> ) : ( -

    {data.comment}

    +

    {data.comment}

    )}
    @@ -139,14 +139,15 @@ function ItemUser({ update, setUpdate, list, setList, data, loading }) {
    )}
      {data.replays.map((item, idx) => ( +
      +

      باز شدن با

      +
      + +
      +
      + +
        + {maps.map((item, idx) => ( +
      • + icon app +

        {item.name}

        +
      • + ))} +
      + + ) +} + +export default Content \ No newline at end of file diff --git a/app/component/openLocation/index.js b/app/component/openLocation/index.js new file mode 100644 index 0000000..3dd0602 --- /dev/null +++ b/app/component/openLocation/index.js @@ -0,0 +1,51 @@ +'use client'; + +import { Drawer, Modal } from "@mui/material"; +import { styleDefault } from "@/mui"; +import Content from "./Content"; + +function ModalOpenLocation({ open, setOpen, handleClose, children }) { + + const toggleDrawer = (newOpen) => () => { + setOpen(newOpen); + }; + + return ( + <> + {/* Button Modal */} + {children} + {/* Content Modal */} + +
      + +
      +
      + +
      + +
      +
      + + ) +} + +export default ModalOpenLocation \ No newline at end of file diff --git a/components/clinic/components/contact/index.js b/components/clinic/components/contact/index.js index f5f42ca..24611ae 100644 --- a/components/clinic/components/contact/index.js +++ b/components/clinic/components/contact/index.js @@ -2,9 +2,9 @@ import { useState } from "react"; import RoutingWhiteC from "@/components/icons/RoutingWhiteC"; import { Button } from "@mui/material"; -import ModalOpenLocation from "./modal"; import Detail from "./Detail"; import RoutingC from "@/components/icons/RoutingC"; +import ModalOpenLocation from "@/app/component/openLocation"; function Contact({ data }) { diff --git a/components/doctor/detailDoctor/Link.js b/components/doctor/detailDoctor/Link.js index 5d658b9..d433ff8 100644 --- a/components/doctor/detailDoctor/Link.js +++ b/components/doctor/detailDoctor/Link.js @@ -27,7 +27,7 @@ function Link() { > +
    diff --git a/components/doctor/detailDoctor/cards/comments/modal/ModalAnswer.js b/components/doctor/detailDoctor/cards/comments/modal/ModalAnswer.js new file mode 100644 index 0000000..b638158 --- /dev/null +++ b/components/doctor/detailDoctor/cards/comments/modal/ModalAnswer.js @@ -0,0 +1,66 @@ +'use client'; + +import { useState } from "react"; +import { styleDefault } from "@/mui"; +import { Box, Button, Modal, Rating, TextField } from "@mui/material"; +import CloseModalD from "@/components/icons/CloseModalD"; +import ProgressDetail from "@/app/component/ProfressDetail"; +import Field from "@/app/component/Field"; + +function ModalAnswer({ doctor }) { + + const [open, setOpen] = useState(true); + const handleOpen = () => setOpen(true); + const handleClose = () => setOpen(false); + + return ( + <> + + + +
    + +
    +

    امتیاز شما به دکتر مهران امینی

    + +
      + {doctor.progress_detail.map((item, idx) => ( + + ))} +
    +
    +

    متن نظر

    + +
    +
    +
    + + ) +} + +export default ModalAnswer \ No newline at end of file diff --git a/components/doctor/detailDoctor/cards/locations/Item.js b/components/doctor/detailDoctor/cards/locations/Item.js index a03343e..48c2640 100644 --- a/components/doctor/detailDoctor/cards/locations/Item.js +++ b/components/doctor/detailDoctor/cards/locations/Item.js @@ -3,11 +3,18 @@ import { useState } from 'react'; import { Button } from '@mui/material'; import ArrowBottomGrayD from '@/components/icons/ArrowBottomGrayD'; +import ModalOpenLocation from '@/app/component/openLocation'; +import RoutingWhiteC from '@/components/icons/RoutingWhiteC'; +import RoutingC from '@/components/icons/RoutingC'; function Item({ data }) { const [isOpen, setIsOpen] = useState(false); + const [open, setOpen] = useState(false); + const handleOpen = () => setOpen(true); + const handleClose = () => setOpen(false); + return ( <>

    آدرس: {data.address}

    تلفن: {data.phone}

    -

    روزهای کاری: {data.working_days}

    +
    +

    روزهای کاری: {data.working_days}

    + + + +
    +
    +
    + + + +
    -
    ) diff --git a/components/doctor/index.js b/components/doctor/index.js index 45a513e..b9801b1 100644 --- a/components/doctor/index.js +++ b/components/doctor/index.js @@ -4,7 +4,7 @@ import Share from "./detailDoctor/Share"; function DoctorPage({ doctor }) { return ( -
    +

    متخصص {doctor.expertise} {' >'}

    diff --git a/components/icons/ArrowBottomGrayD.js b/components/icons/ArrowBottomGrayD.js index 0ccb222..1237d39 100644 --- a/components/icons/ArrowBottomGrayD.js +++ b/components/icons/ArrowBottomGrayD.js @@ -1,7 +1,7 @@ function ArrowBottomGrayD() { return ( - + ) } diff --git a/components/icons/ArrowLeftBlueA.js b/components/icons/ArrowLeftBlueA.js index 0e25c17..2bea163 100644 --- a/components/icons/ArrowLeftBlueA.js +++ b/components/icons/ArrowLeftBlueA.js @@ -1,8 +1,8 @@ function ArrowLeftBlueA() { return ( - - + + ) }