responsive page user-account & add-doctor & turns & add loading to all page panel & change design page dashboard
This commit is contained in:
@@ -2,21 +2,24 @@ import { Button, ButtonGroup } from "@mui/material"
|
||||
|
||||
function Date() {
|
||||
return (
|
||||
<ButtonGroup
|
||||
variant="outlined"
|
||||
className=""
|
||||
>
|
||||
<Button
|
||||
className="!border-[#EFEFEF] !bg-[#FFF] !py-[4.5px] !px-[33px] !text-[#7E7E7E] !text-[16px] !font-normal"
|
||||
<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>
|
||||
<Button
|
||||
className="!border-[#EFEFEF] !bg-[#FFF] !py-[4.5px] !px-[33px] !text-[#7E7E7E] !text-[16px] !font-normal"
|
||||
>
|
||||
تا تاریخ
|
||||
</Button>
|
||||
</ButtonGroup>
|
||||
<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>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@ import { Button, ButtonGroup, TextField } from '@mui/material'
|
||||
|
||||
function SearchDoctor() {
|
||||
return (
|
||||
<div className="flex items-center justify-between">
|
||||
<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%] !mt-[24px] !rounded-[4px] !overflow-hidden
|
||||
flex items-center !shadow-none !h-fit !p-1 !border !border-[#EFEFEF]"
|
||||
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"
|
||||
@@ -40,7 +40,7 @@ function SearchDoctor() {
|
||||
</ButtonGroup>
|
||||
<Button
|
||||
variant='outlined'
|
||||
className='!border-[#5559CE] !flex !items-center !gap-[6px] !rounded-[4px]'
|
||||
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 />
|
||||
خروجی گرفتن
|
||||
|
||||
@@ -4,8 +4,8 @@ import SearchDoctor from "./SearchDoctor"
|
||||
function Head() {
|
||||
return (
|
||||
<div className="w-full">
|
||||
<div className="flex items-center justify-start gap-[10px]">
|
||||
<p className="text-[#525252] text-[20px] font-bold">لیست نوبت های پزشکان</p>
|
||||
<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 />
|
||||
|
||||
@@ -1,12 +1,25 @@
|
||||
'use client';
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
import Head from "./head";
|
||||
import List from "./List";
|
||||
import List from "./list";
|
||||
|
||||
|
||||
function TurnsPage({ data }) {
|
||||
|
||||
const [loading, setLoading] = useState(true);
|
||||
|
||||
useEffect(() => {
|
||||
setTimeout(() => {
|
||||
setLoading(false);
|
||||
}, 2000);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="bg-[#FFF] opacity-page rounded-[8px] shadow-[0px_1px_24.8px_0px_rgba(204,204,204,0.18)] p-[24px]">
|
||||
<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} />
|
||||
<List data={data} loading={loading} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import React from 'react'
|
||||
|
||||
function Cards() {
|
||||
return (
|
||||
<div className='flex hidden'>Cards</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Cards
|
||||
@@ -1,18 +1,19 @@
|
||||
import CustomTable from "@/app/component/CustomTable"
|
||||
import CircularLoading from "@/app/component/loading/Circular"
|
||||
import CustomLoading from "@/app/component/loading/Custom"
|
||||
import TextLoading from "@/app/component/loading/Text"
|
||||
import Pagination from "@/app/component/Pagination"
|
||||
import { TableCell, TableRow } from "@mui/material"
|
||||
import Image from "next/image"
|
||||
import Image from "next/image";
|
||||
|
||||
function List({ data }) {
|
||||
import { TableCell, TableRow } from "@mui/material";
|
||||
import Pagination from "@/app/component/Pagination";
|
||||
import CustomTable from "@/app/component/CustomTable";
|
||||
import TextLoading from "@/app/component/loading/Text";
|
||||
import CustomLoading from "@/app/component/loading/Custom";
|
||||
import CircularLoading from "@/app/component/loading/Circular";
|
||||
|
||||
function Table({ data, loading }) {
|
||||
|
||||
const tableHead = ['ردیف', 'نام پزشک', 'تخصص', 'تاریخ', 'ساعت', 'تعدد نوبت'];
|
||||
const centerTable = [0, 4];
|
||||
|
||||
return (
|
||||
<div className="mt-[32px] pb-[20px] table-rounded-8">
|
||||
<div className="hidden md:flex flex-col">
|
||||
<CustomTable
|
||||
tableHead={tableHead}
|
||||
centerTable={centerTable}
|
||||
@@ -23,13 +24,13 @@ function List({ data }) {
|
||||
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={false}>
|
||||
<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={false}>
|
||||
<CircularLoading width={32} height={32} loading={loading}>
|
||||
<Image
|
||||
src={row.image}
|
||||
alt='doctor'
|
||||
@@ -37,28 +38,28 @@ function List({ data }) {
|
||||
width={32}
|
||||
/>
|
||||
</CircularLoading>
|
||||
<TextLoading width={40} height={18} loading={false}>
|
||||
<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={false}>
|
||||
<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={false}>
|
||||
<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={false}>
|
||||
<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={false}>
|
||||
<CustomLoading width={80} height={22} loading={loading}>
|
||||
{row.number_of_turns}
|
||||
</CustomLoading>
|
||||
</TableCell>
|
||||
@@ -72,4 +73,4 @@ function List({ data }) {
|
||||
)
|
||||
}
|
||||
|
||||
export default List
|
||||
export default Table
|
||||
@@ -0,0 +1,13 @@
|
||||
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>
|
||||
)
|
||||
}
|
||||
|
||||
export default List
|
||||
Reference in New Issue
Block a user