Added a link from each opportunity to its latest Find a Tender notice
Opportunities from Find a Tender have a link icon before their title. Clicking it fetches the opportunity with its releases (the list leaves them out) and opens its newest release's notice, www.find-tender.service.gov.uk/notice/<release_id>, in a new tab. The tab is opened on the click and pointed at the notice when the request returns, so it isn't blocked as a popup; if the request fails, or there are no releases, it's closed and a toast says why. Opportunities from other sources have no link for now, but keep its space so the titles line up. The icon is lucide-solid's, added for it at 1.52.0.
This commit is contained in:
1 parent
a6630f112f
commit
e98f18b790
8 files changed
+186
-10
No files matched your search
+9
-1
@@ -67,7 +67,15 @@ export function App(): JSX.Element {
|
||||
/>
|
||||
|
||||
<main>
|
||||
<Switch fallback={<OpportunityTable opportunities={rows()} annotations={annotations} />}>
|
||||
<Switch
|
||||
fallback={
|
||||
<OpportunityTable
|
||||
opportunities={rows()}
|
||||
annotations={annotations}
|
||||
onError={toasts.show}
|
||||
/>
|
||||
}
|
||||
>
|
||||
<Match when={opportunities.isLoading() && opportunities.items().length === 0}>
|
||||
<p class={`${statePanel} text-muted`}>Loading opportunities…</p>
|
||||
</Match>
|
||||
|
||||
Reference in new issue
Block a user