remove date column add claims and complaint columns

This commit is contained in:
smanylov
2026-04-29 15:20:57 +07:00
parent e4eedf464b
commit 1e8bf782ca
+30 -5
View File
@@ -22,6 +22,8 @@ interface FileViolation {
status: string;
supportId: number;
violationCount: number;
countComplaint: number;
countLawCase: number;
}
interface ViolationData {
@@ -233,10 +235,10 @@ export default function ViolationsTable() {
),
},
{
accessorKey: 'latestViolationDate',
accessorKey: 'countComplaint',
header: ({ column }) => (
<div className="column">
<span>{t('date')}</span>
<span>{t('complaint')}</span>
<button
onClick={() => column.toggleSorting(column.getIsSorted() === 'asc')}
className="sort-button"
@@ -253,9 +255,32 @@ export default function ViolationsTable() {
),
cell: ({ row }) => (
<div className="text-center table-item">
{formatDate(row.original.latestViolationDate)}
<br />
{formatDateTime(row.original.latestViolationDate)}
{row.original.countComplaint}
</div>
),
},
{
accessorKey: 'countLawCase',
header: ({ column }) => (
<div className="column">
<span>{t('claims')}</span>
<button
onClick={() => column.toggleSorting(column.getIsSorted() === 'asc')}
className="sort-button"
>
{column.getIsSorted() === 'asc' ? (
<IconArrowUp />
) : column.getIsSorted() === 'desc' ? (
<IconArrowDown />
) : (
<IconFilter />
)}
</button>
</div>
),
cell: ({ row }) => (
<div className="text-center table-item">
{row.original.countLawCase}
</div>
),
},