From 707206450c592184853085bd8918b095da2987d6 Mon Sep 17 00:00:00 2001 From: Ehsan Date: Thu, 29 Aug 2024 03:18:01 +0330 Subject: [PATCH] responsive page doctor item & page booking --- components/clinic/components/about/index.js | 1 + components/clinic/components/contact/index.js | 10 ++-- .../clinic/components/contact/modal/index.js | 4 +- .../doctor/appointmentList/ItemAppointment.js | 4 +- components/doctor/detailDoctor/Link.js | 51 +++++++++++-------- components/doctor/detailDoctor/Title.js | 30 ++++++----- .../doctor/detailDoctor/cards/AboutDcotor.js | 33 ++++++++++-- .../detailDoctor/cards/locations/Item.js | 9 ++-- .../detailDoctor/cards/locations/index.js | 4 +- components/doctor/index.js | 2 +- 10 files changed, 96 insertions(+), 52 deletions(-) diff --git a/components/clinic/components/about/index.js b/components/clinic/components/about/index.js index 95937e2..42ff271 100644 --- a/components/clinic/components/about/index.js +++ b/components/clinic/components/about/index.js @@ -1,4 +1,5 @@ import { useState } from "react"; + import ListBime from "./ListBime"; import Services from "./Services"; import Images from "./iamges/Images"; diff --git a/components/clinic/components/contact/index.js b/components/clinic/components/contact/index.js index 8c07f12..f5f42ca 100644 --- a/components/clinic/components/contact/index.js +++ b/components/clinic/components/contact/index.js @@ -2,7 +2,7 @@ import { useState } from "react"; import RoutingWhiteC from "@/components/icons/RoutingWhiteC"; import { Button } from "@mui/material"; -import ModalSearchCity from "./modal"; +import ModalOpenLocation from "./modal"; import Detail from "./Detail"; import RoutingC from "@/components/icons/RoutingC"; @@ -22,7 +22,7 @@ function Contact({ data }) { >
- مسیریابی - +
- - +
) diff --git a/components/clinic/components/contact/modal/index.js b/components/clinic/components/contact/modal/index.js index 51339c9..3dd0602 100644 --- a/components/clinic/components/contact/modal/index.js +++ b/components/clinic/components/contact/modal/index.js @@ -4,7 +4,7 @@ import { Drawer, Modal } from "@mui/material"; import { styleDefault } from "@/mui"; import Content from "./Content"; -function ModalSearchCity({ open, setOpen, handleClose, children }) { +function ModalOpenLocation({ open, setOpen, handleClose, children }) { const toggleDrawer = (newOpen) => () => { setOpen(newOpen); @@ -48,4 +48,4 @@ function ModalSearchCity({ open, setOpen, handleClose, children }) { ) } -export default ModalSearchCity \ No newline at end of file +export default ModalOpenLocation \ No newline at end of file diff --git a/components/doctor/appointmentList/ItemAppointment.js b/components/doctor/appointmentList/ItemAppointment.js index b6168e7..d326acc 100644 --- a/components/doctor/appointmentList/ItemAppointment.js +++ b/components/doctor/appointmentList/ItemAppointment.js @@ -25,7 +25,7 @@ function ItemAppointment({ turn, doctor }) {

تخصص: {doctor.expertise}

-
+

اولین نوبت آزاد: {turn.first_free_turn}

@@ -33,7 +33,7 @@ function ItemAppointment({ turn, doctor }) { - - {listLink.length > idx + 1 && ( - - )} - - ))} - + variant="text"> + {item.name} + + + {listLink.length > idx + 1 && ( + + )} + + ))} + + ) } diff --git a/components/doctor/detailDoctor/Title.js b/components/doctor/detailDoctor/Title.js index 9a830f8..e77b392 100644 --- a/components/doctor/detailDoctor/Title.js +++ b/components/doctor/detailDoctor/Title.js @@ -5,31 +5,37 @@ import Image from "next/image" function Title({ doctor }) { return ( -
+
img-doctor -
-

{doctor.name}

-

تخصص: {doctor.expertise}

+
+

{doctor.name}

+

تخصص: {doctor.expertise}

{doctor.experience} سال تجربه

- -

کد نظام پزشکی: {doctor.medical_system_code}

+
+ +
+

کد نظام پزشکی: {doctor.medical_system_code}

-
+
-

امتیاز: {doctor.point}

+

امتیاز: {doctor.point}

-
+
-

{doctor.satisfaction}% رضایت کاربران

+

{doctor.satisfaction}% رضایت کاربران

diff --git a/components/doctor/detailDoctor/cards/AboutDcotor.js b/components/doctor/detailDoctor/cards/AboutDcotor.js index 0afb6ab..2f09bdc 100644 --- a/components/doctor/detailDoctor/cards/AboutDcotor.js +++ b/components/doctor/detailDoctor/cards/AboutDcotor.js @@ -1,13 +1,40 @@ +'use client'; + +import { useState } from "react"; +import { Button } from "@mui/material" + function AboutDcotor({ doctor }) { + + const [isMore, setIsMore] = useState(false); + return (
-

{doctor.detail}

-
-

تخصص ها

+
+

{doctor.detail}

+ +
+
+

تخصص ها

    {doctor.specialties.map((item, idx) => (
  • diff --git a/components/doctor/detailDoctor/cards/locations/Item.js b/components/doctor/detailDoctor/cards/locations/Item.js index 271dd16..a03343e 100644 --- a/components/doctor/detailDoctor/cards/locations/Item.js +++ b/components/doctor/detailDoctor/cards/locations/Item.js @@ -39,16 +39,19 @@ function Item({ data }) { 'max-h-0'} `} > -
    +

    آدرس: {data.address}

    تلفن: {data.phone}

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

    diff --git a/components/doctor/detailDoctor/cards/locations/index.js b/components/doctor/detailDoctor/cards/locations/index.js index 1685f7b..421d470 100644 --- a/components/doctor/detailDoctor/cards/locations/index.js +++ b/components/doctor/detailDoctor/cards/locations/index.js @@ -4,7 +4,7 @@ function Locations({ doctor }) { return (

    موقعیت مکانی

      {doctor.locations.map((item, idx) => ( @@ -14,7 +14,7 @@ function Locations({ doctor }) { data={item} /> {doctor.locations.length > idx + 1 && ( - + )} ))} diff --git a/components/doctor/index.js b/components/doctor/index.js index 55f4bba..45a513e 100644 --- a/components/doctor/index.js +++ b/components/doctor/index.js @@ -6,7 +6,7 @@ function DoctorPage({ doctor }) { return (
      -
      +

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

      {doctor.name}