Labelled an opportunity's ID as an OCID only when it is one

This commit is contained in:
bwilliams committed 2026-10-21 14:15:04 +01:00
1 parent 64886a2f1e
commit 43f9ef3223
3 files changed
+17 -2

No files matched your search

+9
View File
@@ -83,3 +83,12 @@ const NOTICE_SITES: Record<string, NoticeSite> = {
export function noticeSite(opportunity: Opportunity): NoticeSite | undefined {
return NOTICE_SITES[opportunity.source];
}
/**
* What the opportunity's UUID is called on screen: "OCID" for an OCDS
* contracting process's id, and "ID" for the other kinds, such as
* eusupply-uk-<tender id>, which the app makes up itself.
*/
export function uuidLabel(opportunity: Opportunity): string {
return opportunity.uuid_type === 'ocid' ? 'OCID' : 'ID';
}