feat(260723-lvg): add "Jetzt abrufen" manual poll button to tender radar

PollNowButton sits next to the settings gear in the tender-radar header,
mirrors the DKV spinner/disabled UX, and bumps a refreshKey on success to
refetch ResultsList without touching any filter. Failure surfaces an
i18n error (de/en parity). pollNow() client hits POST
/modules/tender-radar/poll-now.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-23 15:54:43 +02:00
parent 7502f97e85
commit bdaf154f66
7 changed files with 268 additions and 24 deletions
+17
View File
@@ -150,6 +150,23 @@ export async function listTenders(
return res.json();
}
/**
* Trigger an immediate manual poll of all DUE tender sources (Quick
* 260723-lvg — "Jetzt abrufen"). Mirrors the DKV `checkNow` client shape.
* This is honest "fällige Quellen jetzt abrufen": 'day'-granularity
* sources still honor their nextDayToFetch cursor server-side — this is
* NOT a forced re-download.
* POST /modules/tender-radar/poll-now
*/
export async function pollNow(): Promise<{ ok: boolean }> {
const res = await fetch(`${API_URL}/modules/tender-radar/poll-now`, {
method: 'POST',
credentials: 'include',
});
if (!res.ok) throw new Error('Failed to trigger tender poll');
return res.json();
}
/**
* Fetch the active-tender distribution by sourcePortal (D-12, UI-05) —
* feeds CoverageBanner so a thin/single-source result list is not