Added a dialog with each opportunity's details and releases
Every row has a details icon under the Find a Tender link. It opens a dialog with the opportunity's details from the list, and fetches the opportunity with its releases, shown as tabs, newest first. Each tab summarises the release's tender, awards and contracts, links to its Find a Tender notice where it is one, and has the release's JSON, pretty-printed and highlighted, in a section laid out only when it's opened. The JSON is highlighted by splitting it into tokens shown as text, not HTML, as releases come from outside sources. The README's saved preferences now include the filters.
This commit is contained in:
1 parent
6fbf7e56b2
commit
f8648d765a
12 files changed
+847
-10
No files matched your search
+10
-3
@@ -91,21 +91,28 @@ token when it first needs it, and a new one if a request is refused for it.
|
||||
- `src/primitives/createToasts.ts` – the toasts errors are shown in, bottom
|
||||
right, for 15 seconds or until dismissed
|
||||
- `src/lib/filterOpportunities.ts` – search and filter logic
|
||||
- `src/lib/opportunities.ts` – merging changed opportunities into the list
|
||||
- `src/lib/opportunities.ts` – merging changed opportunities into the list,
|
||||
and Find a Tender notice links
|
||||
- `src/lib/ocdsRelease.ts` – what the details dialog reads from a release's
|
||||
OCDS JSON
|
||||
- `src/lib/jsonTokens.ts` – splits JSON into tokens for highlighting
|
||||
- `src/components/` – FilterPanel, ClassificationPicker, OpportunityTable,
|
||||
MarkMenu, ThemeToggle, ToastList; `styles.ts` holds shared Tailwind class
|
||||
MarkMenu, OpportunityDialog (an opportunity's details), ReleaseTabs,
|
||||
JsonView, ThemeToggle, ToastList; `styles.ts` holds shared Tailwind class
|
||||
strings
|
||||
|
||||
Theme colours and the font are set in the `@theme` block of `src/index.css`.
|
||||
|
||||
## Saved preferences
|
||||
|
||||
Two preferences are kept in the browser's localStorage (`src/lib/storage.ts`):
|
||||
Three preferences are kept in the browser's localStorage (`src/lib/storage.ts`):
|
||||
|
||||
- `job_search.theme`: `light` or `dark`. If nothing is saved, the app follows
|
||||
the OS setting. A small script in `index.html` applies the saved theme
|
||||
before the first paint, so there's no flash.
|
||||
- `job_search.filtersOpen`: whether the filter panel is expanded.
|
||||
- `job_search.filters`: the filters, as JSON. A field that isn't valid is
|
||||
read as its default.
|
||||
|
||||
Dark mode works by swapping the colour tokens under `.dark` in
|
||||
`src/index.css`, so components don't need `dark:` variants.
|
||||
Reference in new issue
Block a user