git commit -m "refactor: Gerätelayer dynamisch über IdSystem initialisiert

BREAKING CHANGE: Sichtbarkeit der Gerätegruppen basiert nun auf 'system-<IdSystem>' statt auf Namen wie 'SMSFunkmodem'. Statische Layer-Konfiguration im Redux-Slice entfernt."
This commit is contained in:
ISA
2025-06-02 09:00:49 +02:00
parent fda7476872
commit be2da8414c
12 changed files with 76 additions and 33 deletions

View File

@@ -555,6 +555,9 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
dispatch(fetchGisSystemStaticThunk());
}
}, [statusSystem, dispatch]);
useEffect(() => {
dispatch(fetchGisSystemStaticThunk());
}, [dispatch]);
useEffect(() => {
dispatch(fetchLocationDevicesThunk());

View File

@@ -101,7 +101,7 @@ function MapLayersControlPanel() {
filteredSystems.map((system, index) => ({
id: index + 1,
name: system.Name, // Verwende den Originalnamen für die Anzeige
key: system.Name.replace(/[\s\-]+/g, ""), // Internen Schlüssel für die MapLayersVisibility-Logik
key: `system-${system.IdSystem}`, // Internen Schlüssel für die MapLayersVisibility-Logik
}))
);
}, [GisStationsStaticDistrict, GisSystemStatic]);