import CustomTable from "@/app/component/CustomTable"; import ArrowLeftBlueD from "@/components/icons/ArrowLeftBlueD"; import { Button, TableCell, TableRow } from "@mui/material"; import Image from "next/image"; import Card from "./Card"; import CircularLoading from "@/app/component/loading/Circular"; import TextLoading from "@/app/component/loading/Text"; import CustomLoading from "@/app/component/loading/Custom"; import Pagination from "@/app/component/Pagination"; import { convertTimestampToJalali, convertTimestampToTime } from "@/helper"; function List({ user, loading, setIsTurnsDetails, page, totalPages, onPageChange }) { const tableHead = [ "ردیف", "نام پزشک", "تخصص", "تاریخ", "ساعت", "عملیات", ]; const centerTable = [0, 4]; return (
{user.map((row, idx) => ( {(page - 1) * 10 + idx + 1} {row.doctor?.name || "--"} {row.doctor?.specialty?.name || "--"} {convertTimestampToJalali(row.start_time)} {row.slot?.time || convertTimestampToTime(row.start_time)} ))}
{totalPages > 1 && (
)}
); } export default List;