From 3bb2711276d37b24edfe7f460196480acb4b21af Mon Sep 17 00:00:00 2001 From: Craig Williams Date: Wed, 21 Oct 2026 14:47:56 +0100 Subject: [PATCH] Added the closing date to the table, and narrowed its columns to fit The backend's new closing_date, the bid deadline, is a Closing column before the start and end dates, which are now the contract's: the details dialog calls them Contract start and Contract end. Closing sorts soonest first, with no date last, and shows the time it closes in the cell's tooltip and in the dialog. The API types are regenerated for it. To make room, the SME suitable column is now an SME badge beside the status, shown only when it's suitable, so the Status column sorts by status alone and a stored SME sort goes back to the default. The Mark column is narrower. An opportunity without a status is shown as Unknown, in the colours of the statuses without their own, such as Cancelled and Withdrawn, rather than as a blank badge or a dash. --- web/src/components/MarkMenu.tsx | 2 +- web/src/components/OpportunityDialog.tsx | 20 ++++----- web/src/components/OpportunityTable.tsx | 52 ++++++++++++++---------- web/src/components/styles.ts | 5 ++- web/src/lib/filterOpportunities.test.ts | 1 + web/src/lib/filterOpportunities.ts | 4 +- web/src/lib/sortOpportunities.test.ts | 10 ++++- web/src/lib/sortOpportunities.ts | 11 ++--- web/src/lib/testOpportunity.ts | 1 + web/src/types/api.ts | 1 + 10 files changed, 65 insertions(+), 42 deletions(-) diff --git a/web/src/components/MarkMenu.tsx b/web/src/components/MarkMenu.tsx index c5bf44b..af240a5 100644 --- a/web/src/components/MarkMenu.tsx +++ b/web/src/components/MarkMenu.tsx @@ -81,7 +81,7 @@ export function MarkMenu(props: Props): JSX.Element {