remove date column add claims and complaint columns
This commit is contained in:
@@ -22,6 +22,8 @@ interface FileViolation {
|
|||||||
status: string;
|
status: string;
|
||||||
supportId: number;
|
supportId: number;
|
||||||
violationCount: number;
|
violationCount: number;
|
||||||
|
countComplaint: number;
|
||||||
|
countLawCase: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ViolationData {
|
interface ViolationData {
|
||||||
@@ -233,10 +235,10 @@ export default function ViolationsTable() {
|
|||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
accessorKey: 'latestViolationDate',
|
accessorKey: 'countComplaint',
|
||||||
header: ({ column }) => (
|
header: ({ column }) => (
|
||||||
<div className="column">
|
<div className="column">
|
||||||
<span>{t('date')}</span>
|
<span>{t('complaint')}</span>
|
||||||
<button
|
<button
|
||||||
onClick={() => column.toggleSorting(column.getIsSorted() === 'asc')}
|
onClick={() => column.toggleSorting(column.getIsSorted() === 'asc')}
|
||||||
className="sort-button"
|
className="sort-button"
|
||||||
@@ -253,9 +255,32 @@ export default function ViolationsTable() {
|
|||||||
),
|
),
|
||||||
cell: ({ row }) => (
|
cell: ({ row }) => (
|
||||||
<div className="text-center table-item">
|
<div className="text-center table-item">
|
||||||
{formatDate(row.original.latestViolationDate)}
|
{row.original.countComplaint}
|
||||||
<br />
|
</div>
|
||||||
{formatDateTime(row.original.latestViolationDate)}
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
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>
|
</div>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user