Complete regional history live validation
This commit is contained in:
@@ -65,6 +65,7 @@ function App(): JSX.Element {
|
||||
const [activeWorkspace, setActiveWorkspace] = useState<WorkspaceKey>('map')
|
||||
const [inspectorOpen, setInspectorOpen] = useState(false)
|
||||
const [mapContentMode, setMapContentMode] = useState<'dataset' | 'analysis'>('dataset')
|
||||
const [mapContextSourceLabel, setMapContextSourceLabel] = useState<string | null>(null)
|
||||
useEffect(() => {
|
||||
window.scrollTo({ top: 0, left: 0 })
|
||||
setInspectorOpen(false)
|
||||
@@ -715,7 +716,9 @@ function App(): JSX.Element {
|
||||
? REGIONAL_WORKSPACE_LABEL
|
||||
: selectedProject?.name ?? 'Geen werkruimte'
|
||||
const areaContextLabel = selectedArea?.name ?? (areas.length > 0 ? 'Kies een gebied' : 'Geen gebied')
|
||||
const datasetContextLabel = analysisMapLayerActive && mapFeatureCollection
|
||||
const datasetContextLabel = activeWorkspace === 'map' && mapContextSourceLabel
|
||||
? mapContextSourceLabel
|
||||
: analysisMapLayerActive && mapFeatureCollection
|
||||
? `${mapLayerLabel} · controle vereist`
|
||||
: selectedDataset
|
||||
? getDatasetDisplayName(selectedDataset)
|
||||
@@ -1035,6 +1038,7 @@ function App(): JSX.Element {
|
||||
selectedMapDatasetId={selectedDataset && availableMapDatasets.some((dataset) => dataset.id === selectedDataset.id) ? selectedDataset.id : ''}
|
||||
selectedFeature={selectedMapFeature}
|
||||
onSelectMapArea={setSelectedMapAreaId}
|
||||
onSetContextSourceLabel={setMapContextSourceLabel}
|
||||
onOpenDatasetInMap={openDatasetInMap}
|
||||
onSetAreaLayerVisible={setAreaLayerVisible}
|
||||
onSetAreaLayerOpacity={setAreaLayerOpacity}
|
||||
|
||||
@@ -559,6 +559,7 @@ interface MapWorkspaceProps {
|
||||
availableMapDatasets: DatasetCreateResponse[]
|
||||
selectedMapDatasetId: string
|
||||
onSelectMapArea: (areaId: string) => void
|
||||
onSetContextSourceLabel: (label: string | null) => void
|
||||
onOpenDatasetInMap: (dataset: DatasetCreateResponse) => void
|
||||
onSetAreaLayerVisible: (visible: boolean) => void
|
||||
onSetAreaLayerOpacity: (opacity: number) => void
|
||||
@@ -639,6 +640,7 @@ export function MapWorkspace({
|
||||
availableMapDatasets,
|
||||
selectedMapDatasetId,
|
||||
onSelectMapArea,
|
||||
onSetContextSourceLabel,
|
||||
onOpenDatasetInMap,
|
||||
onSetAreaLayerVisible,
|
||||
onSetAreaLayerOpacity,
|
||||
@@ -776,6 +778,14 @@ export function MapWorkspace({
|
||||
const activeTemporalSeriesGroup = activeTemporalSeriesGroups.find((group) => group.key === selectedTemporalSeriesKey)
|
||||
?? activeTemporalSeriesGroups[0]
|
||||
const activeTemporalSeries = activeTemporalSeriesGroup?.items ?? EMPTY_TEMPORAL_SERIES
|
||||
|
||||
useEffect(() => {
|
||||
onSetContextSourceLabel(
|
||||
analysisMode === 'evolution' ? activeTemporalSeriesGroup?.label ?? null : null,
|
||||
)
|
||||
return () => onSetContextSourceLabel(null)
|
||||
}, [activeTemporalSeriesGroup?.label, analysisMode, onSetContextSourceLabel])
|
||||
|
||||
const themeResults = useMemo(
|
||||
() =>
|
||||
themeInsights.flatMap((insight) => {
|
||||
|
||||
Reference in New Issue
Block a user