diff --git a/app/component/EditField.js b/app/component/EditField.js index 3939d9a..6d19499 100644 --- a/app/component/EditField.js +++ b/app/component/EditField.js @@ -2,12 +2,13 @@ import EditGrayA from "@/components/icons/EditGrayA" import EditOrangeA from "@/components/icons/EditOrangeA" import { Button, TextField } from "@mui/material" -function EditField({ changeData, data, name, iconGray, isTransparent }) { +function EditField({ changeData, icon, placeholder, data, name, iconGray, isTransparent }) { return (
{ @@ -34,11 +35,12 @@ function EditField({ changeData, data, name, iconGray, isTransparent }) { changeData(!data.isEdit, 'isEdit', name) }} > - {iconGray ? ( - - ) : ( - - )} + {icon ? icon : + iconGray ? ( + + ) : ( + + )}
) diff --git a/app/component/Pagination.js b/app/component/Pagination.js index 5354642..9c2ee3a 100644 --- a/app/component/Pagination.js +++ b/app/component/Pagination.js @@ -14,6 +14,9 @@ function Pagination() { }, '& .mui-8q7g72-MuiButtonBase-root-MuiPaginationItem-root.Mui-selected': { color: '#F8F8FF' + }, + '& .MuiSvgIcon-root': { + rotate: '180deg !important' } }} /> diff --git a/app/component/comment/ItemUser.js b/app/component/comment/ItemUser.js index 988c14f..89dc0b1 100644 --- a/app/component/comment/ItemUser.js +++ b/app/component/comment/ItemUser.js @@ -38,12 +38,13 @@ function ItemUser({ update, setUpdate, isReply, list, setList, data, loading }) alt="profile" /> )} -
+
{loading ? ( ) : ( <>

{data.name}

+

3 روز پیش

)}
diff --git a/app/dashboard/page.js b/app/dashboard/page.js index a460d05..9640c97 100644 --- a/app/dashboard/page.js +++ b/app/dashboard/page.js @@ -10,6 +10,7 @@ function UserAccount() { const [value, setValue] = useState(0); const [isOpenSide, setIsOpenSide] = useState(false); + const [isTurnsDetails, setIsTurnsDetails] = useState(false); return ( ) diff --git a/app/panel/(layout)/dashboard/page.js b/app/panel/(layout)/dashboard/page.js new file mode 100644 index 0000000..1682f23 --- /dev/null +++ b/app/panel/(layout)/dashboard/page.js @@ -0,0 +1,10 @@ +import DashboardPage from "@/components/panel/dashboard"; +import Information from '@/data/information.json'; + +function Dashboard() { + return ( + + ) +} + +export default Dashboard \ No newline at end of file diff --git a/app/panel/(layout)/layout.js b/app/panel/(layout)/layout.js new file mode 100644 index 0000000..7a1e9f6 --- /dev/null +++ b/app/panel/(layout)/layout.js @@ -0,0 +1,29 @@ +'use client'; + +import Header from "@/components/layoutPanel/header"; +import Sidebar from "@/components/layoutPanel/sidebar"; +import Information from '@/data/information.json'; +import UserDetail from "@/components/layoutPanel/userDetail"; +import { usePathname } from "next/navigation"; + +function LayoutPanel({ children }) { + + const pathname = usePathname() + + return ( +
+ +
+
+
+ {children} +
+
+ {pathname.includes('dashboard') && ( + + )} +
+ ) +} + +export default LayoutPanel \ No newline at end of file diff --git a/app/panel/(layout)/user-account/page.js b/app/panel/(layout)/user-account/page.js new file mode 100644 index 0000000..47b23c2 --- /dev/null +++ b/app/panel/(layout)/user-account/page.js @@ -0,0 +1,10 @@ +import UserAccountPage from "@/components/panel/userAccount" +import Information from '@/data/information.json'; + +function UserAccount() { + return ( + + ) +} + +export default UserAccount \ No newline at end of file diff --git a/app/panel/page.js b/app/panel/page.js deleted file mode 100644 index e34e175..0000000 --- a/app/panel/page.js +++ /dev/null @@ -1,13 +0,0 @@ -import PanelPage from "@/components/panel"; -import LayoutPanel from "@/components/layoutPanel"; -import Information from '../../data/information.json'; - -function Panel() { - return ( - - - - ) -} - -export default Panel \ No newline at end of file diff --git a/components/clinic/components/doctors/index.js b/components/clinic/components/doctors/index.js index 07afba7..a959829 100644 --- a/components/clinic/components/doctors/index.js +++ b/components/clinic/components/doctors/index.js @@ -3,7 +3,7 @@ import SearchBar from "./SearchBar" function Doctors({ doctors, loading }) { return ( -
+
diff --git a/components/dashboard/index.js b/components/dashboard/index.js index 3eae3ee..21284cb 100644 --- a/components/dashboard/index.js +++ b/components/dashboard/index.js @@ -1,6 +1,6 @@ import Layout from '../layout' -function DashboardPage({ user, children, value, setValue, isOpenSide, setIsOpenSide }) { +function DashboardPage({ user, isTurnsDetails, setIsTurnsDetails, children, value, setValue, isOpenSide, setIsOpenSide }) { return ( {children} diff --git a/components/dashboard/userAccount/ContentTabs.js b/components/dashboard/userAccount/ContentTabs.js index 24a1e49..9bfca3e 100644 --- a/components/dashboard/userAccount/ContentTabs.js +++ b/components/dashboard/userAccount/ContentTabs.js @@ -17,10 +17,9 @@ import DownloadD from "@/components/icons/DownloadD"; const listTab = ['حساب کاربری', 'نوبت های من', 'تراکنش های من', 'نظرات من', 'پیام ها']; -function ContentTabs({ user, value, setValue, isOpenSide, setIsOpenSide }) { +function ContentTabs({ user, value, isTurnsDetails, setIsTurnsDetails, setValue, isOpenSide, setIsOpenSide }) { const [loading, setLoading] = useState(true); - const [isTurnsDetails, setIsTurnsDetails] = useState(false); const handleChange = (event, newValue) => setValue(newValue); useEffect(() => { diff --git a/components/dashboard/userAccount/UserAccount.js b/components/dashboard/userAccount/UserAccount.js index 6f9c24a..e38649f 100644 --- a/components/dashboard/userAccount/UserAccount.js +++ b/components/dashboard/userAccount/UserAccount.js @@ -2,7 +2,7 @@ import ContentTabs from "./ContentTabs" import Head from "./Head" import NotfoundDashboard from "./NotfoundDashboard" -function UserAccountPage({ user, value, setValue, isOpenSide, setIsOpenSide }) { +function UserAccountPage({ user, isTurnsDetails, setIsTurnsDetails, value, setValue, isOpenSide, setIsOpenSide }) { return (
{value === 5 ? ( @@ -16,6 +16,8 @@ function UserAccountPage({ user, value, setValue, isOpenSide, setIsOpenSide }) { setValue={setValue} isOpenSide={isOpenSide} setIsOpenSide={setIsOpenSide} + isTurnsDetails={isTurnsDetails} + setIsTurnsDetails={setIsTurnsDetails} /> )} diff --git a/components/doctors/modal/Content.js b/components/doctors/modal/Content.js index dc33383..b943c68 100644 --- a/components/doctors/modal/Content.js +++ b/components/doctors/modal/Content.js @@ -20,15 +20,22 @@ function Content({ data, setData }) { updateData={(event) => changeData(event.target.innerText, 'expertise')} list={specialties} name='expertise' - label='تخصص' + label='دسته بندی' /> +
+ changeData(event.target.innerText, 'expertise')} + list={specialties} + name='expertise' + label='تخصص' + /> +
changeData(+value, 'gender')} value={data.gender} text='جنسیت پزشک' group={group1} - />
diff --git a/components/doctors/modal/RadioContent.js b/components/doctors/modal/RadioContent.js index 74548bd..3a9dc34 100644 --- a/components/doctors/modal/RadioContent.js +++ b/components/doctors/modal/RadioContent.js @@ -4,11 +4,13 @@ function RadioContent({ group, text, value, changeData }) { return (

{text}

- +
+ +
) } diff --git a/components/icons/AddLocationP.js b/components/icons/AddLocationP.js new file mode 100644 index 0000000..4e228c0 --- /dev/null +++ b/components/icons/AddLocationP.js @@ -0,0 +1,11 @@ +function AddLocationP() { + return ( + + + + + + ) +} + +export default AddLocationP \ No newline at end of file diff --git a/components/icons/ArrowLeftBlueP.js b/components/icons/ArrowLeftBlueP.js index 26cc99f..4792bff 100644 --- a/components/icons/ArrowLeftBlueP.js +++ b/components/icons/ArrowLeftBlueP.js @@ -1,7 +1,7 @@ function ArrowLeftBlueP() { return ( - + ) } diff --git a/components/icons/ArrowLeftButtonP.js b/components/icons/ArrowLeftButtonP.js new file mode 100644 index 0000000..8e7191d --- /dev/null +++ b/components/icons/ArrowLeftButtonP.js @@ -0,0 +1,10 @@ +function ArrowLeftButtonP() { + return ( + + + + + ) +} + +export default ArrowLeftButtonP \ No newline at end of file diff --git a/components/icons/ArrowLeftP.js b/components/icons/ArrowLeftP.js index 9c8ff1e..ab9f1e9 100644 --- a/components/icons/ArrowLeftP.js +++ b/components/icons/ArrowLeftP.js @@ -1,8 +1,8 @@ function ArrowLeftP() { return ( - - + + ) } diff --git a/components/icons/ArrowLeftPU.js b/components/icons/ArrowLeftPU.js new file mode 100644 index 0000000..4fa65c2 --- /dev/null +++ b/components/icons/ArrowLeftPU.js @@ -0,0 +1,9 @@ +function ArrowLeftPU() { + return ( + + + + ) +} + +export default ArrowLeftPU \ No newline at end of file diff --git a/components/icons/DownloadD.js b/components/icons/DownloadD.js index a3e896c..1b2d213 100644 --- a/components/icons/DownloadD.js +++ b/components/icons/DownloadD.js @@ -1,9 +1,9 @@ function DownloadD() { return ( - - - + + + ) } diff --git a/components/icons/LocationP.js b/components/icons/LocationP.js index ec061d6..33c56c8 100644 --- a/components/icons/LocationP.js +++ b/components/icons/LocationP.js @@ -1,8 +1,8 @@ function LocationP() { return ( - - + + ) } diff --git a/components/icons/LogoutOrangeP.js b/components/icons/LogoutOrangeP.js index 7c30842..2f3aaa6 100644 --- a/components/icons/LogoutOrangeP.js +++ b/components/icons/LogoutOrangeP.js @@ -1,9 +1,9 @@ function LogoutOrangeP() { return ( - - - + + + ) } diff --git a/components/icons/MoonP.js b/components/icons/MoonP.js index 240abf4..36b0743 100644 --- a/components/icons/MoonP.js +++ b/components/icons/MoonP.js @@ -1,7 +1,7 @@ function MoonP() { return ( - + ) } diff --git a/components/icons/NotFoundCover.js b/components/icons/NotFoundCover.js index c0a4846..d466636 100644 --- a/components/icons/NotFoundCover.js +++ b/components/icons/NotFoundCover.js @@ -2,27 +2,27 @@ function NotFoundCover() { return ( - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + - + diff --git a/components/icons/ProfileP.js b/components/icons/ProfileP.js new file mode 100644 index 0000000..10c4775 --- /dev/null +++ b/components/icons/ProfileP.js @@ -0,0 +1,10 @@ +function ProfileP() { + return ( + + + + + ) +} + +export default ProfileP \ No newline at end of file diff --git a/components/layout/index.js b/components/layout/index.js index b37714b..4dc5647 100644 --- a/components/layout/index.js +++ b/components/layout/index.js @@ -9,7 +9,7 @@ import "aos/dist/aos.css"; import { useEffect } from "react"; import Sidebar from './sidebar'; -function Layout({ children, title, name, isOpenSide, setIsOpenSide, disableFooter, isSidebar, user, value, setValue }) { +function Layout({ children, isTurnsDetails, setIsTurnsDetails, title, name, isOpenSide, setIsOpenSide, disableFooter, isSidebar, user, value, setValue }) { useEffect(() => { Aos.init({ duration: 1000 }); @@ -35,6 +35,8 @@ function Layout({ children, title, name, isOpenSide, setIsOpenSide, disableFoote setValue={setValue} isOpenSide={isOpenSide} setIsOpenSide={setIsOpenSide} + isTurnsDetails={isTurnsDetails} + setIsTurnsDetails={setIsTurnsDetails} /> )} {children} diff --git a/components/layout/sidebar/List.js b/components/layout/sidebar/List.js index 7aaeb2b..4913426 100644 --- a/components/layout/sidebar/List.js +++ b/components/layout/sidebar/List.js @@ -7,7 +7,7 @@ import NotificationD from "@/components/icons/NotificationD"; import { Button } from "@mui/material"; import ArrowLeftSideBar from "@/components/icons/ArrowLeftSideBar"; -function List({ value, setValue, setIsOpenSide }) { +function List({ value, setValue, isTurnsDetails, setIsTurnsDetails, setIsOpenSide }) { const listMenu = [ { name: 'حساب کاربری', icon: }, @@ -36,6 +36,7 @@ function List({ value, setValue, setIsOpenSide }) { onClick={() => { setValue(idx); setIsOpenSide(false); + !isTurnsDetails && setIsTurnsDetails(false); }} >
diff --git a/components/layout/sidebar/index.js b/components/layout/sidebar/index.js index 603ad6a..b5dda30 100644 --- a/components/layout/sidebar/index.js +++ b/components/layout/sidebar/index.js @@ -2,7 +2,7 @@ import Cards from "./Cards"; import Head from "./Head"; import List from "./List"; -function Sidebar({ user, value, setValue, isOpenSide, setIsOpenSide }) { +function Sidebar({ user, value, isTurnsDetails, setIsTurnsDetails, setValue, isOpenSide, setIsOpenSide }) { return ( // ${open ? 'md:w-[39%]' : 'min-w-[80px]'} @@ -30,6 +30,8 @@ function Sidebar({ user, value, setValue, isOpenSide, setIsOpenSide }) { value={value} setValue={setValue} setIsOpenSide={setIsOpenSide} + isTurnsDetails={isTurnsDetails} + setIsTurnsDetails={setIsTurnsDetails} />
diff --git a/components/layoutPanel/header/index.js b/components/layoutPanel/header/index.js index 81aef0e..fc2b0e0 100644 --- a/components/layoutPanel/header/index.js +++ b/components/layoutPanel/header/index.js @@ -1,7 +1,7 @@ import Icons from "./Icons" import Search from "./Search" -function index() { +function Header() { return (
}, - { name: 'حساب کاربری', icon: }, - { name: 'اضافه کردن پزشک', icon: }, - { name: 'نوبت ها', icon: } + { name: 'دشبورد', src: '/panel/dashboard', icon: }, + { name: 'حساب کاربری', src: '/panel/user-account', icon: }, + { name: 'اضافه کردن پزشک', src: '/', icon: }, + { name: 'نوبت ها', src: '/', icon: } ]; - const [value, setValue] = useState(0); + const pathname = usePathname(); return (
    @@ -23,21 +26,22 @@ function Links() { key={idx} className="p-[8px]" > - +
    + {item.icon} +
    + {item.name} + + ))}
diff --git a/components/layoutPanel/userDetail/index.js b/components/layoutPanel/userDetail/index.js index 4ddb670..bd4d563 100644 --- a/components/layoutPanel/userDetail/index.js +++ b/components/layoutPanel/userDetail/index.js @@ -4,7 +4,7 @@ import Activities from "./Activities"; function UserDetail({ data }) { return ( -
+
+
    {list.map((item, idx) => (
  • - +
    + +
) } diff --git a/components/panel/index.js b/components/panel/dashboard/index.js similarity index 64% rename from components/panel/index.js rename to components/panel/dashboard/index.js index 507ab67..7a90822 100644 --- a/components/panel/index.js +++ b/components/panel/dashboard/index.js @@ -2,9 +2,9 @@ import AmountOfIncome from "./amountOfIncome"; import Cards from "./Cards"; import List from "./list"; -function PanelPage({ data }) { +function DashboardPage({ data }) { return ( -
+
@@ -12,4 +12,4 @@ function PanelPage({ data }) { ) } -export default PanelPage \ No newline at end of file +export default DashboardPage \ No newline at end of file diff --git a/components/panel/list/Table.js b/components/panel/dashboard/list/Table.js similarity index 100% rename from components/panel/list/Table.js rename to components/panel/dashboard/list/Table.js diff --git a/components/panel/list/index.js b/components/panel/dashboard/list/index.js similarity index 93% rename from components/panel/list/index.js rename to components/panel/dashboard/list/index.js index 20e4d91..664e898 100644 --- a/components/panel/list/index.js +++ b/components/panel/dashboard/list/index.js @@ -1,5 +1,5 @@ import { Button } from "@mui/material" -import ArrowLeftP from "../../icons/ArrowLeftP" +import ArrowLeftP from "../../../icons/ArrowLeftP" import Table from "./Table" function List({ data }) { diff --git a/components/panel/userAccount/Head.js b/components/panel/userAccount/Head.js new file mode 100644 index 0000000..0dc8593 --- /dev/null +++ b/components/panel/userAccount/Head.js @@ -0,0 +1,22 @@ +import ArrowLeftPU from "@/components/icons/ArrowLeftPU"; +import ProfileP from "@/components/icons/ProfileP"; +import { Button } from "@mui/material"; + +function Head() { + return ( +
+
+ +
+ +
+ ) +} + +export default Head \ No newline at end of file diff --git a/components/panel/userAccount/form/Content.js b/components/panel/userAccount/form/Content.js new file mode 100644 index 0000000..240e94c --- /dev/null +++ b/components/panel/userAccount/form/Content.js @@ -0,0 +1,10 @@ +function Content({ children, text }) { + return ( +
+

{text}

+ {children} +
+ ) +} + +export default Content \ No newline at end of file diff --git a/components/panel/userAccount/form/index.js b/components/panel/userAccount/form/index.js new file mode 100644 index 0000000..3b82285 --- /dev/null +++ b/components/panel/userAccount/form/index.js @@ -0,0 +1,94 @@ +'use client'; + +import { useState } from "react"; + +import Content from "./Content"; +import EditField from "@/app/component/EditField"; +import AutoCompleteSelect from "@/app/component/element/AutoCompleteSelect"; +import { bank, city, state } from "./listSelector"; +import AddLocationP from "@/components/icons/AddLocationP"; +import { Button } from "@mui/material"; +import ArrowLeftButtonP from "@/components/icons/ArrowLeftButtonP"; + +function Form() { + + const [data, setData] = useState({ + name: { value: 'احسان احمدی', isEdit: false }, + national_code: { value: '123456789', isEdit: false }, + address: { value: '', isEdit: false }, + phone: { value: '', isEdit: false }, + account_number: { value: '', isEdit: false }, + }); + const [selected, setSelected] = useState({ + state: '', + city: '', + bank: '' + }); + const updateSelect = (event, name) => setSelected({ ...selected, [name]: event.target.innerText }) + + const changeData = (value, type, name) => + setData({ + ...data, + [name]: { + ...data[name], + [type]: value + } + }); + + return ( +
+
    + + + + + + + + + + + + + + } isTransparent={true} placeholder='از روی نقشه انتخاب کنید...' iconGray={true} changeData={changeData} data={data?.address} name='address' /> + + + + + + + + + + +
+
+ +
+
+ ) +} + +export default Form \ No newline at end of file diff --git a/components/panel/userAccount/form/listSelector.js b/components/panel/userAccount/form/listSelector.js new file mode 100644 index 0000000..55423b2 --- /dev/null +++ b/components/panel/userAccount/form/listSelector.js @@ -0,0 +1,20 @@ +export const state = [ + { label: 'استان 1', id: 10 }, + { label: 'استان 2', id: 20 }, + { label: 'استان 3', id: 30 }, + { label: 'استان 4', id: 40 } +]; + +export const city = [ + { label: 'شهر 1', id: 10 }, + { label: 'شهر 2', id: 20 }, + { label: 'شهر 3', id: 30 }, + { label: 'شهر 4', id: 40 } +]; + +export const bank = [ + { label: 'بانک 1', id: 10 }, + { label: 'بانک 2', id: 20 }, + { label: 'بانک 3', id: 30 }, + { label: 'بانک 4', id: 40 } +]; \ No newline at end of file diff --git a/components/panel/userAccount/index.js b/components/panel/userAccount/index.js new file mode 100644 index 0000000..7ca347b --- /dev/null +++ b/components/panel/userAccount/index.js @@ -0,0 +1,13 @@ +import Form from "./form"; +import Head from "./Head"; + +function UserAccountPage({ data }) { + return ( +
+ +
+
+ ) +} + +export default UserAccountPage \ No newline at end of file