Fix: link Apply button to Contracts Finder search with tender title for better UX

This commit is contained in:
Peter Foster
2026-02-14 18:17:41 +00:00
parent ec56ef8cb8
commit d23a529514

View File

@@ -59,7 +59,7 @@ async function scrapeTenders() {
if (deadline && new Date(deadline) < new Date()) continue;
const authority = procurer?.name || 'Unknown';
const location = planning?.budget?.description || tender.procurementMethod || '';
const noticeUrl = release.url || (sourceId ? 'https://www.contractsfinder.service.gov.uk/Published/Notices/OCDS/Search?query=' + encodeURIComponent(sourceId) : '');
const noticeUrl = release.url || ('https://www.contractsfinder.service.gov.uk/Search?q=' + encodeURIComponent(title.substring(0, 100)));
const documentsUrl = tender.documents?.length > 0 ? tender.documents[0].url : '';
// Extract value