add prettier formatter to all file
This commit is contained in:
@@ -1,26 +1,21 @@
|
||||
import { Button, ButtonGroup } from "@mui/material"
|
||||
import { Button, ButtonGroup } from "@mui/material";
|
||||
|
||||
function Date() {
|
||||
return (
|
||||
<div className="flex items-center justify-start gap-y-[20px] gap-[8px] md:gap-0">
|
||||
<p className="text-[#616161] text-[14px] font-normal md:hidden">انتخاب بازه زمانی</p>
|
||||
<ButtonGroup
|
||||
variant="outlined"
|
||||
className=""
|
||||
>
|
||||
<Button
|
||||
className="!border-[#EFEFEF] !bg-[#FFF] !py-[4.5px] !px-[33px] !text-[#7E7E7E] !text-[16px] !font-normal"
|
||||
>
|
||||
از تاریخ
|
||||
</Button>
|
||||
<Button
|
||||
className="!border-[#EFEFEF] !bg-[#FFF] !py-[4.5px] !px-[33px] !text-[#7E7E7E] !text-[16px] !font-normal"
|
||||
>
|
||||
تا تاریخ
|
||||
</Button>
|
||||
</ButtonGroup>
|
||||
</div>
|
||||
)
|
||||
return (
|
||||
<div className="flex items-center justify-start gap-y-[20px] gap-[8px] md:gap-0">
|
||||
<p className="text-[#616161] text-[14px] font-normal md:hidden">
|
||||
انتخاب بازه زمانی
|
||||
</p>
|
||||
<ButtonGroup variant="outlined" className="">
|
||||
<Button className="!border-[#EFEFEF] !bg-[#FFF] !py-[4.5px] !px-[33px] !text-[#7E7E7E] !text-[16px] !font-normal">
|
||||
از تاریخ
|
||||
</Button>
|
||||
<Button className="!border-[#EFEFEF] !bg-[#FFF] !py-[4.5px] !px-[33px] !text-[#7E7E7E] !text-[16px] !font-normal">
|
||||
تا تاریخ
|
||||
</Button>
|
||||
</ButtonGroup>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Date
|
||||
export default Date;
|
||||
|
||||
@@ -1,53 +1,53 @@
|
||||
import ArrowBottomP from '@/components/icons/ArrowBottomP'
|
||||
import ExportP from '@/components/icons/ExportP'
|
||||
import SearchD from '@/components/icons/SearchD'
|
||||
import { Button, ButtonGroup, TextField } from '@mui/material'
|
||||
import ArrowBottomP from "@/components/icons/ArrowBottomP";
|
||||
import ExportP from "@/components/icons/ExportP";
|
||||
import SearchD from "@/components/icons/SearchD";
|
||||
import { Button, ButtonGroup, TextField } from "@mui/material";
|
||||
|
||||
function SearchDoctor() {
|
||||
return (
|
||||
<div className="flex flex-col sm:flex-row items-start sm:items-center gap-y-[20px] justify-between mt-[20px] md:mt-[22px] lg:mt-[24px] ">
|
||||
<ButtonGroup
|
||||
variant="contained"
|
||||
className="!bg-[#FFF] lg:!w-[55%] !rounded-[4px] !overflow-hidden
|
||||
return (
|
||||
<div className="flex flex-col sm:flex-row items-start sm:items-center gap-y-[20px] justify-between mt-[20px] md:mt-[22px] lg:mt-[24px] ">
|
||||
<ButtonGroup
|
||||
variant="contained"
|
||||
className="!bg-[#FFF] lg:!w-[55%] !rounded-[4px] !overflow-hidden
|
||||
flex items-center !shadow-none !h-fit !p-1 !border !border-[#EFEFEF]"
|
||||
>
|
||||
<TextField
|
||||
variant="standard"
|
||||
InputProps={{
|
||||
disableUnderline: true
|
||||
}}
|
||||
sx={{
|
||||
background: 'transparent !important',
|
||||
'& .MuiInputBase-root': { height: '100%' },
|
||||
'& .MuiInput-root': { borderBottom: 'none', },
|
||||
'& .MuiInputBase-input': {
|
||||
background: 'transparent',
|
||||
color: '#7E7E7E',
|
||||
padding: '0'
|
||||
}
|
||||
}}
|
||||
placeholder='جستجو براساس نام پزشک...'
|
||||
dir='rtl'
|
||||
className={`!shadow-none !w-full !px-5 !h-full bg-[#FAFAFA] !text-[14px] md:!text-[16px] !min-w-[50%] !rounded-0 !font-normal !text-[#6C757D]`}
|
||||
/>
|
||||
<Button
|
||||
className="
|
||||
>
|
||||
<TextField
|
||||
variant="standard"
|
||||
InputProps={{
|
||||
disableUnderline: true,
|
||||
}}
|
||||
sx={{
|
||||
background: "transparent !important",
|
||||
"& .MuiInputBase-root": { height: "100%" },
|
||||
"& .MuiInput-root": { borderBottom: "none" },
|
||||
"& .MuiInputBase-input": {
|
||||
background: "transparent",
|
||||
color: "#7E7E7E",
|
||||
padding: "0",
|
||||
},
|
||||
}}
|
||||
placeholder="جستجو براساس نام پزشک..."
|
||||
dir="rtl"
|
||||
className={`!shadow-none !w-full !px-5 !h-full bg-[#FAFAFA] !text-[14px] md:!text-[16px] !min-w-[50%] !rounded-0 !font-normal !text-[#6C757D]`}
|
||||
/>
|
||||
<Button
|
||||
className="
|
||||
!rounded-[4px] !p-[8px] !w-[56px] !h-[56px] !max-w-[40px] !max-h-[40px]
|
||||
"
|
||||
>
|
||||
<SearchD />
|
||||
</Button>
|
||||
</ButtonGroup>
|
||||
<Button
|
||||
variant='outlined'
|
||||
className='!border-[#5559CE] !flex !text-[14px] md:!text-[16px] !items-center !gap-[4px] md:!gap-[5px] lg:!gap-[6px] !rounded-[4px] !py-[8px] md:!py-[9px] !px-[12px] sm:!px-[14px] md:!px-[16px] lg:!px-[18px]'
|
||||
>
|
||||
<ExportP />
|
||||
خروجی گرفتن
|
||||
<ArrowBottomP />
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
>
|
||||
<SearchD />
|
||||
</Button>
|
||||
</ButtonGroup>
|
||||
<Button
|
||||
variant="outlined"
|
||||
className="!border-[#5559CE] !flex !text-[14px] md:!text-[16px] !items-center !gap-[4px] md:!gap-[5px] lg:!gap-[6px] !rounded-[4px] !py-[8px] md:!py-[9px] !px-[12px] sm:!px-[14px] md:!px-[16px] lg:!px-[18px]"
|
||||
>
|
||||
<ExportP />
|
||||
خروجی گرفتن
|
||||
<ArrowBottomP />
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default SearchDoctor
|
||||
export default SearchDoctor;
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
import Date from "./Date"
|
||||
import SearchDoctor from "./SearchDoctor"
|
||||
import Date from "./Date";
|
||||
import SearchDoctor from "./SearchDoctor";
|
||||
|
||||
function Head() {
|
||||
return (
|
||||
<div className="w-full">
|
||||
<div className="flex flex-col sm:flex-row items-start md:items-center justify-start gap-[10px]">
|
||||
<p className="text-[#525252] text-[14px] sm:text-[16px] md:text-[18px] lg:text-[20px] font-bold">لیست نوبت های پزشکان</p>
|
||||
<Date />
|
||||
</div>
|
||||
<SearchDoctor />
|
||||
</div>
|
||||
)
|
||||
return (
|
||||
<div className="w-full">
|
||||
<div className="flex flex-col sm:flex-row items-start md:items-center justify-start gap-[10px]">
|
||||
<p className="text-[#525252] text-[14px] sm:text-[16px] md:text-[18px] lg:text-[20px] font-bold">
|
||||
لیست نوبت های پزشکان
|
||||
</p>
|
||||
<Date />
|
||||
</div>
|
||||
<SearchDoctor />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Head
|
||||
export default Head;
|
||||
|
||||
@@ -1,27 +1,25 @@
|
||||
'use client';
|
||||
"use client";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
import Head from "./head";
|
||||
import List from "./list";
|
||||
|
||||
|
||||
function TurnsPage({ data }) {
|
||||
const [loading, setLoading] = useState(true);
|
||||
|
||||
const [loading, setLoading] = useState(true);
|
||||
useEffect(() => {
|
||||
setTimeout(() => {
|
||||
setLoading(false);
|
||||
}, 2000);
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
setTimeout(() => {
|
||||
setLoading(false);
|
||||
}, 2000);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="bg-transparent md:bg-[#FFF] opacity-page rounded-[8px] shadow-none md:shadow-[0px_1px_24.8px_0px_rgba(204,204,204,0.18)] pt-0 md:pt-[12px] lg:pt-[24px] px-0 md:px-[24px] p-[24px]">
|
||||
<Head />
|
||||
<List data={data} loading={loading} />
|
||||
</div>
|
||||
)
|
||||
return (
|
||||
<div className="bg-transparent md:bg-[#FFF] opacity-page rounded-[8px] shadow-none md:shadow-[0px_1px_24.8px_0px_rgba(204,204,204,0.18)] pt-0 md:pt-[12px] lg:pt-[24px] px-0 md:px-[24px] p-[24px]">
|
||||
<Head />
|
||||
<List data={data} loading={loading} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default TurnsPage
|
||||
export default TurnsPage;
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import React from 'react'
|
||||
import React from "react";
|
||||
|
||||
function Cards() {
|
||||
return (
|
||||
<div className='flex hidden'>Cards</div>
|
||||
)
|
||||
return <div className="flex hidden">Cards</div>;
|
||||
}
|
||||
|
||||
export default Cards
|
||||
export default Cards;
|
||||
|
||||
@@ -8,69 +8,76 @@ import CustomLoading from "@/app/component/loading/Custom";
|
||||
import CircularLoading from "@/app/component/loading/Circular";
|
||||
|
||||
function Table({ data, loading }) {
|
||||
const tableHead = ["ردیف", "نام پزشک", "تخصص", "تاریخ", "ساعت", "تعدد نوبت"];
|
||||
const centerTable = [0, 4];
|
||||
|
||||
const tableHead = ['ردیف', 'نام پزشک', 'تخصص', 'تاریخ', 'ساعت', 'تعدد نوبت'];
|
||||
const centerTable = [0, 4];
|
||||
|
||||
return (
|
||||
<div className="hidden md:flex flex-col">
|
||||
<CustomTable
|
||||
tableHead={tableHead}
|
||||
centerTable={centerTable}
|
||||
return (
|
||||
<div className="hidden md:flex flex-col">
|
||||
<CustomTable tableHead={tableHead} centerTable={centerTable}>
|
||||
{data.list_of_doctors_appointments.map((row, idx) => (
|
||||
<TableRow key={idx} className="!border-0 !border-b !border-[#DBDBDB]">
|
||||
<TableCell
|
||||
className="!text-[#616161] !text-[16px] !font-medium !pr-[18px] !text-nowrap"
|
||||
align="center"
|
||||
>
|
||||
{data.list_of_doctors_appointments.map((row, idx) => (
|
||||
<TableRow
|
||||
key={idx}
|
||||
className='!border-0 !border-b !border-[#DBDBDB]'
|
||||
>
|
||||
<TableCell className='!text-[#616161] !text-[16px] !font-medium !pr-[18px] !text-nowrap' align="center">
|
||||
<TextLoading width={15} height={18} loading={loading}>
|
||||
{idx + 1}
|
||||
</TextLoading>
|
||||
</TableCell>
|
||||
<TableCell className='!text-[#616161] !text-[16px] !font-medium !pr-[18px] !text-nowrap' component="th" scope="row">
|
||||
<div className='flex items-center justify-start gap-[8px] !text-nowrap'>
|
||||
<CircularLoading width={32} height={32} loading={loading}>
|
||||
<Image
|
||||
src={row.image}
|
||||
alt='doctor'
|
||||
height={32}
|
||||
width={32}
|
||||
/>
|
||||
</CircularLoading>
|
||||
<TextLoading width={40} height={18} loading={loading}>
|
||||
{row.name}
|
||||
</TextLoading>
|
||||
</div>
|
||||
</TableCell>
|
||||
<TableCell className='!text-[#616161] !text-[16px] !font-medium !text-start !pr-[18px] !text-nowrap' align="right">
|
||||
<TextLoading width={50} height={18} loading={loading}>
|
||||
{row.expertise}
|
||||
</TextLoading>
|
||||
</TableCell>
|
||||
<TableCell className='!text-[#616161] !text-[16px] !font-medium !text-start !pr-[18px] !text-nowrap' align="left">
|
||||
<TextLoading width={50} height={18} loading={loading}>
|
||||
{row.date}
|
||||
</TextLoading>
|
||||
</TableCell>
|
||||
<TableCell className='!text-[#616161] !text-[16px] !font-medium !text-center !pr-[18px] !text-nowrap' align="right">
|
||||
<TextLoading width={50} height={18} loading={loading}>
|
||||
{row.hour}
|
||||
</TextLoading>
|
||||
</TableCell>
|
||||
<TableCell className='!text-[#616161] !text-[16px] !font-medium !pr-[18px] !text-nowrap' align="left">
|
||||
<CustomLoading width={80} height={22} loading={loading}>
|
||||
{row.number_of_turns}
|
||||
</CustomLoading>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
))}
|
||||
</CustomTable>
|
||||
<div className="w-full flex justify-center mt-[48px]">
|
||||
<Pagination />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
<TextLoading width={15} height={18} loading={loading}>
|
||||
{idx + 1}
|
||||
</TextLoading>
|
||||
</TableCell>
|
||||
<TableCell
|
||||
className="!text-[#616161] !text-[16px] !font-medium !pr-[18px] !text-nowrap"
|
||||
component="th"
|
||||
scope="row"
|
||||
>
|
||||
<div className="flex items-center justify-start gap-[8px] !text-nowrap">
|
||||
<CircularLoading width={32} height={32} loading={loading}>
|
||||
<Image src={row.image} alt="doctor" height={32} width={32} />
|
||||
</CircularLoading>
|
||||
<TextLoading width={40} height={18} loading={loading}>
|
||||
{row.name}
|
||||
</TextLoading>
|
||||
</div>
|
||||
</TableCell>
|
||||
<TableCell
|
||||
className="!text-[#616161] !text-[16px] !font-medium !text-start !pr-[18px] !text-nowrap"
|
||||
align="right"
|
||||
>
|
||||
<TextLoading width={50} height={18} loading={loading}>
|
||||
{row.expertise}
|
||||
</TextLoading>
|
||||
</TableCell>
|
||||
<TableCell
|
||||
className="!text-[#616161] !text-[16px] !font-medium !text-start !pr-[18px] !text-nowrap"
|
||||
align="left"
|
||||
>
|
||||
<TextLoading width={50} height={18} loading={loading}>
|
||||
{row.date}
|
||||
</TextLoading>
|
||||
</TableCell>
|
||||
<TableCell
|
||||
className="!text-[#616161] !text-[16px] !font-medium !text-center !pr-[18px] !text-nowrap"
|
||||
align="right"
|
||||
>
|
||||
<TextLoading width={50} height={18} loading={loading}>
|
||||
{row.hour}
|
||||
</TextLoading>
|
||||
</TableCell>
|
||||
<TableCell
|
||||
className="!text-[#616161] !text-[16px] !font-medium !pr-[18px] !text-nowrap"
|
||||
align="left"
|
||||
>
|
||||
<CustomLoading width={80} height={22} loading={loading}>
|
||||
{row.number_of_turns}
|
||||
</CustomLoading>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
))}
|
||||
</CustomTable>
|
||||
<div className="w-full flex justify-center mt-[48px]">
|
||||
<Pagination />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Table
|
||||
export default Table;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import ColTable from "../../ColTable"
|
||||
import Table from "./Table"
|
||||
import ColTable from "../../ColTable";
|
||||
import Table from "./Table";
|
||||
|
||||
function List({ data, loading }) {
|
||||
return (
|
||||
<div className="mt-[32px] pb-[20px] table-rounded-8">
|
||||
<Table data={data} loading={loading} />
|
||||
<ColTable data={data.list_of_doctors_appointments} loading={loading} />
|
||||
</div>
|
||||
)
|
||||
return (
|
||||
<div className="mt-[32px] pb-[20px] table-rounded-8">
|
||||
<Table data={data} loading={loading} />
|
||||
<ColTable data={data.list_of_doctors_appointments} loading={loading} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default List
|
||||
export default List;
|
||||
|
||||
Reference in New Issue
Block a user