diff --git a/app/component/FieldIcon.js b/app/component/FieldIcon.js new file mode 100644 index 0000000..c352127 --- /dev/null +++ b/app/component/FieldIcon.js @@ -0,0 +1,42 @@ +import EditGrayA from "@/components/icons/EditGrayA" +import EditOrangeA from "@/components/icons/EditOrangeA" +import { Button, TextField } from "@mui/material" + +function FieldIcon({ changeData, icon, placeholder, name }) { + return ( +
+ { + changeData(e.target.value, name) + }} + sx={{ + '& .MuiFormLabel-root': { + top: '-4px !important' + }, + '& .MuiInputBase-input': { padding: '12.5px 14px' }, + '& .MuiOutlinedInput-notchedOutline': { border: '1px solid #D7D7D7 !important' }, + '& .MuiInputBase-root': { + padding: '0 !important', + borderRadius: '8px !important' + }, + '.Mui-focused': { + '& .MuiOutlinedInput-notchedOutline': { + border: '1px solid #5559CE !important', + transition: '0.5s all' + } + } + }} + /> + +
+ ) +} + +export default FieldIcon \ No newline at end of file diff --git a/app/globals.css b/app/globals.css index 20f88dd..80a3721 100644 --- a/app/globals.css +++ b/app/globals.css @@ -304,6 +304,10 @@ html { border-radius: 12px !important; } +.w-full-content .content-text-panel { + width: 100%; +} + @keyframes rotate { from { rotate: 90; diff --git a/app/panel/(layout)/turns/page.js b/app/panel/(layout)/turns/page.js new file mode 100644 index 0000000..0597425 --- /dev/null +++ b/app/panel/(layout)/turns/page.js @@ -0,0 +1,10 @@ +import TurnsPage from '@/components/panel/turns' +import Information from '@/data/information.json'; + +function page() { + return ( + + ) +} + +export default page \ No newline at end of file diff --git a/components/icons/AddTimeP.js b/components/icons/AddTimeP.js new file mode 100644 index 0000000..11568a2 --- /dev/null +++ b/components/icons/AddTimeP.js @@ -0,0 +1,11 @@ +function AddTimeP() { + return ( + + + + + + ) +} + +export default AddTimeP \ No newline at end of file diff --git a/components/icons/ClockP.js b/components/icons/ClockP.js new file mode 100644 index 0000000..3ec63b1 --- /dev/null +++ b/components/icons/ClockP.js @@ -0,0 +1,10 @@ +function ClockP() { + return ( + + + + + ) +} + +export default ClockP \ No newline at end of file diff --git a/components/icons/PlusBlueP.js b/components/icons/PlusBlueP.js new file mode 100644 index 0000000..eadfb47 --- /dev/null +++ b/components/icons/PlusBlueP.js @@ -0,0 +1,10 @@ +function PlusBlueP() { + return ( + + + + + ) +} + +export default PlusBlueP \ No newline at end of file diff --git a/components/layoutPanel/sidebar/Links.js b/components/layoutPanel/sidebar/Links.js index 54141a0..fdc9f02 100644 --- a/components/layoutPanel/sidebar/Links.js +++ b/components/layoutPanel/sidebar/Links.js @@ -14,7 +14,7 @@ function Links() { { name: 'دشبورد', src: '/panel/dashboard', icon: }, { name: 'حساب کاربری', src: '/panel/user-account', icon: }, { name: 'اضافه کردن پزشک', src: '/panel/add-doctor', icon: }, - { name: 'نوبت ها', src: '/', icon: } + { name: 'نوبت ها', src: '/panel/turns', icon: } ]; const pathname = usePathname(); diff --git a/components/panel/ContentText.js b/components/panel/ContentText.js index 7e00054..f343bf8 100644 --- a/components/panel/ContentText.js +++ b/components/panel/ContentText.js @@ -1,6 +1,6 @@ function ContentText({ children, text }) { return ( -
+

{text}

{children}
diff --git a/components/panel/addDoctor/index.js b/components/panel/addDoctor/index.js index 4440ac7..212115b 100644 --- a/components/panel/addDoctor/index.js +++ b/components/panel/addDoctor/index.js @@ -32,7 +32,7 @@ function AddDoctorPage() { value={value} handleChange={handleChange} /> -
+
{components[value]}
diff --git a/components/panel/addDoctor/tabsHead/specialDays/Form.js b/components/panel/addDoctor/tabsHead/specialDays/Form.js new file mode 100644 index 0000000..314caac --- /dev/null +++ b/components/panel/addDoctor/tabsHead/specialDays/Form.js @@ -0,0 +1,89 @@ +import { useState } from "react" + +import AutoCompleteSelect from "@/app/component/element/AutoCompleteSelect" +import ContentText from "@/components/panel/ContentText" +import { dayOfWeek, timeEachTurn, turnsPerDay } from "./listSelector" +import FieldIcon from "@/app/component/FieldIcon" +import { Button } from "@mui/material" +import PlusBlueP from "@/components/icons/PlusBlueP" +import ClockP from "@/components/icons/ClockP" + +function Form() { + + const [data, setData] = useState({ + start_time: '', + end_time: '' + }); + const [selected, setSelected] = useState({ + numberOfTurns: '', + timeOfEachTurn: '' + }); + + const updateSelect = (event, name) => setSelected({ ...selected, [name]: event.target.innerText }) + + const changeData = (value, type, name) => + setData({ + ...data, + [name]: value + }); + + return ( +
+
+ + + + + + +
+
+
+
+ + + + + } + name='start_time' + /> + + + } + name='end_time' + /> + + +
+
+ ) +} + +export default Form \ No newline at end of file diff --git a/components/panel/addDoctor/tabsHead/specialDays/List.js b/components/panel/addDoctor/tabsHead/specialDays/List.js new file mode 100644 index 0000000..8203450 --- /dev/null +++ b/components/panel/addDoctor/tabsHead/specialDays/List.js @@ -0,0 +1,64 @@ +import { useState } from "react"; +import { Table, TableBody, TableCell, TableContainer, TableHead, TableRow } from "@mui/material" + +function List() { + + const [data, setData] = useState([ + { name: 'شنبه', morning_time: '9 - 12', evening_time: '16 - 21' }, + { name: 'یکشنبه', morning_time: '9 - 12', evening_time: '16 - 21' }, + { name: 'دوشنبه', morning_time: '9 - 12', evening_time: '16 - 21' } + ]); + + const [open, setOpen] = useState(false); + const handleOpen = () => setOpen(true); + const handleClose = () => setOpen(false); + + return ( +
+

لیست روزهای خاص

+ + + + + روز های هفته + تایم صبح + تایم عصر + + + + {data.map((row) => ( + + + {row.name} + + + {row.morning_time} + + + {row.evening_time} + + + ))} + +
+
+
+ ) +} + +export default List \ No newline at end of file diff --git a/components/panel/addDoctor/tabsHead/specialDays/index.js b/components/panel/addDoctor/tabsHead/specialDays/index.js index d82270f..5db7c74 100644 --- a/components/panel/addDoctor/tabsHead/specialDays/index.js +++ b/components/panel/addDoctor/tabsHead/specialDays/index.js @@ -1,6 +1,22 @@ +import { Button } from "@mui/material" +import Form from "./Form" +import List from "./List" +import ArrowLeftWhiteD from "@/components/icons/ArrowLeftWhiteD" + function SpecialDays() { return ( -
SpecialDays
+
+
+ + +
) } diff --git a/components/panel/addDoctor/tabsHead/specialDays/listSelector.js b/components/panel/addDoctor/tabsHead/specialDays/listSelector.js new file mode 100644 index 0000000..8882a93 --- /dev/null +++ b/components/panel/addDoctor/tabsHead/specialDays/listSelector.js @@ -0,0 +1,22 @@ +export const turnsPerDay = [ + { label: '1', id: 10 }, + { label: '2', id: 20 }, + { label: '3', id: 30 }, + { label: '4', id: 40 } +]; + +export const timeEachTurn = [ + { label: '10', id: 10 }, + { label: '20', id: 20 }, + { label: '30', id: 30 }, + { label: '40', id: 40 } +]; + +export const dayOfWeek = [ + { label: 'شنبه', id: 10 }, + { label: 'یکشنبه', id: 20 }, + { label: 'دوشنبه', id: 30 }, + { label: 'سه شنبه', id: 40 }, + { label: 'چهار شنبه', id: 40 }, + { label: 'پنج شنبه', id: 40 } +]; \ No newline at end of file diff --git a/components/panel/addDoctor/tabsHead/turns/Form.js b/components/panel/addDoctor/tabsHead/turns/Form.js new file mode 100644 index 0000000..688751a --- /dev/null +++ b/components/panel/addDoctor/tabsHead/turns/Form.js @@ -0,0 +1,37 @@ +import AutoCompleteSelect from "@/app/component/element/AutoCompleteSelect" +import ContentText from "@/components/panel/ContentText" +import { numberOfTurns, timeOfEachTurn } from "./listSelector" +import { useState } from "react"; + +function Form() { + + const [selected, setSelected] = useState({ + numberOfTurns: '', + timeOfEachTurn: '', + }); + + const updateSelect = (event, name) => setSelected({ ...selected, [name]: event.target.innerText }) + + return ( +
+ + + + + + +
+ ) +} + +export default Form \ No newline at end of file diff --git a/components/panel/addDoctor/tabsHead/turns/index.js b/components/panel/addDoctor/tabsHead/turns/index.js index bb5d4a3..6607eb1 100644 --- a/components/panel/addDoctor/tabsHead/turns/index.js +++ b/components/panel/addDoctor/tabsHead/turns/index.js @@ -1,6 +1,20 @@ +import { Button } from "@mui/material" +import Form from "./Form" +import ArrowLeftWhiteD from "@/components/icons/ArrowLeftWhiteD" + function Turns() { return ( -
Turns
+
+ + +
) } diff --git a/components/panel/addDoctor/tabsHead/turns/listSelector.js b/components/panel/addDoctor/tabsHead/turns/listSelector.js new file mode 100644 index 0000000..b8649bf --- /dev/null +++ b/components/panel/addDoctor/tabsHead/turns/listSelector.js @@ -0,0 +1,13 @@ +export const numberOfTurns = [ + { label: 'نوبت 1', id: 10 }, + { label: 'نوبت 2', id: 20 }, + { label: 'نوبت 3', id: 30 }, + { label: 'نوبت 4', id: 40 } +]; + +export const timeOfEachTurn = [ + { 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/addDoctor/tabsHead/workingDays/List.js b/components/panel/addDoctor/tabsHead/workingDays/List.js new file mode 100644 index 0000000..94de9b3 --- /dev/null +++ b/components/panel/addDoctor/tabsHead/workingDays/List.js @@ -0,0 +1,77 @@ +import { useState } from "react"; +import ModalAddTime from "./modal/ModalAddTime"; +import { Table, TableBody, TableCell, TableContainer, TableHead, TableRow } from "@mui/material" +import ContentModal from "./modal/ContentModal"; + +function List() { + + const [data, setData] = useState([ + { name: 'شنبه', morning_time: '', evening_time: '' }, + { name: 'یکشنبه', morning_time: '', evening_time: '' }, + { name: 'دوشنبه', morning_time: '', evening_time: '' }, + { name: 'سه شنبه', morning_time: '', evening_time: '' }, + { name: 'چهار شنبه', morning_time: '', evening_time: '' }, + { name: 'پنج شنبه', morning_time: '', evening_time: '' }, + ]); + + const [open, setOpen] = useState(false); + const handleOpen = () => setOpen(true); + const handleClose = () => setOpen(false); + + return ( +
+ + + + + روز های هفته + تایم صبح + تایم عصر + + + + {data.map((row) => ( + + + {row.name} + + + {row.morning_time ? '' : ( + + )} + + + {row.evening_time ? '' : ( + + )} + + + ))} + +
+
+ +
+ ) +} + +export default List \ No newline at end of file diff --git a/components/panel/addDoctor/tabsHead/workingDays/index.js b/components/panel/addDoctor/tabsHead/workingDays/index.js index 7d813b2..695e7c8 100644 --- a/components/panel/addDoctor/tabsHead/workingDays/index.js +++ b/components/panel/addDoctor/tabsHead/workingDays/index.js @@ -1,6 +1,11 @@ +import List from "./List" + function WorkingDays() { return ( -
WorkingDays
+
+

لیست روزهای کاری

+ +
) } diff --git a/components/panel/addDoctor/tabsHead/workingDays/modal/ContentModal.js b/components/panel/addDoctor/tabsHead/workingDays/modal/ContentModal.js new file mode 100644 index 0000000..539c398 --- /dev/null +++ b/components/panel/addDoctor/tabsHead/workingDays/modal/ContentModal.js @@ -0,0 +1,36 @@ +import CloseModalD from "@/components/icons/CloseModalD" +import { styleDefault } from "@/mui" +import { Box, Button, Modal } from "@mui/material" +import Radios from "./Radios" +import Form from "./Form" + +function ContentModal({ open, setOpen, handleClose }) { + return ( + + +
+

اضافه کردن روز کاری

+ +
+
+ + +
+
+
+ ) +} + +export default ContentModal \ No newline at end of file diff --git a/components/panel/addDoctor/tabsHead/workingDays/modal/Form.js b/components/panel/addDoctor/tabsHead/workingDays/modal/Form.js new file mode 100644 index 0000000..0624b26 --- /dev/null +++ b/components/panel/addDoctor/tabsHead/workingDays/modal/Form.js @@ -0,0 +1,48 @@ +import { useState } from "react"; +import ClockP from "@/components/icons/ClockP"; +import FieldIcon from "@/app/component/FieldIcon"; +import ContentText from "@/components/panel/ContentText"; +import { Button } from "@mui/material"; + +function Form() { + + const [data, setData] = useState({ + start_time: '', + end_time: '' + }); + + const changeData = (value, name) => setData({ ...data, [name]: value }) + + return ( +
+ + } + name='start_time' + /> + + + } + name='end_time' + /> + +
+ + +
+
+ ) +} + +export default Form \ No newline at end of file diff --git a/components/panel/addDoctor/tabsHead/workingDays/modal/ModalAddTime.js b/components/panel/addDoctor/tabsHead/workingDays/modal/ModalAddTime.js new file mode 100644 index 0000000..7cc13b9 --- /dev/null +++ b/components/panel/addDoctor/tabsHead/workingDays/modal/ModalAddTime.js @@ -0,0 +1,20 @@ +import AddTimeP from '@/components/icons/AddTimeP' +import { Button } from '@mui/material' +import React from 'react' + +function ModalAddTime({ handleOpen }) { + return ( +
+ +
+ ) +} + +export default ModalAddTime \ No newline at end of file diff --git a/components/panel/addDoctor/tabsHead/workingDays/modal/Radios.js b/components/panel/addDoctor/tabsHead/workingDays/modal/Radios.js new file mode 100644 index 0000000..e3189c8 --- /dev/null +++ b/components/panel/addDoctor/tabsHead/workingDays/modal/Radios.js @@ -0,0 +1,21 @@ +import { FormControlLabel, Radio, RadioGroup } from "@mui/material" + +function Radios() { + return ( + + } label="روز کاری" /> + } label="تعطیل" /> + + ) +} + +export default Radios \ No newline at end of file diff --git a/components/panel/turns/index.js b/components/panel/turns/index.js new file mode 100644 index 0000000..d2ca7c2 --- /dev/null +++ b/components/panel/turns/index.js @@ -0,0 +1,7 @@ +function TurnsPage({ data }) { + return ( +
TurnsPage
+ ) +} + +export default TurnsPage \ No newline at end of file