diff --git a/app/account/[slug]/page.js b/app/account/[slug]/page.js new file mode 100644 index 0000000..1ec7500 --- /dev/null +++ b/app/account/[slug]/page.js @@ -0,0 +1,16 @@ +import AccountPage from '@/components/account'; +import doctors from '@/data/doctors.json'; +import Layout from '@/components/layout'; + +function Account({ params: { slug } }) { + + const doctor = doctors.find(item => item.id === +slug); + + return ( + + + + ) +} + +export default Account \ No newline at end of file diff --git a/app/component/date/datePicker/index.js b/app/component/date/datePicker/index.js index 04e872d..b1f1728 100644 --- a/app/component/date/datePicker/index.js +++ b/app/component/date/datePicker/index.js @@ -1,33 +1,44 @@ -'use client' +'use client'; import { useState } from 'react'; -import { DatePicker as DatePickerJalali, RangePicker } from "jalaali-react-date-picker"; +import { DatePicker as DatePickerJalali } from "jalaali-react-date-picker"; -function DatePicker({ type, date, updateDate, text, from }) { +function DatePicker({ date, updateDate }) { + const [startDate, setStartDate] = useState(null); + const [endDate, setEndDate] = useState(null); - const [anchorEl, setAnchorEl] = useState(null); - - const handleClick = (event) => { - setAnchorEl(event.currentTarget); + const handleStartDateChange = (date) => { + if (date) { + setStartDate(date); + setEndDate(null); // Clear end date if start date is selected + // updateDate(date); // Notify parent about the selected date + } }; - const handleClose = () => setAnchorEl(null); - - const open = true; - const id = open ? 'simple-popover' : undefined; + const handleEndDateChange = (date) => { + if (date) { + setEndDate(date); + setStartDate(null); // Clear start date if end date is selected + // updateDate(date); // Notify parent about the selected date + } + }; return ( -
- { - // if (e._d) { - // updateDate(e._d, type) - // } - // handleClose() - }} +
+ +
- ) + ); } -export default DatePicker \ No newline at end of file +export default DatePicker; diff --git a/app/component/date/dateTime/index.js b/app/component/date/dateTime/index.js index 6d5f561..ec66eb5 100644 --- a/app/component/date/dateTime/index.js +++ b/app/component/date/dateTime/index.js @@ -5,6 +5,7 @@ import Tabs from "../../Tabs"; import Hours from "./Hours"; import { Button } from "@mui/material"; import ArrowLeftB from "@/components/icons/ArrowLeftB"; +import Link from "next/link"; const listTab = ['صبح', 'بعد از ظهر']; const nameHours = ['hours_morning', 'hours_afternoon'] @@ -32,13 +33,20 @@ function DateTime({ doctor }) { nameHours={nameHours} />
- + +
) diff --git a/app/component/element/AutoCompleteSelect.js b/app/component/element/AutoCompleteSelect.js index 1c8caa2..60513f5 100644 --- a/app/component/element/AutoCompleteSelect.js +++ b/app/component/element/AutoCompleteSelect.js @@ -7,7 +7,7 @@ function AutoCompleteSelect({ list, updateData, name, label }) { updateData && updateData(event, name) diff --git a/app/globals.css b/app/globals.css index bd9b38e..e4dc65a 100644 --- a/app/globals.css +++ b/app/globals.css @@ -183,6 +183,7 @@ html { background-size: cover !important; background-repeat: no-repeat !important; background-position: center !important; + z-index: -10; } .bg-banner-register { diff --git a/app/login-verify/page.js b/app/login-verify/page.js index 5a895e2..56e01b8 100644 --- a/app/login-verify/page.js +++ b/app/login-verify/page.js @@ -1,12 +1,23 @@ -import Layout from '@/components/layout' -import LoginVerifyPage from '@/components/loginVerify' -import React from 'react' +'use client'; + +import RegisterPage from '@/components/register'; +import SetCodePage from '@/components/register/SetCodePage'; +import SignInPage from '@/components/register/SignInPage'; +import { useState } from 'react'; function LoginVerify() { + + const [isSendMsg, setIsSendMsg] = useState(false); + return ( - - - + + {isSendMsg ? + : + } + ) } diff --git a/app/signin/page.js b/app/signin/page.js index 1e68183..324137b 100644 --- a/app/signin/page.js +++ b/app/signin/page.js @@ -12,7 +12,10 @@ function SignIn() {
{isSendMsg ? - : + : }
diff --git a/components/account/detailDoctor/Detail.js b/components/account/detailDoctor/Detail.js new file mode 100644 index 0000000..48b0f48 --- /dev/null +++ b/components/account/detailDoctor/Detail.js @@ -0,0 +1,64 @@ +import ArrowLeftOrangeA from "@/components/icons/ArrowLeftOrangeA" +import CalendarA from "@/components/icons/CalendarA" +import ClockA from "@/components/icons/ClockA" +import LocationA from "@/components/icons/LocationA" +import TickCircleOrange from "@/components/icons/TickCircleOrange" +import { Button } from "@mui/material" + +function Detail({ doctor }) { + return ( +
+ + + +
+ ) +} + +export default Detail \ No newline at end of file diff --git a/components/account/detailDoctor/Head.js b/components/account/detailDoctor/Head.js new file mode 100644 index 0000000..3f2db24 --- /dev/null +++ b/components/account/detailDoctor/Head.js @@ -0,0 +1,20 @@ +import Image from "next/image" + +function Head({ doctor }) { + return ( +
+ profile doctor +
+

{doctor.name}

+

تخصص: {doctor.expertise}

+
+
+ ) +} + +export default Head \ No newline at end of file diff --git a/components/account/detailDoctor/index.js b/components/account/detailDoctor/index.js new file mode 100644 index 0000000..8d6d60a --- /dev/null +++ b/components/account/detailDoctor/index.js @@ -0,0 +1,14 @@ +import Detail from "./Detail" +import Head from "./Head" + +function DetailDoctor({ doctor }) { + return ( +
+

جزئیات نوبت

+ + +
+ ) +} + +export default DetailDoctor \ No newline at end of file diff --git a/components/account/index.js b/components/account/index.js new file mode 100644 index 0000000..862477f --- /dev/null +++ b/components/account/index.js @@ -0,0 +1,17 @@ +import DetailDoctor from "./detailDoctor" +import Information from "./information"; + +function AccountPage({ doctor }) { + return ( +
+ + +
+ ) +} + +export default AccountPage \ No newline at end of file diff --git a/components/account/information/detail/Content.js b/components/account/information/detail/Content.js new file mode 100644 index 0000000..f6d97de --- /dev/null +++ b/components/account/information/detail/Content.js @@ -0,0 +1,17 @@ +function Content({ isConfirmed, children, title }) { + return ( +
+
+

{title}

+ {isConfirmed && ( +

تایید شده

+ )} +
+ {children} +
+ ) +} + +export default Content \ No newline at end of file diff --git a/components/account/information/detail/EditField.js b/components/account/information/detail/EditField.js new file mode 100644 index 0000000..b0f134d --- /dev/null +++ b/components/account/information/detail/EditField.js @@ -0,0 +1,42 @@ +import EditOrangeA from "@/components/icons/EditOrangeA" +import { Button, TextField } from "@mui/material" + +function EditField({ changeData, data, name }) { + return ( +
+ { + changeData(e.target.value, 'value', name) + }} + sx={{ + '& .MuiFormLabel-root': { + top: '-4px !important' + }, + '& .MuiInputBase-input': { padding: '12.5px 14px' }, + '& .MuiInputBase-root': { borderRadius: '6px !important' }, + '& .MuiOutlinedInput-notchedOutline': { border: '1px solid #E9ECEF !important' }, + ".Mui-focused": { + '& .MuiOutlinedInput-notchedOutline': { + border: '1px solid #5559CE !important', + transition: '0.5s all' + } + } + }} + /> + +
+ ) +} + +export default EditField \ No newline at end of file diff --git a/components/account/information/detail/Form.js b/components/account/information/detail/Form.js new file mode 100644 index 0000000..a047649 --- /dev/null +++ b/components/account/information/detail/Form.js @@ -0,0 +1,35 @@ +import AutoCompleteSelect from "@/app/component/element/AutoCompleteSelect"; +import EditField from "./EditField"; +import Content from "./Content"; + +const bime = [ + { label: 'بیمه 1', id: 10 }, + { label: 'بیمه 2', id: 20 }, + { label: 'بیمه 3', id: 30 } +]; + +function Form({ changeData, data, updateSelect, isForAnother }) { + return ( +
+ + + + + + + + + + + + +
+ ) +} + +export default Form \ No newline at end of file diff --git a/components/account/information/detail/index.js b/components/account/information/detail/index.js new file mode 100644 index 0000000..87c1079 --- /dev/null +++ b/components/account/information/detail/index.js @@ -0,0 +1,72 @@ +import { useState } from "react"; +import Form from "./Form"; +import { Button } from "@mui/material"; +import AddCircleBlueA from "@/components/icons/AddCircleBlueA"; +import ArrowLeftB from "@/components/icons/ArrowLeftB"; + +function Detail({ isForAnother, setIsForAnother, setIsPay }) { + + + const [selected, setSelected] = useState({ + first: '', + second: '' + }); + const [data, setData] = useState({ + phone: { value: '09121056987', isEdit: false }, + codemeli: { value: '1741025645', isEdit: false }, + name: { value: 'ساغر صابری نژاد', isEdit: false } + }); + + const changeData = (value, type, name) => + setData({ + ...data, + [name]: { + ...data[name], + [type]: value + } + }); + + const updateSelect = (event, name) => setSelected({ ...selected, [name]: event.target.innerText }) + + return ( + <> +

+ {isForAnother ? 'اطلاعات کاربر جدید' : 'اطلاعات حساب کاربری'} +

+
+ {!isForAnother && ( + + )} + + + ) +} + +export default Detail \ No newline at end of file diff --git a/components/account/information/index.js b/components/account/information/index.js new file mode 100644 index 0000000..877ddb3 --- /dev/null +++ b/components/account/information/index.js @@ -0,0 +1,27 @@ +'use client'; + +import { useState } from "react"; +import Detail from "./detail"; +import Payment from "./payment"; + +function Information() { + + const [isForAnother, setIsForAnother] = useState(false) + + const [isPay, setIsPay] = useState(false); + + return ( +
+ {isPay ? + : + + } +
+ ) +} + +export default Information \ No newline at end of file diff --git a/components/account/information/payment/FailedPay.js b/components/account/information/payment/FailedPay.js new file mode 100644 index 0000000..28747e5 --- /dev/null +++ b/components/account/information/payment/FailedPay.js @@ -0,0 +1,7 @@ +function FailedPay() { + return ( +
FailedPay
+ ) +} + +export default FailedPay \ No newline at end of file diff --git a/components/account/information/payment/Paying.js b/components/account/information/payment/Paying.js new file mode 100644 index 0000000..a43076a --- /dev/null +++ b/components/account/information/payment/Paying.js @@ -0,0 +1,30 @@ +import ArrowLeftB from '@/components/icons/ArrowLeftB'; +import { Button } from '@mui/material'; + +function Paying({ setTypePay }) { + return ( + <> +

+ اطلاعات پرداخت +

+
+

مبلغ پیش پرداخت (بیعانه) :

+

20،000 تومان

+
+ +
+

مبلغ قابل پرداخت : 20،000 تومان

+ +
+ + ) +} + +export default Paying \ No newline at end of file diff --git a/components/account/information/payment/SuccessPay.js b/components/account/information/payment/SuccessPay.js new file mode 100644 index 0000000..459c43a --- /dev/null +++ b/components/account/information/payment/SuccessPay.js @@ -0,0 +1,7 @@ +function SuccessPay() { + return ( +
SuccessPay
+ ) +} + +export default SuccessPay \ No newline at end of file diff --git a/components/account/information/payment/index.js b/components/account/information/payment/index.js new file mode 100644 index 0000000..9c34df8 --- /dev/null +++ b/components/account/information/payment/index.js @@ -0,0 +1,22 @@ +import { useState } from "react"; +import SuccessPay from "./SuccessPay"; +import FailedPay from "./FailedPay"; +import Paying from "./Paying"; + +function Payment() { + + const [typePay, setTypePay] = useState('default'); + + return ( + <> + {typePay === 'default' ? + : + typePay === 'success' ? + : + + } + + ) +} + +export default Payment \ No newline at end of file diff --git a/components/home/search/modal/index.js b/components/home/search/modal/index.js index 047b008..3955acf 100644 --- a/components/home/search/modal/index.js +++ b/components/home/search/modal/index.js @@ -72,7 +72,7 @@ function ModalSearchCity() {

شهر یا استان مورد نظر را انتخاب نمایید:

-
+
+ + + + + ) +} + +export default AddCircleBlueA \ No newline at end of file diff --git a/components/icons/ArrowLeftB.js b/components/icons/ArrowLeftB.js index b724325..e084c65 100644 --- a/components/icons/ArrowLeftB.js +++ b/components/icons/ArrowLeftB.js @@ -1,8 +1,8 @@ function ArrowLeftB() { return ( - - + + ) } diff --git a/components/icons/ArrowLeftOrangeA.js b/components/icons/ArrowLeftOrangeA.js new file mode 100644 index 0000000..f812009 --- /dev/null +++ b/components/icons/ArrowLeftOrangeA.js @@ -0,0 +1,9 @@ +function ArrowLeftOrangeA() { + return ( + + + + ) +} + +export default ArrowLeftOrangeA \ No newline at end of file diff --git a/components/icons/CalendarA.js b/components/icons/CalendarA.js new file mode 100644 index 0000000..2c29d22 --- /dev/null +++ b/components/icons/CalendarA.js @@ -0,0 +1,18 @@ +function CalendarA() { + return ( + + + + + + + + + + + + + ) +} + +export default CalendarA \ No newline at end of file diff --git a/components/icons/ClockA.js b/components/icons/ClockA.js new file mode 100644 index 0000000..a9bb19d --- /dev/null +++ b/components/icons/ClockA.js @@ -0,0 +1,10 @@ +function ClockA() { + return ( + + + + + ) +} + +export default ClockA \ No newline at end of file diff --git a/components/icons/EditOrangeA.js b/components/icons/EditOrangeA.js new file mode 100644 index 0000000..9ee9342 --- /dev/null +++ b/components/icons/EditOrangeA.js @@ -0,0 +1,11 @@ +function EditOrangeA() { + return ( + + + + + + ) +} + +export default EditOrangeA \ No newline at end of file diff --git a/components/icons/LocationA.js b/components/icons/LocationA.js new file mode 100644 index 0000000..963d5d6 --- /dev/null +++ b/components/icons/LocationA.js @@ -0,0 +1,10 @@ +function LocationA() { + return ( + + + + + ) +} + +export default LocationA \ No newline at end of file diff --git a/components/icons/RoutingWhiteC.js b/components/icons/RoutingWhiteC.js index f637f39..3b88778 100644 --- a/components/icons/RoutingWhiteC.js +++ b/components/icons/RoutingWhiteC.js @@ -1,12 +1,12 @@ function RoutingWhiteC() { return ( - - - - - - + + + + + + ) } diff --git a/components/layout/index.js b/components/layout/index.js index 1b3d167..6c2c71b 100644 --- a/components/layout/index.js +++ b/components/layout/index.js @@ -8,7 +8,7 @@ import Aos from "aos"; import "aos/dist/aos.css"; import { useEffect } from "react"; -function Layout({ children, title, name }) { +function Layout({ children, title, name, disableFooter }) { useEffect(() => { Aos.init({ duration: 1000 }); @@ -24,11 +24,13 @@ function Layout({ children, title, name }) { {children} -
-
-
-
-
+ {disableFooter ? undefined : ( +
+
+
+
+
+ )}
) } diff --git a/components/register/SetCodePage.js b/components/register/SetCodePage.js index daa9177..538ff36 100644 --- a/components/register/SetCodePage.js +++ b/components/register/SetCodePage.js @@ -4,7 +4,7 @@ import OTPForm from "./element/OTPForm" import ArrowLeftOrangeS from "../icons/ArrowLeftOrangeS" import Link from "next/link" -function SetCodePage({ setIsSendMsg }) { +function SetCodePage({ setIsSendMsg, link }) { const handleOTP = (e) => { e.target.nextElementSibling && @@ -37,7 +37,7 @@ function SetCodePage({ setIsSendMsg }) {
- +
- - - +

قوانین استفاده از نوبت 724 را می پذیرم.

diff --git a/package-lock.json b/package-lock.json index d50ccc7..9f1fa75 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "@mui/material": "^5.14.17", "@mui/styled-engine-sc": "^6.0.0-alpha.18", "aos": "^2.3.4", + "date-fns": "^3.6.0", "i": "^0.3.7", "jalaali-react-date-picker": "^1.0.18", "next": "14.2.3", @@ -7142,6 +7143,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/date-fns": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-3.6.0.tgz", + "integrity": "sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/kossnocorp" + } + }, "node_modules/debug": { "version": "4.3.6", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", diff --git a/package.json b/package.json index 1de103a..364476f 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "@mui/material": "^5.14.17", "@mui/styled-engine-sc": "^6.0.0-alpha.18", "aos": "^2.3.4", + "date-fns": "^3.6.0", "i": "^0.3.7", "jalaali-react-date-picker": "^1.0.18", "next": "14.2.3",