fix: simplify official source labels
GeoIntel CI / docs-smoke (push) Canceled after 0s
GeoIntel CI / contract-smoke (push) Canceled after 0s

This commit is contained in:
Codex
2026-07-15 15:59:14 +02:00
parent 312400759f
commit 6b996d42f5
4 changed files with 15 additions and 2 deletions
@@ -1,4 +1,5 @@
import type { DatasetCreateResponse } from '../../types'
import { getDatasetSourceDisplayName } from '../../lib/datasetDisplay'
interface SourceCatalogPanelProps {
datasets: DatasetCreateResponse[]
@@ -139,7 +140,7 @@ export function SourceCatalogPanel({ datasets }: SourceCatalogPanelProps): JSX.E
otherMethodCount: matches.length - comparableObservations.length,
firstYear: years.length ? Math.min(...years) : null,
lastYear: years.length ? Math.max(...years) : null,
source: latest?.source_name ?? latest?.source ?? null,
source: latest ? getDatasetSourceDisplayName(latest) : null,
}
})
@@ -159,7 +160,7 @@ export function SourceCatalogPanel({ datasets }: SourceCatalogPanelProps): JSX.E
<article className="source-catalog-card" key={theme.theme}>
<div>
<strong>{theme.label}</strong>
<span>{theme.source ? theme.source.replaceAll('_', ' ') : 'Nog niet ingeladen'}</span>
<span>{theme.source ?? 'Nog niet ingeladen'}</span>
</div>
<b>{theme.datasetCount > 0 ? 'Beschikbaar' : 'Ontbreekt'}</b>
<p>{timelineSummary(
+7
View File
@@ -7,15 +7,22 @@ const DATASET_LABEL_BY_LAYER: Record<string, string> = {
parcels: 'Percelen',
population: 'Bevolking',
forest: 'Bos en groen',
nature_value: 'Natuurwaarde',
agriculture: 'Landbouwgebruikspercelen',
regional_boundary: 'Grens vervoerregio Kempen',
municipality_boundaries: 'Gemeentegrenzen Kempen',
}
const DATASET_SOURCE_LABELS: Record<string, string> = {
department_omgeving_land_use: 'Departement Omgeving',
agentschap_landbouw_zeevisserij_agricultural_parcels: 'Agentschap Landbouw en Zeevisserij',
digitaal_vlaanderen_orthophoto: 'Digitaal Vlaanderen',
grb: 'GRB',
historical_landuse: 'Digitaal Vlaanderen',
inbo_bwk_natura2000: 'INBO',
statbel: 'Statbel',
vrbg: 'Digitaal Vlaanderen',
waterinfo: 'Waterinfo Vlaanderen',
}
export function getDatasetSourceDisplayName(dataset: DatasetCreateResponse): string {