Skip to content

Commit

Permalink
feat(j-s): Allow defenders to filter cases by court date (#17232)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
unakb and kodiakhq[bot] authored Dec 19, 2024
1 parent 6167d4f commit 1712305
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ export const DefenderCasesTable: FC<Props> = ({
) {
return entry.defendants[0].name ?? ''
}
if (column === 'courtDate') {
return entry.courtDate
}
return entry.created
}
const { sortedData, requestSort, getClassNamesFor, isActiveColumn } = useSort(
Expand Down Expand Up @@ -129,9 +132,13 @@ export const DefenderCasesTable: FC<Props> = ({
</th>
) : (
<th>
<Text fontWeight="regular">
{formatMessage(tables.hearingArrangementDate)}
</Text>
<SortButton
title={formatMessage(tables.hearingArrangementDate)}
onClick={() => requestSort('courtDate')}
sortAsc={getClassNamesFor('courtDate') === 'ascending'}
sortDes={getClassNamesFor('courtDate') === 'descending'}
isActive={isActiveColumn('courtDate')}
/>
</th>
)}
<th></th>
Expand Down

0 comments on commit 1712305

Please sign in to comment.