add modal filter & responsive head doctors & buttons
This commit is contained in:
@@ -37,12 +37,12 @@ function ItemDoctor({ doctor }) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Hours of work */}
|
{/* Hours of work */}
|
||||||
<div className="flex my-4 items-center justify-start gap-0.5">
|
<div className="flex my-4 items-start justify-start gap-0.5">
|
||||||
<ClockD />
|
<ClockD />
|
||||||
<p className="text-[#7E7E7E] text-[12px] font-normal">ساعت کاری: {doctor.hours_of_work}</p>
|
<p className="text-[#7E7E7E] text-[12px] font-normal">ساعت کاری: {doctor.hours_of_work}</p>
|
||||||
</div>
|
</div>
|
||||||
<p
|
<p
|
||||||
className={`text-[12px] font-medium rounded w-fit p-1.5
|
className={`text-[12px] font-medium rounded w-fit p-1.5 ml-[52px]
|
||||||
${doctor.free_turn ?
|
${doctor.free_turn ?
|
||||||
'bg-[rgba(5,_186,_88,_0.04)] text-[#05BA58]' :
|
'bg-[rgba(5,_186,_88,_0.04)] text-[#05BA58]' :
|
||||||
'bg-[rgba(211,_47,_47,_0.04)] text-[#D32F2F]'
|
'bg-[rgba(211,_47,_47,_0.04)] text-[#D32F2F]'
|
||||||
|
|||||||
@@ -6,11 +6,10 @@ import { Box, Button, Modal } from "@mui/material";
|
|||||||
|
|
||||||
// Icon
|
// Icon
|
||||||
import AutoCompleteSelect from "@/app/component/element/AutoCompleteSelect";
|
import AutoCompleteSelect from "@/app/component/element/AutoCompleteSelect";
|
||||||
|
import CloseOrangeModal from "@/components/icons/CloseOrangeModal";
|
||||||
import ArrowBottomD from "@/components/icons/ArrowBottomD";
|
import ArrowBottomD from "@/components/icons/ArrowBottomD";
|
||||||
import CloseModalD from "@/components/icons/CloseModalD";
|
|
||||||
import ArrowLeftM from "@/components/icons/ArrowLeftM";
|
import ArrowLeftM from "@/components/icons/ArrowLeftM";
|
||||||
import SettingD from "@/components/icons/SettingD";
|
import SettingD from "@/components/icons/SettingD";
|
||||||
import CloseOrangeModal from "@/components/icons/CloseOrangeModal";
|
|
||||||
|
|
||||||
function ModalSearchCity() {
|
function ModalSearchCity() {
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
import LocationD from "../icons/LocationD";
|
import LocationD from "../icons/LocationD";
|
||||||
import ListDoctors from "./listDoctors";
|
import ListDoctors from "./listDoctors";
|
||||||
import SearchBar from "./search";
|
import SearchBar from "./search";
|
||||||
import SortList from "./SortList";
|
import SortList from "./sortlist";
|
||||||
|
|
||||||
function DoctorsPage() {
|
function DoctorsPage() {
|
||||||
return (
|
return (
|
||||||
<div className="pt-[120px] padding-responsive">
|
<div className="pt-[120px] padding-responsive">
|
||||||
<div className="flex justify-center gap-[24px] flex-col items-center mt-[90px]">
|
<div className="flex justify-center gap-[16px] sm:gap-[19px] md:gap-[22px] lg:gap-[24px] flex-col items-center mt-[90px]">
|
||||||
<div className="flex items-center justify-start gap-2 w-full">
|
<div className="flex items-center justify-start gap-2 w-full">
|
||||||
<LocationD />
|
<LocationD />
|
||||||
<p className="text-[#525252] text-[16px] font-semibold">خوزستان / اهواز</p>
|
<p className="text-[#525252] text-[16px] font-semibold">خوزستان / اهواز</p>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center justify-center gap-[32px]">
|
<div className="flex flex-col lg:flex-row items-start lg:items-center justify-center gap-[24px] lg:gap-[32px] w-full">
|
||||||
<SearchBar />
|
<SearchBar />
|
||||||
<SortList />
|
<SortList />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
import AutoCompleteSelect from "@/app/component/element/AutoCompleteSelect";
|
||||||
|
import Radios from "./Radios";
|
||||||
|
|
||||||
|
const specialties = ['چشم پزشکی', 'چشم پزشکی', 'چشم پزشکی', 'چشم پزشکی', 'چشم پزشکی'];
|
||||||
|
const group1 = ['خانم', 'آقا', 'هر دو'];
|
||||||
|
|
||||||
|
function Content() {
|
||||||
|
return (
|
||||||
|
<div className="mt-[50px] px-[38px] mb-[32px]">
|
||||||
|
<AutoCompleteSelect
|
||||||
|
list={specialties}
|
||||||
|
label='تخصص'
|
||||||
|
/>
|
||||||
|
<div>
|
||||||
|
<p className="text-[16px] font-medium text-[#3B3B3B]">جنسیت پزشک</p>
|
||||||
|
<Radios group={group1} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Content
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import CloseOrangeModal from "@/components/icons/CloseOrangeModal";
|
||||||
|
import { styleDefault } from "@/mui";
|
||||||
|
import { Button, Modal } from "@mui/material";
|
||||||
|
import { useState } from "react";
|
||||||
|
import Content from "./Content";
|
||||||
|
|
||||||
|
function FilterModal({ children }) {
|
||||||
|
|
||||||
|
const [open, setOpen] = useState(true);
|
||||||
|
const handleOpen = () => setOpen(true);
|
||||||
|
const handleClose = () => setOpen(false);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{/* Button Modal */}
|
||||||
|
<div onClick={handleOpen}>
|
||||||
|
{children}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Content Modal */}
|
||||||
|
<Modal
|
||||||
|
open={open}
|
||||||
|
onClose={handleClose}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style={styleDefault}
|
||||||
|
className="!px-[32px] !py-[24px] !bg-[#FFF] !rounded-[8px] !overflow-hidden !shadow-[0px_1px_24.8px_0px_rgba(204,_204,_204,_0.18)]"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className="flex justify-between w-full"
|
||||||
|
>
|
||||||
|
<p className="text-[#3B3B3B] text-[20px] font-bold">فیلترها</p>
|
||||||
|
<Button
|
||||||
|
className="cursor-pointer !p-0 flex items-center justify-center gap-1"
|
||||||
|
onClick={handleClose}
|
||||||
|
variant="text"
|
||||||
|
>
|
||||||
|
<CloseOrangeModal />
|
||||||
|
<p className="text-[#F17732] text-[14px] font-normal">حذف همه</p>
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
<Content />
|
||||||
|
</div>
|
||||||
|
</Modal>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default FilterModal
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import { FormControlLabel, Radio, RadioGroup } from "@mui/material"
|
||||||
|
|
||||||
|
function Radios({ group }) {
|
||||||
|
return (
|
||||||
|
<RadioGroup>
|
||||||
|
{group.map((item, idx) => (
|
||||||
|
<FormControlLabel value={idx} control={<Radio />} label={item} />
|
||||||
|
))}
|
||||||
|
</RadioGroup>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Radios
|
||||||
@@ -1,40 +1,49 @@
|
|||||||
import Search from "@/components/icons/Search";
|
|
||||||
import { Button, ButtonGroup, TextField } from "@mui/material";
|
import { Button, ButtonGroup, TextField } from "@mui/material";
|
||||||
import SettingD from "@/components/icons/SettingD";
|
import SettingD from "@/components/icons/SettingD";
|
||||||
import ArrowBottomD from "@/components/icons/ArrowBottomD";
|
import ArrowBottomD from "@/components/icons/ArrowBottomD";
|
||||||
import SearchD from "@/components/icons/SearchD";
|
import SearchD from "@/components/icons/SearchD";
|
||||||
|
import FilterModal from "../modal/FilterModal";
|
||||||
|
|
||||||
function SearchBar() {
|
function SearchBar() {
|
||||||
return (
|
return (
|
||||||
<ButtonGroup
|
<ButtonGroup
|
||||||
variant="contained"
|
variant="contained"
|
||||||
className="!bg-[#FFF] !rounded-lg !overflow-hidden flex items-center !h-[64px] !shadow-[0px_1px_24.8px_0px_rgba(204,_204,_204,_0.18)]"
|
className="!bg-[#FFF] !w-full lg:!w-[60%] lg:!max-w-[734px] !rounded-lg !overflow-hidden
|
||||||
|
flex items-center !shadow-[0px_1px_24.8px_0px_rgba(204,_204,_204,_0.18)]
|
||||||
|
!h-[44px] sm:!h-[50px] md:!h-[57px] lg:!h-[64px]"
|
||||||
>
|
>
|
||||||
<Button
|
<FilterModal>
|
||||||
className="!border-none !h-[64px] !px-2 !bg-[#F8F8FF] !rounded-l-none"
|
<Button
|
||||||
variant="contained"
|
className="!border-none !hidden lg:!flex !max-h-full !min-w-fit !h-[64px] !px-2 !bg-[#F8F8FF] !rounded-l-none"
|
||||||
color="secondary"
|
variant="contained"
|
||||||
>
|
color="secondary"
|
||||||
<div className="min-w-[20px] min-h-[20px]">
|
>
|
||||||
<SettingD />
|
<div className="min-w-[20px] min-h-[20px]">
|
||||||
</div>
|
<SettingD />
|
||||||
<p className="text-[#616161] text-[16px] font-medium mx-2">فیلترها</p>
|
</div>
|
||||||
<ArrowBottomD />
|
<p className="text-[#616161] text-[14px] md:text-[16px] font-medium mx-2">فیلترها</p>
|
||||||
</Button>
|
<div className="w-[20px] md:w-[22px] lg:w-[24px] h-[20px] md:h-[22px] lg:h-[24px]">
|
||||||
|
<ArrowBottomD />
|
||||||
|
</div>
|
||||||
|
</Button>
|
||||||
|
</FilterModal>
|
||||||
<TextField
|
<TextField
|
||||||
variant="standard"
|
variant="standard"
|
||||||
InputProps={{
|
InputProps={{
|
||||||
disableUnderline: true
|
disableUnderline: true
|
||||||
}}
|
}}
|
||||||
sx={{
|
sx={{
|
||||||
'& .MuiInputBase-root': {
|
display: 'flex',
|
||||||
height: '100%'
|
flexDirection: 'column',
|
||||||
},
|
justifyContent: 'center',
|
||||||
|
width: '100% !important',
|
||||||
'& .MuiInput-root': {
|
'& .MuiInput-root': {
|
||||||
|
padding: '0',
|
||||||
borderBottom: 'none',
|
borderBottom: 'none',
|
||||||
},
|
},
|
||||||
'& .MuiInputBase-input': {
|
'& .MuiInputBase-input': {
|
||||||
color: '#7E7E7E'
|
color: '#6C757D',
|
||||||
|
padding: '0px'
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
placeholder="جستجوی نام پزشک، تخصص، بیماری ..."
|
placeholder="جستجوی نام پزشک، تخصص، بیماری ..."
|
||||||
@@ -42,7 +51,8 @@ function SearchBar() {
|
|||||||
className={`!shadow-none !px-5 !h-full !w-[524px] bg-[#FAFAFA] !text-[14px] md:!text-[16px] !min-w-[50%] !rounded-0 !font-normal !text-[#6C757D]`}
|
className={`!shadow-none !px-5 !h-full !w-[524px] bg-[#FAFAFA] !text-[14px] md:!text-[16px] !min-w-[50%] !rounded-0 !font-normal !text-[#6C757D]`}
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
className="!rounded-[4px] !ml-1 !w-[56px] !h-[56px] !gap-2.5 !p-4"
|
className="!flex !m-1 !rounded-[4px] !min-w-[40px] sm:!min-w-[42px] md:!min-w-[49px] lg:!min-w-[56px]
|
||||||
|
!gap-2.5 !p-2.5 !h-[calc(100%_-_8px)]"
|
||||||
>
|
>
|
||||||
<SearchD />
|
<SearchD />
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
import ArrowBottomD from "@/components/icons/ArrowBottomD"
|
||||||
|
import SettingD from "@/components/icons/SettingD"
|
||||||
|
import { Button } from "@mui/material"
|
||||||
|
|
||||||
|
function FilterBtn() {
|
||||||
|
return (
|
||||||
|
<Button
|
||||||
|
className="!flex lg:!hidden !h-[44px] sm:!h-[50px] md:!h-[57px] lg:!h-[64px] !p-2.5 !bg-transparent !shadow-none !border !border-solid !border-[#EFEFEF]"
|
||||||
|
variant="contained"
|
||||||
|
color="secondary"
|
||||||
|
>
|
||||||
|
<div className="min-w-[20px] min-h-[20px]">
|
||||||
|
<SettingD />
|
||||||
|
</div>
|
||||||
|
<p className="text-[#616161] text-[14px] md:text-[16px] font-medium mx-2">فیلترها</p>
|
||||||
|
<div className="w-[20px] md:w-[22px] lg:w-[24px] h-[20px] md:h-[22px] lg:h-[24px]">
|
||||||
|
<ArrowBottomD />
|
||||||
|
</div>
|
||||||
|
</Button>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default FilterBtn
|
||||||
@@ -1,11 +1,9 @@
|
|||||||
'use client';
|
import { MenuItem, Select, SvgIcon } from "@mui/material"
|
||||||
import { Box, FormControl, InputLabel, MenuItem, Select, SvgIcon } from "@mui/material"
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import ArrowBottomD from "../icons/ArrowBottomD";
|
import ArrowBottomD from "../../icons/ArrowBottomD";
|
||||||
import SettingD from "../icons/SettingD";
|
import SortD from "../../icons/SortD";
|
||||||
import SortD from "../icons/SortD";
|
|
||||||
|
|
||||||
function SortList() {
|
function SelectSort() {
|
||||||
|
|
||||||
const [age, setAge] = useState('');
|
const [age, setAge] = useState('');
|
||||||
|
|
||||||
@@ -18,19 +16,19 @@ function SortList() {
|
|||||||
value={age}
|
value={age}
|
||||||
displayEmpty
|
displayEmpty
|
||||||
onChange={handleChange}
|
onChange={handleChange}
|
||||||
className="!w-[305px] !bg-[#FFF]"
|
className="!w-[193px] !max-w-[305px] lg:!w-full text-[14px] md:text-[16px] !bg-[#FFF] !h-[44px] sm:!h-[50px] md:!h-[57px] lg:!h-[64px]"
|
||||||
renderValue={(value) => {
|
renderValue={(value) => {
|
||||||
return (
|
return (
|
||||||
<Box sx={{ display: "flex", gap: 1 }}>
|
<div className="w-[20px] gap-[4px] md:gap-[8px] md:w-[22px] lg:w-[24px] h-[20px] md:h-[22px] lg:h-[24px]">
|
||||||
<SvgIcon color="primary">
|
<SvgIcon color="primary">
|
||||||
<SortD />
|
<SortD />
|
||||||
</SvgIcon>
|
</SvgIcon>
|
||||||
{value || 'مرتب سازی'}
|
{value || 'مرتب سازی'}
|
||||||
</Box>
|
</div>
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
IconComponent={() => (
|
IconComponent={() => (
|
||||||
<div className="mx-3">
|
<div className="mx-3 min-w-[20px] md:min-w-[22px] lg:min-w-[24px] min-h-[20px] md:min-h-[22px] lg:min-h-[24px]">
|
||||||
<ArrowBottomD />
|
<ArrowBottomD />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@@ -50,4 +48,4 @@ function SortList() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default SortList
|
export default SelectSort
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import FilterBtn from "./FilterBtn";
|
||||||
|
import SelectSort from "./SelectSort";
|
||||||
|
|
||||||
|
function SortList() {
|
||||||
|
return (
|
||||||
|
<div className="flex items-center lg:!w-[25%] gap-[20px] lg:gap-0">
|
||||||
|
<FilterBtn />
|
||||||
|
<SelectSort />
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default SortList
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
function ArrowBottomD() {
|
function ArrowBottomD() {
|
||||||
return (
|
return (
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="25" height="24" viewBox="0 0 25 24" fill="none">
|
<svg className="w-full h-full" xmlns="http://www.w3.org/2000/svg" width="25" height="24" viewBox="0 0 25 24" fill="none">
|
||||||
<path d="M20.75 8.95L13.9583 15.47C13.1562 16.24 11.8438 16.24 11.0417 15.47L4.25 8.95" stroke="#525252" strokeWidth="1.5" strokeMiterlimit="10" strokeLinecap="round" strokeLinejoin="round" />
|
<path d="M20.75 8.95L13.9583 15.47C13.1562 16.24 11.8438 16.24 11.0417 15.47L4.25 8.95" stroke="#525252" strokeWidth="1.5" strokeMiterlimit="10" strokeLinecap="round" strokeLinejoin="round" />
|
||||||
</svg>
|
</svg>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user