diff --git a/app/booking/[slug]/page.js b/app/booking/[slug]/page.js index 4d8098d..5c2b81e 100644 --- a/app/booking/[slug]/page.js +++ b/app/booking/[slug]/page.js @@ -7,12 +7,12 @@ import doctors from '@/data/doctors.json'; import Date from '@/components/booking/date'; import BookingPage from '@/components/booking'; import RegisterPage from '@/components/register'; -import SetCodePage from '@/components/register/SetCodePage'; import Paying from '@/components/booking/paying'; +import Detail from '@/components/booking/detail'; +import FailedPay from '@/components/booking/failedPay'; import LogInPage from '@/components/register/LogInPage'; import SuccessPay from '@/components/booking/successPay'; -import FailedPay from '@/components/booking/failedPay'; -import Detail from '@/components/booking/detail'; +import SetCodePage from '@/components/register/SetCodePage'; function Booking({ params: { slug } }) { diff --git a/app/component/CustomTable.js b/app/component/CustomTable.js new file mode 100644 index 0000000..35c2d8e --- /dev/null +++ b/app/component/CustomTable.js @@ -0,0 +1,32 @@ +import { Table, TableBody, TableCell, TableContainer, TableHead, TableRow } from '@mui/material' + +function CustomTable({ tableHead, centerTable, children }) { + return ( + + + + + {tableHead.map((item, idx) => ( + i === idx) ? '!text-center' : '!text-start'} + `} + > + {item} + + ))} + + + + {children} + +
+
+ ) +} + +export default CustomTable \ No newline at end of file diff --git a/components/booking/detail/EditField.js b/app/component/EditField.js similarity index 83% rename from components/booking/detail/EditField.js rename to app/component/EditField.js index 2f55cdd..8bbf39f 100644 --- a/components/booking/detail/EditField.js +++ b/app/component/EditField.js @@ -1,7 +1,8 @@ +import EditGrayA from "@/components/icons/EditGrayA" import EditOrangeA from "@/components/icons/EditOrangeA" import { Button, TextField } from "@mui/material" -function EditField({ changeData, data, name }) { +function EditField({ changeData, data, name, iconGray }) { return (
- + {iconGray ? ( + + ) : ( + + )}
) diff --git a/app/component/Tabs.js b/app/component/Tabs.js index 55ea2b2..68a0f68 100644 --- a/app/component/Tabs.js +++ b/app/component/Tabs.js @@ -7,7 +7,7 @@ function a11yProps(index) { }; }; -function Tabs({ value, handleChange, listTab, isSm }) { +function Tabs({ value, handleChange, listTab, isSm, style }) { return ( {listTab.map((item, idx) => ( diff --git a/app/component/date/dateTime/index.js b/app/component/date/dateTime/index.js index 7b1c749..f5f825e 100644 --- a/app/component/date/dateTime/index.js +++ b/app/component/date/dateTime/index.js @@ -20,6 +20,23 @@ function DateTime({ doctor, setStep, setIsError, locateVisit }) {
- - - ) -} - -export default Dashboard \ No newline at end of file diff --git a/app/dashboard/user-account/page.js b/app/dashboard/user-account/page.js new file mode 100644 index 0000000..2d88ffd --- /dev/null +++ b/app/dashboard/user-account/page.js @@ -0,0 +1,13 @@ +import userData from '@/data/userData.json'; +import DashboardPage from "@/components/dashboard"; +import UserAccountPage from "@/components/dashboard/userAccount/UserAccount"; + +function UserAccount() { + return ( + + + + ) +} + +export default UserAccount \ No newline at end of file diff --git a/app/globals.css b/app/globals.css index b752ab5..e3bea30 100644 --- a/app/globals.css +++ b/app/globals.css @@ -171,6 +171,10 @@ html { background: url(../public/assets/images/banner-about.png); } +.bg-head-dashboard { + background: url(../public/assets/images/bg-head-dashboard.png); +} + .bg-banner-home::after, .bg-banner-stroke::after { content: ""; diff --git a/components/booking/detail/Form.js b/components/booking/detail/Form.js index 4353f12..1827237 100644 --- a/components/booking/detail/Form.js +++ b/components/booking/detail/Form.js @@ -1,5 +1,5 @@ import AutoCompleteSelect from "@/app/component/element/AutoCompleteSelect"; -import EditField from "./EditField"; +import EditField from "../../../app/component/EditField"; import Content from "./Content"; const bime = [ diff --git a/components/booking/successPay/index.js b/components/booking/successPay/index.js index 8967e9e..e0f03a8 100644 --- a/components/booking/successPay/index.js +++ b/components/booking/successPay/index.js @@ -28,7 +28,7 @@ function SuccessPay({ setStep }) {
- + + + doctor + +
+
+
+ +
+
+

{user.total_transactions} تومان

+

مجموع تراکنش ها

+
+
+
+
+ +
+
+

{user.number_of_turns}

+

تعداد نوبت های شما

+
+
+
+ + ) +} + +export default Head \ No newline at end of file diff --git a/components/dashboard/userAccount/UserAccount.js b/components/dashboard/userAccount/UserAccount.js new file mode 100644 index 0000000..c04aa92 --- /dev/null +++ b/components/dashboard/userAccount/UserAccount.js @@ -0,0 +1,13 @@ +import ContentTabs from "./ContentTabs" +import Head from "./Head" + +function UserAccountPage({ user }) { + return ( +
+ + +
+ ) +} + +export default UserAccountPage \ No newline at end of file diff --git a/components/dashboard/userAccount/tabs/comments/Comment.js b/components/dashboard/userAccount/tabs/comments/Comment.js new file mode 100644 index 0000000..6398c98 --- /dev/null +++ b/components/dashboard/userAccount/tabs/comments/Comment.js @@ -0,0 +1,22 @@ +import Image from "next/image" + +function Comment({ data }) { + return ( +
  • +
    +
    + profile +
    +
    +
  • + ) +} + +export default Comment \ No newline at end of file diff --git a/components/dashboard/userAccount/tabs/comments/index.js b/components/dashboard/userAccount/tabs/comments/index.js new file mode 100644 index 0000000..c9d6a0c --- /dev/null +++ b/components/dashboard/userAccount/tabs/comments/index.js @@ -0,0 +1,16 @@ +import Comment from "./Comment" + +function Comments({ user }) { + return ( + + ) +} + +export default Comments \ No newline at end of file diff --git a/components/dashboard/userAccount/tabs/detailUser/Content.js b/components/dashboard/userAccount/tabs/detailUser/Content.js new file mode 100644 index 0000000..e5ae893 --- /dev/null +++ b/components/dashboard/userAccount/tabs/detailUser/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/dashboard/userAccount/tabs/detailUser/DateBirthday.js b/components/dashboard/userAccount/tabs/detailUser/DateBirthday.js new file mode 100644 index 0000000..68e1e00 --- /dev/null +++ b/components/dashboard/userAccount/tabs/detailUser/DateBirthday.js @@ -0,0 +1,70 @@ +import CalendarEdit from '@/components/icons/CalendarEdit'; +import { convertToJalali } from '@/helper'; +import { Button, Popover } from '@mui/material' +import { DatePicker } from 'jalaali-react-date-picker' +import React, { useState } from 'react' + +function DateBirthday({ data, changeData }) { + + const [anchorEl, setAnchorEl] = useState(null); + + const handleClick = (event) => { + setAnchorEl(event.currentTarget); + }; + + const handleClose = () => { + setAnchorEl(null); + }; + + const open = Boolean(anchorEl); + const id = open ? 'simple-popover' : undefined; + + return ( +
    +
    +

    {data.value}

    + +
    + + { + changeData(convertToJalali(e._d), 'value', 'date_of_birth'); + handleClose(); + }} + /> + +
    + ) +} + +export default DateBirthday \ No newline at end of file diff --git a/components/dashboard/userAccount/tabs/detailUser/Form.js b/components/dashboard/userAccount/tabs/detailUser/Form.js new file mode 100644 index 0000000..b2293e9 --- /dev/null +++ b/components/dashboard/userAccount/tabs/detailUser/Form.js @@ -0,0 +1,86 @@ +import Content from './Content' +import EditField from '@/app/component/EditField' +import AutoCompleteSelect from '@/app/component/element/AutoCompleteSelect' +import DateBirthday from './DateBirthday' +import { insurance, gender, blood_group, marital_status, education, job } from "./listSelector"; + +function Form({ data, selected, changeData, updateSelect }) { + return ( +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + ) +} + +export default Form \ No newline at end of file diff --git a/components/dashboard/userAccount/tabs/detailUser/index.js b/components/dashboard/userAccount/tabs/detailUser/index.js new file mode 100644 index 0000000..c463b48 --- /dev/null +++ b/components/dashboard/userAccount/tabs/detailUser/index.js @@ -0,0 +1,56 @@ +import { useState } from "react"; +import Form from "./Form"; +import { Button } from "@mui/material"; +import ArrowLeftWhiteD from "@/components/icons/ArrowLeftWhiteD"; + +function DetailUser({ user }) { + + const [data, setData] = useState({ + phone: { value: user.phone, isEdit: false }, + national_code: { value: user.national_code, isEdit: false }, + name: { value: user.name, isEdit: false }, + date_of_birth: { value: user.date_of_birth, isEdit: false }, + father_name: { value: user.father_name, isEdit: false }, + insurance_number: { value: user.insurance_number, isEdit: false }, + home_phone: { value: user.home_phone, isEdit: false }, + work_phone: { value: user.work_phone, isEdit: false }, + }); + const [selected, setSelected] = useState({ + gender: '', + blood_group: '', + insurance: '', + marital_status: '', + education: '', + job: '', + }); + + const changeData = (value, type, name) => + setData({ + ...data, + [name]: { + ...data[name], + [type]: value + } + }); + + const updateSelect = (event, name) => setSelected({ ...selected, [name]: event.target.innerText }) + + return ( +
    +
    + +
    + ) +} + +export default DetailUser \ No newline at end of file diff --git a/components/dashboard/userAccount/tabs/detailUser/listSelector.js b/components/dashboard/userAccount/tabs/detailUser/listSelector.js new file mode 100644 index 0000000..be4de00 --- /dev/null +++ b/components/dashboard/userAccount/tabs/detailUser/listSelector.js @@ -0,0 +1,34 @@ +export const gender = [ + { label: 'مرد', id: 10 }, + { label: 'زن', id: 20 } +]; + +export const blood_group = [ + { label: 'A+', id: 10 }, + { label: 'B+', id: 20 }, + { label: 'AB', id: 30 }, + { label: 'O+', id: 40 } +]; + +export const marital_status = [ + { label: 'متاهل', id: 10 }, + { label: 'مجرد', id: 20 } +] + +export const education = [ + { label: 'دیپلم', id: 10 }, + { label: 'فوق دیپلم', id: 20 }, + { label: 'لیسانس', id: 30 }, + { label: 'کارشناسی ارشد', id: 40 } +] + +export const job = [ + { label: 'آزاد', id: 10 }, + { label: 'دولتی', id: 20 }, +] + +export const insurance = [ + { label: 'بیمه 1', id: 10 }, + { label: 'بیمه 2', id: 20 }, + { label: 'بیمه 3', id: 30 } +]; \ No newline at end of file diff --git a/components/dashboard/userAccount/tabs/messages/index.js b/components/dashboard/userAccount/tabs/messages/index.js new file mode 100644 index 0000000..d7ff1d9 --- /dev/null +++ b/components/dashboard/userAccount/tabs/messages/index.js @@ -0,0 +1,7 @@ +function Messages() { + return ( +
    Messages
    + ) +} + +export default Messages \ No newline at end of file diff --git a/components/dashboard/userAccount/tabs/transactions/List.js b/components/dashboard/userAccount/tabs/transactions/List.js new file mode 100644 index 0000000..ab5d6c6 --- /dev/null +++ b/components/dashboard/userAccount/tabs/transactions/List.js @@ -0,0 +1,57 @@ +import CustomTable from "@/app/component/CustomTable"; +import { TableCell, TableRow } from "@mui/material"; +import Image from "next/image"; + +function List({ user }) { + + const tableHead = ['ردیف', 'شناسه', 'نام پزشک', 'تاریخ', 'ساعت', 'مبلغ (تومان)', 'وضعیت'] + const centerTable = [0, 4, 5]; + + return ( +
    + + {user.turns.map((row, idx) => ( + + {idx + 1} + {row.id} + +
    + doctor + {row.name} +
    +
    + {row.date} + {row.time} + {row.amount} + +
    + {row.status === 'success' ? 'پرداخت شده' : + row.status === 'pending' ? 'در انتظار' : 'پرداخت نشده'} +
    +
    +
    + ))} +
    +
    + ) +} + +export default List \ No newline at end of file diff --git a/components/dashboard/userAccount/tabs/transactions/index.js b/components/dashboard/userAccount/tabs/transactions/index.js new file mode 100644 index 0000000..52d9647 --- /dev/null +++ b/components/dashboard/userAccount/tabs/transactions/index.js @@ -0,0 +1,12 @@ +import List from "./List"; + +function Transactions({ user }) { + return ( +
    +

    تاریخچه تراکنش ها

    + +
    + ) +} + +export default Transactions \ No newline at end of file diff --git a/components/dashboard/userAccount/tabs/turns/Head.js b/components/dashboard/userAccount/tabs/turns/Head.js new file mode 100644 index 0000000..a62e283 --- /dev/null +++ b/components/dashboard/userAccount/tabs/turns/Head.js @@ -0,0 +1,22 @@ +import { Button } from '@mui/material' + +function Head() { + return ( +
    + + +
    + ) +} + +export default Head \ No newline at end of file diff --git a/components/dashboard/userAccount/tabs/turns/List.js b/components/dashboard/userAccount/tabs/turns/List.js new file mode 100644 index 0000000..1d734d2 --- /dev/null +++ b/components/dashboard/userAccount/tabs/turns/List.js @@ -0,0 +1,55 @@ +import CustomTable from '@/app/component/CustomTable'; +import ArrowLeftBlueD from '@/components/icons/ArrowLeftBlueD' +import { Button, TableCell, TableRow } from '@mui/material' +import Image from 'next/image' + +function List({ user }) { + + const tableHead = ['ردیف', 'نام پزشک', 'تخصص', 'تاریخ', 'ساعت', 'مبلغ (تومان)', 'عملیات'] + const centerTable = [0, 5]; + + + return ( +
    + + {user.turns.map((row, idx) => ( + + {idx + 1} + +
    + doctor + {row.name} +
    +
    + {row.expertise} + {row.date} + {row.time} + {row.amount} + + + +
    + ))} +
    +
    + ) +} + +export default List \ No newline at end of file diff --git a/components/dashboard/userAccount/tabs/turns/index.js b/components/dashboard/userAccount/tabs/turns/index.js new file mode 100644 index 0000000..f0683d4 --- /dev/null +++ b/components/dashboard/userAccount/tabs/turns/index.js @@ -0,0 +1,14 @@ +import Head from "./Head"; +import List from "./List"; + +function Turns({ user }) { + return ( +
    +

    تاریخچه نوبت ها

    + + +
    + ) +} + +export default Turns \ No newline at end of file diff --git a/components/icons/ArrowLeftBlueD.js b/components/icons/ArrowLeftBlueD.js new file mode 100644 index 0000000..fa739f6 --- /dev/null +++ b/components/icons/ArrowLeftBlueD.js @@ -0,0 +1,10 @@ +function ArrowLeftBlueD() { + return ( + + + + + ) +} + +export default ArrowLeftBlueD \ No newline at end of file diff --git a/components/icons/ArrowLeftWD.js b/components/icons/ArrowLeftWD.js index 3dd8809..4f444c5 100644 --- a/components/icons/ArrowLeftWD.js +++ b/components/icons/ArrowLeftWD.js @@ -1,8 +1,8 @@ function ArrowLeftWD() { return ( - - + + ) } diff --git a/components/icons/ArrowLeftWhiteD.js b/components/icons/ArrowLeftWhiteD.js new file mode 100644 index 0000000..63159b4 --- /dev/null +++ b/components/icons/ArrowLeftWhiteD.js @@ -0,0 +1,10 @@ +function ArrowLeftWhiteD() { + return ( + + + + + ) +} + +export default ArrowLeftWhiteD \ No newline at end of file diff --git a/components/icons/CalendarAdD.js b/components/icons/CalendarAdD.js new file mode 100644 index 0000000..e463555 --- /dev/null +++ b/components/icons/CalendarAdD.js @@ -0,0 +1,18 @@ +function CalendarAdD() { + return ( + + + + + + + + + + + + + ) +} + +export default CalendarAdD \ No newline at end of file diff --git a/components/icons/CalendarEdit.js b/components/icons/CalendarEdit.js new file mode 100644 index 0000000..239fff8 --- /dev/null +++ b/components/icons/CalendarEdit.js @@ -0,0 +1,17 @@ +function CalendarEdit() { + return ( + + + + + + + + + + + + ) +} + +export default CalendarEdit \ No newline at end of file diff --git a/components/icons/CalndarD.js b/components/icons/CalndarD.js index c58b691..6e7c9b6 100644 --- a/components/icons/CalndarD.js +++ b/components/icons/CalndarD.js @@ -1,16 +1,16 @@ function CalndarD() { return ( - - - - - - - - - - + + + + + + + + + + ) } diff --git a/components/icons/CardD.js b/components/icons/CardD.js index 5981f79..dd5e957 100644 --- a/components/icons/CardD.js +++ b/components/icons/CardD.js @@ -1,10 +1,10 @@ function CardD() { return ( - - - - + + + + ) } diff --git a/components/icons/CardTickD.js b/components/icons/CardTickD.js new file mode 100644 index 0000000..ad62c3e --- /dev/null +++ b/components/icons/CardTickD.js @@ -0,0 +1,13 @@ +function CardTickD() { + return ( + + + + + + + + ) +} + +export default CardTickD \ No newline at end of file diff --git a/components/icons/EditGrayA.js b/components/icons/EditGrayA.js new file mode 100644 index 0000000..2e0f3e4 --- /dev/null +++ b/components/icons/EditGrayA.js @@ -0,0 +1,11 @@ +function EditGrayA() { + return ( + + + + + + ) +} + +export default EditGrayA \ No newline at end of file diff --git a/components/icons/LinkedingBlueD.js b/components/icons/LinkedingBlueD.js index a90eea0..725369c 100644 --- a/components/icons/LinkedingBlueD.js +++ b/components/icons/LinkedingBlueD.js @@ -1,7 +1,7 @@ function LinkedingBlueD() { return ( - + ) } diff --git a/components/icons/LogoutD.js b/components/icons/LogoutD.js index 2238a61..e4717c1 100644 --- a/components/icons/LogoutD.js +++ b/components/icons/LogoutD.js @@ -1,9 +1,9 @@ function LogoutD() { return ( - - - + + + ) } diff --git a/components/icons/MessageD.js b/components/icons/MessageD.js index 3f4cf34..b186661 100644 --- a/components/icons/MessageD.js +++ b/components/icons/MessageD.js @@ -1,8 +1,8 @@ function MessageD() { return ( - - + + ) } diff --git a/components/icons/ProfileD.js b/components/icons/ProfileD.js index 417fb85..5910ff7 100644 --- a/components/icons/ProfileD.js +++ b/components/icons/ProfileD.js @@ -3,8 +3,8 @@ import React from 'react' function ProfileD() { return ( - - + + ) } diff --git a/components/icons/TelegramBlueD.js b/components/icons/TelegramBlueD.js index 3f06900..54c8558 100644 --- a/components/icons/TelegramBlueD.js +++ b/components/icons/TelegramBlueD.js @@ -1,7 +1,7 @@ function TelegramBlueD() { return ( - + ) } diff --git a/components/layout/index.js b/components/layout/index.js index 24cab2a..287bc3a 100644 --- a/components/layout/index.js +++ b/components/layout/index.js @@ -25,7 +25,7 @@ function Layout({ children, title, name, disableFooter, isSidebar, user }) {
    {isSidebar && ( diff --git a/components/layout/sidebar/index.js b/components/layout/sidebar/index.js index d0d3ba4..f5c0f1e 100644 --- a/components/layout/sidebar/index.js +++ b/components/layout/sidebar/index.js @@ -4,11 +4,13 @@ import List from "./List" function Sidebar({ user }) { return ( ) } diff --git a/components/register/LogInPage.js b/components/register/LogInPage.js index 3e81611..c0ffb5d 100644 --- a/components/register/LogInPage.js +++ b/components/register/LogInPage.js @@ -18,8 +18,6 @@ function LogInPage({ setIsSendMsg, setStep }) { fullWidth variant='contained' onClick={() => { - console.log(setIsSendMsg); - setIsSendMsg && setIsSendMsg(true); setStep && setStep(prev => prev + 1); }} diff --git a/data/userData.json b/data/userData.json index 34fdbcc..a1bfe7d 100644 --- a/data/userData.json +++ b/data/userData.json @@ -2,6 +2,495 @@ "data": { "profile": "/assets/images/profile-user.png", "name": "امیر حبیبی", - "phone": "09165206544" + "phone": "09165206544", + "total_transactions": 245000, + "number_of_turns": 4, + "national_code": 1741025645, + "gender": "مرد", + "date_of_birth": "1371/03/07", + "father_name": "محمد", + "insurance": "تامین اجتماعی", + "insurance_number": 11695641, + "blood_group": "A+", + "marital_status": "مجرد", + "home_phone": 9121056987, + "education": "کارشناسی ارشد", + "job": "آزاد", + "work_phone": 9121056987, + "turns": [ + { + "name": "دنیا خلیلی", + "image": "/assets/images/doctor-1.png", + "id": 12345678, + "status": "success", + "expertise": "دندان پزشکی", + "date": "1403-03-27", + "time": "15:30", + "amount": "2350000" + }, + { + "name": "دنیا خلیلی", + "image": "/assets/images/doctor-1.png", + "id": 12345678, + "status": "success", + "expertise": "دندان پزشکی", + "date": "1403-03-27", + "time": "16:30", + "amount": "2350000" + }, + { + "name": "دنیا خلیلی", + "image": "/assets/images/doctor-1.png", + "id": 12345678, + "status": "pending", + "expertise": "دندان پزشکی", + "date": "1403-03-27", + "time": "17:30", + "amount": "2350000" + }, + { + "name": "دنیا خلیلی", + "image": "/assets/images/doctor-1.png", + "id": 12345678, + "status": "pending", + "expertise": "دندان پزشکی", + "date": "1403-03-27", + "time": "18:30", + "amount": "2350000" + }, + { + "name": "دنیا خلیلی", + "image": "/assets/images/doctor-1.png", + "id": 12345678, + "status": "failed", + "expertise": "دندان پزشکی", + "date": "1403-03-27", + "time": "19:30", + "amount": "2350000" + } + ], + "comments": [ + { + "id": 1, + "is_open_answer": false, + "profile": "/assets/images/doctor.png", + "name": "میثم امیری", + "location": "اهواز _ خوزستان", + "comment": "لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است.", + "like": 6, + "is_like": false, + "is_open_reply": false, + "is_dislike": false, + "dislike": 1, + "stars": { + "reception": 4, + "cleaning": 5, + "information": 5, + "location": 4, + "security": 4, + "value": 3 + }, + "replays": [ + { + "id": 1, + "is_open_answer": false, + "profile": "/assets/images/doctor.png", + "name": "میثم امیری", + "location": "اهواز _ خوزستان", + "comment": "لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است.", + "like": 6, + "is_like": false, + "is_open_reply": false, + "is_dislike": false, + "dislike": 1, + "stars": { + "reception": 4, + "cleaning": 5, + "information": 5, + "location": 4, + "security": 4, + "value": 3 + }, + "replays": [] + }, + { + "id": 2, + "is_open_answer": false, + "profile": "/assets/images/doctor.png", + "name": "میثم امیری", + "location": "اهواز _ خوزستان", + "comment": "لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است.", + "like": 6, + "is_like": false, + "is_open_reply": false, + "is_dislike": false, + "dislike": 1, + "stars": { + "reception": 4, + "cleaning": 5, + "information": 5, + "location": 4, + "security": 4, + "value": 3 + }, + "replays": [] + }, + { + "id": 3, + "is_open_answer": false, + "profile": "/assets/images/doctor.png", + "name": "میثم امیری", + "location": "اهواز _ خوزستان", + "comment": "لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است.", + "like": 6, + "is_like": false, + "is_open_reply": false, + "is_dislike": false, + "dislike": 1, + "stars": { + "reception": 4, + "cleaning": 5, + "information": 5, + "location": 4, + "security": 4, + "value": 3 + }, + "replays": [] + } + ] + }, + { + "id": 2, + "is_open_answer": false, + "profile": "/assets/images/doctor.png", + "name": "ساغر صابری", + "location": "اهواز _ خوزستان", + "comment": "لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است.", + "like": 6, + "is_like": false, + "is_open_reply": false, + "is_dislike": false, + "dislike": 1, + "stars": { + "reception": 4, + "cleaning": 5, + "information": 5, + "location": 4, + "security": 4, + "value": 3 + }, + "replays": [] + }, + { + "id": 3, + "is_open_answer": false, + "profile": "/assets/images/doctor.png", + "name": "ساغر صابری", + "location": "اهواز _ خوزستان", + "comment": "لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است.", + "like": 6, + "is_like": false, + "is_open_reply": false, + "is_dislike": false, + "dislike": 1, + "stars": { + "reception": 4, + "cleaning": 5, + "information": 5, + "location": 4, + "security": 4, + "value": 3 + }, + "replays": [] + }, + { + "id": 4, + "is_open_answer": false, + "profile": "/assets/images/doctor.png", + "name": "ساغر صابری", + "location": "اهواز _ خوزستان", + "comment": "لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است.", + "like": 6, + "is_like": false, + "is_open_reply": false, + "is_dislike": false, + "dislike": 1, + "stars": { + "reception": 4, + "cleaning": 5, + "information": 5, + "location": 4, + "security": 4, + "value": 3 + }, + "replays": [ + { + "id": 1, + "is_open_answer": false, + "profile": "/assets/images/doctor.png", + "name": "میثم امیری", + "location": "اهواز _ خوزستان", + "comment": "لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است.", + "like": 6, + "is_like": false, + "is_open_reply": false, + "is_dislike": false, + "dislike": 1, + "stars": { + "reception": 4, + "cleaning": 5, + "information": 5, + "location": 4, + "security": 4, + "value": 3 + }, + "replays": [] + }, + { + "id": 2, + "is_open_answer": false, + "profile": "/assets/images/doctor.png", + "name": "میثم امیری", + "location": "اهواز _ خوزستان", + "comment": "لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است.", + "like": 6, + "is_like": false, + "is_open_reply": false, + "is_dislike": false, + "dislike": 1, + "stars": { + "reception": 4, + "cleaning": 5, + "information": 5, + "location": 4, + "security": 4, + "value": 3 + }, + "replays": [] + }, + { + "id": 3, + "is_open_answer": false, + "profile": "/assets/images/doctor.png", + "name": "میثم امیری", + "location": "اهواز _ خوزستان", + "comment": "لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است.", + "like": 6, + "is_like": false, + "is_open_reply": false, + "is_dislike": false, + "dislike": 1, + "stars": { + "reception": 4, + "cleaning": 5, + "information": 5, + "location": 4, + "security": 4, + "value": 3 + }, + "replays": [] + } + ] + }, + { + "id": 5, + "is_open_answer": false, + "profile": "/assets/images/doctor.png", + "name": "ساغر صابری", + "location": "اهواز _ خوزستان", + "comment": "لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است.", + "like": 6, + "is_like": false, + "is_open_reply": false, + "is_dislike": false, + "dislike": 1, + "stars": { + "reception": 4, + "cleaning": 5, + "information": 5, + "location": 4, + "security": 4, + "value": 3 + }, + "replays": [] + }, + { + "id": 6, + "is_open_answer": false, + "profile": "/assets/images/doctor.png", + "name": "ساغر صابری", + "location": "اهواز _ خوزستان", + "comment": "لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است.", + "like": 6, + "is_like": false, + "is_open_reply": false, + "is_dislike": false, + "dislike": 1, + "stars": { + "reception": 4, + "cleaning": 5, + "information": 5, + "location": 4, + "security": 4, + "value": 3 + }, + "replays": [ + { + "id": 1, + "is_open_answer": false, + "profile": "/assets/images/doctor.png", + "name": "میثم امیری", + "location": "اهواز _ خوزستان", + "comment": "لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است.", + "like": 6, + "is_like": false, + "is_open_reply": false, + "is_dislike": false, + "dislike": 1, + "stars": { + "reception": 4, + "cleaning": 5, + "information": 5, + "location": 4, + "security": 4, + "value": 3 + }, + "replays": [] + }, + { + "id": 2, + "is_open_answer": false, + "profile": "/assets/images/doctor.png", + "name": "میثم امیری", + "location": "اهواز _ خوزستان", + "comment": "لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است.", + "like": 6, + "is_like": false, + "is_open_reply": false, + "is_dislike": false, + "dislike": 1, + "stars": { + "reception": 4, + "cleaning": 5, + "information": 5, + "location": 4, + "security": 4, + "value": 3 + }, + "replays": [] + }, + { + "id": 3, + "is_open_answer": false, + "profile": "/assets/images/doctor.png", + "name": "میثم امیری", + "location": "اهواز _ خوزستان", + "comment": "لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است.", + "like": 6, + "is_like": false, + "is_open_reply": false, + "is_dislike": false, + "dislike": 1, + "stars": { + "reception": 4, + "cleaning": 5, + "information": 5, + "location": 4, + "security": 4, + "value": 3 + }, + "replays": [] + } + ] + }, + { + "id": 7, + "is_open_answer": false, + "profile": "/assets/images/doctor.png", + "name": "ساغر صابری", + "location": "اهواز _ خوزستان", + "comment": "لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است.", + "like": 6, + "is_like": false, + "is_open_reply": false, + "is_dislike": false, + "dislike": 1, + "stars": { + "reception": 4, + "cleaning": 5, + "information": 5, + "location": 4, + "security": 4, + "value": 3 + }, + "replays": [] + }, + { + "id": 8, + "is_open_answer": false, + "profile": "/assets/images/doctor.png", + "name": "ساغر صابری", + "location": "اهواز _ خوزستان", + "comment": "لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است.", + "like": 6, + "is_like": false, + "is_open_reply": false, + "is_dislike": false, + "dislike": 1, + "stars": { + "reception": 4, + "cleaning": 5, + "information": 5, + "location": 4, + "security": 4, + "value": 3 + }, + "replays": [] + }, + { + "id": 9, + "is_open_answer": false, + "profile": "/assets/images/doctor.png", + "name": "ساغر صابری", + "location": "اهواز _ خوزستان", + "comment": "لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است.", + "like": 6, + "is_like": false, + "is_open_reply": false, + "is_dislike": false, + "dislike": 1, + "stars": { + "reception": 4, + "cleaning": 5, + "information": 5, + "location": 4, + "security": 4, + "value": 3 + }, + "replays": [] + }, + { + "id": 10, + "is_open_answer": false, + "profile": "/assets/images/doctor.png", + "name": "ساغر صابری", + "location": "اهواز _ خوزستان", + "comment": "لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است.", + "like": 6, + "is_like": false, + "is_open_reply": false, + "is_dislike": false, + "dislike": 1, + "stars": { + "reception": 4, + "cleaning": 5, + "information": 5, + "location": 4, + "security": 4, + "value": 3 + }, + "replays": [] + } + ] } } \ No newline at end of file diff --git a/helper/index.js b/helper/index.js index 9c44b62..8bde63b 100644 --- a/helper/index.js +++ b/helper/index.js @@ -1,3 +1,20 @@ +import moment from 'jalali-moment'; + export const numberToArStyle = num => num.toLocaleString('ar-AE'); -export const isActiveURL = (link, name) => link === name; \ No newline at end of file +export const isActiveURL = (link, name) => link === name; + +export const convertToJalali = (date) => { + // Get the current Gregorian date + const currentDate = date; + + // Convert the Gregorian date to Jalali date + const jalaliDate = moment(currentDate).format('jYYYY/jM/jD'); + + // Get Jalali year, month, and day + const jalaliYear = moment(jalaliDate, 'jYYYY/jM/jD').jYear(); + const jalaliMonth = moment(jalaliDate, 'jYYYY/jM/jD').jMonth() + 1; // Note: jalali-moment months are zero-based + const jalaliDay = moment(jalaliDate, 'jYYYY/jM/jD').jDate(); + + return `${jalaliYear}/${jalaliMonth}/${jalaliDay}` +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index f6fa4c4..1ae9de8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "nobat", + "name": "nobat724", "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "nobat", + "name": "nobat724", "version": "0.1.0", "dependencies": { "@emotion/cache": "^11.11.0", @@ -18,6 +18,7 @@ "date-fns": "^3.6.0", "i": "^0.3.7", "jalaali-react-date-picker": "^1.0.18", + "jalali-moment": "^3.3.11", "next": "14.2.3", "npm": "^10.8.2", "react": "^18.0.0", @@ -6035,6 +6036,25 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/batch": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", @@ -6074,6 +6094,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", @@ -6211,6 +6241,29 @@ "node-int64": "^0.4.0" } }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -6399,6 +6452,11 @@ "node": ">=10" } }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" + }, "node_modules/check-types": { "version": "11.2.3", "resolved": "https://registry.npmjs.org/check-types/-/check-types-11.2.3.tgz", @@ -6494,6 +6552,36 @@ "node": ">=0.10.0" } }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "engines": { + "node": ">= 10" + } + }, "node_modules/client-only": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", @@ -6576,6 +6664,14 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "engines": { + "node": ">=0.8" + } + }, "node_modules/clsx": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", @@ -7422,6 +7518,17 @@ "node": ">= 10" } }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/define-data-property": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", @@ -8910,6 +9017,30 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/external-editor/node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -8983,6 +9114,28 @@ "bser": "2.1.1" } }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/figures/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -10121,6 +10274,25 @@ "node": ">=4" } }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -10207,6 +10379,129 @@ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, + "node_modules/inquirer": { + "version": "8.2.6", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.6.tgz", + "integrity": "sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==", + "dependencies": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.4.1", + "run-async": "^2.4.0", + "rxjs": "^7.5.5", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6", + "wrap-ansi": "^6.0.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/inquirer/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/inquirer/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/inquirer/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/inquirer/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/inquirer/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/inquirer/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/inquirer/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/inquirer/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/inquirer/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/internal-slot": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", @@ -10443,6 +10738,14 @@ "resolved": "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz", "integrity": "sha512-FeXIBgG/CPGd/WUxuEyvgGTEfwiG9Z4EKGxjNMRqviiIIfsmgrpnHLffEDdwUHqNva1VEW91o3xBT/m8Elgl9g==" }, + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "engines": { + "node": ">=8" + } + }, "node_modules/is-map": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", @@ -10638,6 +10941,17 @@ "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-weakmap": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz", @@ -11081,6 +11395,27 @@ "node": ">=8" } }, + "node_modules/jalali-moment": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/jalali-moment/-/jalali-moment-3.3.11.tgz", + "integrity": "sha512-tdSaRs9cjWjOIaWhcsGFZMhZQhfgok5J0TwqFpBIZPudZxxa6yjUPoLCOwuvbAtRpiZn7k/mvazAJh+vEN5suw==", + "dependencies": { + "commander": "^7.0.0", + "inquirer": "^8.0.0", + "moment": "^2.26.0" + }, + "bin": { + "jalalim": "cli.js" + } + }, + "node_modules/jalali-moment/node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "engines": { + "node": ">= 10" + } + }, "node_modules/jest": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz", @@ -13171,6 +13506,69 @@ "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==" }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/log-symbols/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -13464,6 +13862,11 @@ "multicast-dns": "cli.js" } }, + "node_modules/mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" + }, "node_modules/mz": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", @@ -16245,6 +16648,103 @@ "node": ">= 0.8.0" } }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ora/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ora/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/ora/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ora/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ora/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", @@ -18629,6 +19129,23 @@ "node": ">=10" } }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/restore-cursor/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, "node_modules/retry": { "version": "0.13.1", "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", @@ -18770,6 +19287,14 @@ "node": ">=8" } }, + "node_modules/run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "engines": { + "node": ">=0.12.0" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -18792,6 +19317,14 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "dependencies": { + "tslib": "^2.1.0" + } + }, "node_modules/safe-array-concat": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", @@ -20301,6 +20834,11 @@ "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.2.tgz", "integrity": "sha512-WKexMoJj3vEuK0yFEapj8y64V0A6xcuPuK9Gt1d0R+dzCSJc0lHqQytAbSB4cDAK0dWh4T0E2ETkoLE2WZ41OQ==" }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" + }, "node_modules/thunky": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", @@ -20311,6 +20849,17 @@ "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -20830,6 +21379,14 @@ "minimalistic-assert": "^1.0.0" } }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dependencies": { + "defaults": "^1.0.3" + } + }, "node_modules/webidl-conversions": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", diff --git a/package.json b/package.json index a8c21df..30089b6 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "date-fns": "^3.6.0", "i": "^0.3.7", "jalaali-react-date-picker": "^1.0.18", + "jalali-moment": "^3.3.11", "next": "14.2.3", "npm": "^10.8.2", "react": "^18.0.0", diff --git a/public/assets/images/Frame 9875.png b/public/assets/images/Frame 9875.png deleted file mode 100644 index 98efc84..0000000 Binary files a/public/assets/images/Frame 9875.png and /dev/null differ diff --git a/public/assets/images/bg-head-dashboard.png b/public/assets/images/bg-head-dashboard.png new file mode 100644 index 0000000..05a49db Binary files /dev/null and b/public/assets/images/bg-head-dashboard.png differ diff --git a/public/assets/images/doctor-1.png b/public/assets/images/doctor-1.png new file mode 100644 index 0000000..a0c14a1 Binary files /dev/null and b/public/assets/images/doctor-1.png differ diff --git a/public/assets/images/male-doctor-head-dashboard.png b/public/assets/images/male-doctor-head-dashboard.png new file mode 100644 index 0000000..b9796f6 Binary files /dev/null and b/public/assets/images/male-doctor-head-dashboard.png differ diff --git a/public/assets/images/profile-user.png b/public/assets/images/profile-user.png index bdaa06b..87869a8 100644 Binary files a/public/assets/images/profile-user.png and b/public/assets/images/profile-user.png differ