add modal filter & responsive head doctors & buttons
This commit is contained in:
@@ -37,12 +37,12 @@ function ItemDoctor({ doctor }) {
|
||||
</div>
|
||||
|
||||
{/* 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 />
|
||||
<p className="text-[#7E7E7E] text-[12px] font-normal">ساعت کاری: {doctor.hours_of_work}</p>
|
||||
</div>
|
||||
<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 ?
|
||||
'bg-[rgba(5,_186,_88,_0.04)] text-[#05BA58]' :
|
||||
'bg-[rgba(211,_47,_47,_0.04)] text-[#D32F2F]'
|
||||
|
||||
@@ -6,11 +6,10 @@ import { Box, Button, Modal } from "@mui/material";
|
||||
|
||||
// Icon
|
||||
import AutoCompleteSelect from "@/app/component/element/AutoCompleteSelect";
|
||||
import CloseOrangeModal from "@/components/icons/CloseOrangeModal";
|
||||
import ArrowBottomD from "@/components/icons/ArrowBottomD";
|
||||
import CloseModalD from "@/components/icons/CloseModalD";
|
||||
import ArrowLeftM from "@/components/icons/ArrowLeftM";
|
||||
import SettingD from "@/components/icons/SettingD";
|
||||
import CloseOrangeModal from "@/components/icons/CloseOrangeModal";
|
||||
|
||||
function ModalSearchCity() {
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import LocationD from "../icons/LocationD";
|
||||
import ListDoctors from "./listDoctors";
|
||||
import SearchBar from "./search";
|
||||
import SortList from "./SortList";
|
||||
import SortList from "./sortlist";
|
||||
|
||||
function DoctorsPage() {
|
||||
return (
|
||||
<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">
|
||||
<LocationD />
|
||||
<p className="text-[#525252] text-[16px] font-semibold">خوزستان / اهواز</p>
|
||||
</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 />
|
||||
<SortList />
|
||||
</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 SettingD from "@/components/icons/SettingD";
|
||||
import ArrowBottomD from "@/components/icons/ArrowBottomD";
|
||||
import SearchD from "@/components/icons/SearchD";
|
||||
import FilterModal from "../modal/FilterModal";
|
||||
|
||||
function SearchBar() {
|
||||
return (
|
||||
<ButtonGroup
|
||||
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
|
||||
className="!border-none !h-[64px] !px-2 !bg-[#F8F8FF] !rounded-l-none"
|
||||
variant="contained"
|
||||
color="secondary"
|
||||
>
|
||||
<div className="min-w-[20px] min-h-[20px]">
|
||||
<SettingD />
|
||||
</div>
|
||||
<p className="text-[#616161] text-[16px] font-medium mx-2">فیلترها</p>
|
||||
<ArrowBottomD />
|
||||
</Button>
|
||||
<FilterModal>
|
||||
<Button
|
||||
className="!border-none !hidden lg:!flex !max-h-full !min-w-fit !h-[64px] !px-2 !bg-[#F8F8FF] !rounded-l-none"
|
||||
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>
|
||||
</FilterModal>
|
||||
<TextField
|
||||
variant="standard"
|
||||
InputProps={{
|
||||
disableUnderline: true
|
||||
}}
|
||||
sx={{
|
||||
'& .MuiInputBase-root': {
|
||||
height: '100%'
|
||||
},
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
justifyContent: 'center',
|
||||
width: '100% !important',
|
||||
'& .MuiInput-root': {
|
||||
padding: '0',
|
||||
borderBottom: 'none',
|
||||
},
|
||||
'& .MuiInputBase-input': {
|
||||
color: '#7E7E7E'
|
||||
color: '#6C757D',
|
||||
padding: '0px'
|
||||
}
|
||||
}}
|
||||
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]`}
|
||||
/>
|
||||
<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 />
|
||||
</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 { Box, FormControl, InputLabel, MenuItem, Select, SvgIcon } from "@mui/material"
|
||||
import { MenuItem, Select, SvgIcon } from "@mui/material"
|
||||
import { useState } from "react";
|
||||
import ArrowBottomD from "../icons/ArrowBottomD";
|
||||
import SettingD from "../icons/SettingD";
|
||||
import SortD from "../icons/SortD";
|
||||
import ArrowBottomD from "../../icons/ArrowBottomD";
|
||||
import SortD from "../../icons/SortD";
|
||||
|
||||
function SortList() {
|
||||
function SelectSort() {
|
||||
|
||||
const [age, setAge] = useState('');
|
||||
|
||||
@@ -18,19 +16,19 @@ function SortList() {
|
||||
value={age}
|
||||
displayEmpty
|
||||
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) => {
|
||||
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">
|
||||
<SortD />
|
||||
</SvgIcon>
|
||||
{value || 'مرتب سازی'}
|
||||
</Box>
|
||||
</div>
|
||||
);
|
||||
}}
|
||||
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 />
|
||||
</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() {
|
||||
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" />
|
||||
</svg>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user