Files
nobat724_front/components/dashboard/userAccount/tabs/surgeries/index.js
T

78 lines
2.8 KiB
JavaScript

import CustomTable from "@/app/component/CustomTable";
import TextLoading from "@/app/component/loading/Text";
import EditB from "@/components/icons/EditB";
import TrashB from "@/components/icons/TrashB";
import { Button, TableCell, TableRow } from "@mui/material";
import Head from "../../components/Head";
function Surgeries({ data }) {
const tableHead = [
"ردیف",
"نوع جراحی",
"نام بیمارستان",
"سال انجام جراحی",
"",
];
const centerTable = [0, 3];
return (
<div>
<Head text="لیست جراحی ها" />
<CustomTable
zeroRadius={true}
tableHead={tableHead}
centerTable={centerTable}
>
{data.surgeries.map((row, idx) => (
<TableRow
key={idx}
className="!border-0 !border-b !border-[#DBDBDB] dark:!border-transparent"
>
<TableCell
className="!pr-[18px] dark:!border-transparent !text-[#616161] dark:!text-[#A1A1A1] !text-[16px] !font-medium !text-nowrap"
align="center"
>
<TextLoading width={15} height={18} loading={false}>
{idx + 1}
</TextLoading>
</TableCell>
<TableCell className="!pr-[18px] dark:!border-transparent !text-[#616161] dark:!text-[#A1A1A1] !text-[16px] !font-medium !text-nowrap">
<TextLoading width={15} height={18} loading={false}>
{row.type}
</TextLoading>
</TableCell>
<TableCell className="!pr-[18px] dark:!border-transparent !text-[#616161] dark:!text-[#A1A1A1] !text-[16px] !font-medium !text-nowrap">
<TextLoading width={15} height={18} loading={false}>
{row.hospital}
</TextLoading>
</TableCell>
<TableCell
className="!pr-[18px] dark:!border-transparent !text-[#616161] dark:!text-[#A1A1A1] !text-[16px] !font-medium !text-nowrap"
align="center"
>
<TextLoading width={15} height={18} loading={false}>
{row.year}
</TextLoading>
</TableCell>
<TableCell
className="!pr-[18px] dark:!border-transparent !text-[#616161] dark:!text-[#A1A1A1] !text-[16px] !font-medium !text-nowrap"
align="right"
>
<div className="flex items-center justify-center gap-[4px]">
<Button className="!min-w-fit !p-1" variant="text">
<TrashB />
</Button>
<Button className="!min-w-fit !p-1" variant="text">
<EditB />
</Button>
</div>
</TableCell>
</TableRow>
))}
</CustomTable>
</div>
);
}
export default Surgeries;