diff --git a/app/booking/[slug]/page.js b/app/booking/[slug]/page.js new file mode 100644 index 0000000..8b077b6 --- /dev/null +++ b/app/booking/[slug]/page.js @@ -0,0 +1,18 @@ +import BookingPage from '@/components/booking'; +import Layout from '@/components/layout'; +import doctors from '@/data/doctors.json'; + +function Booking({ params: { slug } }) { + + const doctor = doctors.find(item => item.id === +slug); + + return ( + + + + ) +} + +export default Booking \ No newline at end of file diff --git a/app/booking/index.js b/app/booking/index.js deleted file mode 100644 index a424e40..0000000 --- a/app/booking/index.js +++ /dev/null @@ -1,12 +0,0 @@ -import BookingPage from '@/components/booking'; -import Layout from '@/components/layout'; - -function Booking() { - return ( - - - - ) -} - -export default Booking \ No newline at end of file diff --git a/app/component/date/datePicker/index.js b/app/component/date/datePicker/index.js index c40d907..04e872d 100644 --- a/app/component/date/datePicker/index.js +++ b/app/component/date/datePicker/index.js @@ -1,8 +1,7 @@ +'use client' + import { useState } from 'react'; -import { Popover } from '@mui/material'; -import { DatePicker as DatePickerJalali } from "jalaali-react-date-picker"; -import Field from './Field'; -import ButtonDate from './ButtonDate'; +import { DatePicker as DatePickerJalali, RangePicker } from "jalaali-react-date-picker"; function DatePicker({ type, date, updateDate, text, from }) { @@ -19,25 +18,14 @@ function DatePicker({ type, date, updateDate, text, from }) { return (
- {/* {from && from === 'register' ? ( - - ) : ( - - )} */} - { - if (e._d) { - updateDate(e._d, type) - } - handleClose() - }} - /> + { + // if (e._d) { + // updateDate(e._d, type) + // } + // handleClose() + }} + />
) } diff --git a/app/component/date/dateTime/Hours.js b/app/component/date/dateTime/Hours.js new file mode 100644 index 0000000..7b60f1a --- /dev/null +++ b/app/component/date/dateTime/Hours.js @@ -0,0 +1,31 @@ +import { Button } from "@mui/material"; + +function Hours({ doctor, hour, setHour, value, nameHours }) { + return ( + + ) +} + +export default Hours; \ No newline at end of file diff --git a/app/component/date/dateTime/TabsTime.js b/app/component/date/dateTime/TabsTime.js deleted file mode 100644 index c465286..0000000 --- a/app/component/date/dateTime/TabsTime.js +++ /dev/null @@ -1,7 +0,0 @@ -function TabsTime() { - return ( -
TabsTime
- ) -} - -export default TabsTime; \ No newline at end of file diff --git a/app/component/date/dateTime/index.js b/app/component/date/dateTime/index.js index 8fcbbb1..6d5f561 100644 --- a/app/component/date/dateTime/index.js +++ b/app/component/date/dateTime/index.js @@ -1,21 +1,45 @@ +'use client'; + import { useState } from "react"; -import Tabs from "../../Tabs" +import Tabs from "../../Tabs"; +import Hours from "./Hours"; +import { Button } from "@mui/material"; +import ArrowLeftB from "@/components/icons/ArrowLeftB"; const listTab = ['صبح', 'بعد از ظهر']; +const nameHours = ['hours_morning', 'hours_afternoon'] -function DateTime() { +function DateTime({ doctor }) { const [value, setValue] = useState(0); + const [hour, setHour] = useState(0); + const handleChange = (event, newValue) => setValue(newValue); return ( -
+
+ +
+ +
) } diff --git a/app/globals.css b/app/globals.css index 0f2ebcf..bd9b38e 100644 --- a/app/globals.css +++ b/app/globals.css @@ -385,4 +385,9 @@ html { display: none !important; } +.day.hovered.today { + border: 1px solid #F79463; + border-radius: 50%; +} + /* End Date Picker Style */ \ No newline at end of file diff --git a/app/login-verify/page.js b/app/login-verify/page.js new file mode 100644 index 0000000..5a895e2 --- /dev/null +++ b/app/login-verify/page.js @@ -0,0 +1,13 @@ +import Layout from '@/components/layout' +import LoginVerifyPage from '@/components/loginVerify' +import React from 'react' + +function LoginVerify() { + return ( + + + + ) +} + +export default LoginVerify \ No newline at end of file diff --git a/components/booking/date/PlaceVisit.js b/components/booking/date/PlaceVisit.js new file mode 100644 index 0000000..11bb1b7 --- /dev/null +++ b/components/booking/date/PlaceVisit.js @@ -0,0 +1,30 @@ +'use client'; + +import AutoCompleteSelect from "@/app/component/element/AutoCompleteSelect" +import { useState } from "react"; + +function PlaceVisit() { + + const clinics = [ + { label: 'درمانگاه رازی', id: 10 }, + { label: 'درمانگاه ابوعلی', id: 20 }, + { label: 'درمانگاه مرکزی', id: 30 } + ]; + + const [locateVisit, setLocateVisit] = useState(); + + const updateData = event => setLocateVisit(event.target.innerText); + + return ( +
+

1. انتخاب محل ویزیت

+ +
+ ) +} + +export default PlaceVisit \ No newline at end of file diff --git a/components/booking/date/Time/SelectDatePicker.js b/components/booking/date/Time/SelectDatePicker.js new file mode 100644 index 0000000..9acde85 --- /dev/null +++ b/components/booking/date/Time/SelectDatePicker.js @@ -0,0 +1,11 @@ +import DatePicker from "@/app/component/date/datePicker" + +function SelectDatePicker() { + return ( +
+ +
+ ) +} + +export default SelectDatePicker \ No newline at end of file diff --git a/components/booking/date/Time/index.js b/components/booking/date/Time/index.js new file mode 100644 index 0000000..c0ec69f --- /dev/null +++ b/components/booking/date/Time/index.js @@ -0,0 +1,12 @@ +import SelectDatePicker from "./SelectDatePicker" + +function Time() { + return ( +
+

2. انتخاب روز

+ +
+ ) +} + +export default Time \ No newline at end of file diff --git a/components/booking/date/hour/index.js b/components/booking/date/hour/index.js new file mode 100644 index 0000000..98dfb9e --- /dev/null +++ b/components/booking/date/hour/index.js @@ -0,0 +1,14 @@ +import DateTime from "@/app/component/date/dateTime" + +function Hour({ doctor }) { + return ( +
+

3. انتخاب ساعت

+ +
+ ) +} + +export default Hour \ No newline at end of file diff --git a/components/booking/date/index.js b/components/booking/date/index.js new file mode 100644 index 0000000..e712fb5 --- /dev/null +++ b/components/booking/date/index.js @@ -0,0 +1,15 @@ +import Hour from "./hour" +import PlaceVisit from "./PlaceVisit" +import Time from "./Time" + +function Date({ doctor }) { + return ( +
+ +
+ ) +} + +export default Date \ No newline at end of file diff --git a/components/booking/detail/Address.js b/components/booking/detail/Address.js new file mode 100644 index 0000000..9a794a0 --- /dev/null +++ b/components/booking/detail/Address.js @@ -0,0 +1,23 @@ +import React from 'react' + +function Address({ doctor }) { + return ( + + ) +} + +export default Address \ No newline at end of file diff --git a/components/booking/detail/Head.js b/components/booking/detail/Head.js new file mode 100644 index 0000000..aaba32e --- /dev/null +++ b/components/booking/detail/Head.js @@ -0,0 +1,21 @@ +import Image from 'next/image' +import React from 'react' + +function Head({ doctor }) { + return ( +
+ profile +
+

{doctor.name}

+

تخصص: {doctor.expertise}

+
+
+ ) +} + +export default Head \ No newline at end of file diff --git a/components/booking/detail/index.js b/components/booking/detail/index.js new file mode 100644 index 0000000..d0f6b10 --- /dev/null +++ b/components/booking/detail/index.js @@ -0,0 +1,18 @@ +import Address from "./Address"; +import Head from "./Head"; + +function Detail({ doctor }) { + return ( +
+
+ +
+
+
+ ) +} + +export default Detail \ No newline at end of file diff --git a/components/booking/index.js b/components/booking/index.js index 9516acf..01e3122 100644 --- a/components/booking/index.js +++ b/components/booking/index.js @@ -1,7 +1,13 @@ -function BookingPage() { - return ( -
+import Date from "./date"; +import Detail from "./detail"; +function BookingPage({ doctor }) { + return ( +
+ +
) } diff --git a/components/doctor/appointmentList/ItemAppointment.js b/components/doctor/appointmentList/ItemAppointment.js index bef4883..b6168e7 100644 --- a/components/doctor/appointmentList/ItemAppointment.js +++ b/components/doctor/appointmentList/ItemAppointment.js @@ -2,6 +2,7 @@ import ArrowLeftD from '@/components/icons/ArrowLeftD' import GreenCalendarTurn from '@/components/icons/GreenCalendarTurn' import { Button } from '@mui/material' import Image from 'next/image' +import Link from 'next/link' import React from 'react' function ItemAppointment({ turn, doctor }) { @@ -29,15 +30,17 @@ function ItemAppointment({ turn, doctor }) {

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

- + + +
) diff --git a/components/doctor/appointmentList/index.js b/components/doctor/appointmentList/index.js index ff10f1d..66e5299 100644 --- a/components/doctor/appointmentList/index.js +++ b/components/doctor/appointmentList/index.js @@ -1,28 +1,17 @@ 'use client'; -import { useState } from 'react'; - import turns from '@/data/turns.json'; -import ModalDatePicker from './modal'; import { Button } from '@mui/material'; import ItemAppointment from './ItemAppointment'; import ArrowLeftD from '@/components/icons/ArrowLeftD'; +import Link from 'next/link'; function AppointmentList({ doctor }) { const itemActive = turns[0]; - const [open, setOpen] = useState(true); - - const handleOpen = () => setOpen(true); - const handleClose = () => setOpen(false); - return ( <> -