diff --git a/backend/tests/test_sprint237_flanders_thematic_on_demand.py b/backend/tests/test_sprint237_flanders_thematic_on_demand.py index d2c1766b..3727afd7 100644 --- a/backend/tests/test_sprint237_flanders_thematic_on_demand.py +++ b/backend/tests/test_sprint237_flanders_thematic_on_demand.py @@ -34,7 +34,8 @@ def test_selection_reads_and_bounded_acquires_all_relevant_themes() -> None: app = read("frontend/src/App.tsx") selection_hook = read("frontend/src/hooks/useMapThemeSelectionInsights.ts") - assert "for (const theme of DATA_THEMES)" in workspace + assert "for (const theme of [activeTheme])" in workspace + assert "loadSelectedThemeResult" in workspace assert "? onDemandProductsForZones(resolvedZones)" in workspace assert ".filter((product) => product.theme === activeThemeId)" not in workspace assert "await loadThemeInsights(bbox, availableThemes, areaId)" in workspace diff --git a/frontend/src/components/map/MapWorkspace.tsx b/frontend/src/components/map/MapWorkspace.tsx index b9efd2d8..8ae8bf4e 100644 --- a/frontend/src/components/map/MapWorkspace.tsx +++ b/frontend/src/components/map/MapWorkspace.tsx @@ -1791,7 +1791,7 @@ export function MapWorkspace({ }) } - const loadAllThemeResults = async (bbox: VectorSelectionBBox, areaId?: string) => { + const loadSelectedThemeResult = async (bbox: VectorSelectionBBox, areaId?: string) => { let resolvedZones = selectedCoverageZones const scale = selectionAnalysisScale(bbox) if (analysisMode === 'current' && selectedProjectId) { @@ -1852,7 +1852,7 @@ export function MapWorkspace({ } const availableThemes: Array> = [] const resultFeatureLimit = selectionFeatureLimit(bbox) - for (const theme of DATA_THEMES) { + for (const theme of [activeTheme]) { const dataset = themeDatasetMap[theme.id] const partitioned = Boolean( dataset @@ -1904,7 +1904,7 @@ export function MapWorkspace({ setMapAnalysisDurationMs(null) setSelectionBbox(bbox) const tasks: Array> = analysisMode === 'current' - ? [loadAllThemeResults(bbox, areaId)] + ? [loadSelectedThemeResult(bbox, areaId)] : [] const activeDatasetSupportsSelection = !activeThemeDataset || persistedDatasetSupportsSelection(activeThemeDataset, bbox) @@ -2576,7 +2576,7 @@ export function MapWorkspace({ ) : mapSelectionLoading || themeResultsLoading || temporalComparisonLoading ? (
- Officiële bronnen worden begrensd geladen en geanalyseerd… + De gekozen officiële bron wordt begrensd geladen en geanalyseerd…
) : ( <>