import { Table, Typography } from "antd"; import { SalaryHistory } from "../../../types/Profile/TProfile"; const { Title } = Typography; type Props = { year: number; salaries: SalaryHistory[]; }; const SalaryHistoryTable: React.FC = ({ year, salaries }) => { return (
{year} dataSource={salaries} rowKey="id" scroll={{ x: 800 }} locale={{ emptyText: "No data" }} pagination={false} size="large" columns={[ { title: "#", dataIndex: "no", width: "5%", align: "center", render: (_, __, index) => index + 1, }, { title: "Month", dataIndex: "month", }, { title: "Total Salary", dataIndex: "total_salary", render: (_, record) => ${record.total_salary}, }, { title: "Total Bonuses", dataIndex: "total_bonuses", render: (_, record) => ${record.total_bonuses}, }, { title: "Total Charges", dataIndex: "total_charges", render: (_, record) => ${record.total_charges}, }, { title: "Total Tasks", dataIndex: "number_of_tasks", }, { title: "Total Points", dataIndex: "total_points", }, ]} />
); }; export default SalaryHistoryTable;