- Add Allow=1 filter in createAndSetDevices.js to hide devices with Allow=0
- Update mapLayersSlice.js setInitialLayers to respect Allow values for visibility
- Modify MapLayersControlPanel.js localStorage initialization to set visibility based on Allow property
- Only systems with Allow=1 are now visible by default, Allow=0 systems are hidden
- Ensures consistent filtering across device markers and layer visibility controls
This change addresses the requirement to hide stations/devices when their corresponding
IdSystem in GisSystemStatic.json has Allow=0, improving the map display by showing
only authorized/allowed systems to users.
BREAKING CHANGE: Sichtbarkeit der Gerätegruppen basiert nun auf 'system-<IdSystem>' statt auf Namen wie 'SMSFunkmodem'. Statische Layer-Konfiguration im Redux-Slice entfernt."
- Entfernt `useRecoilState(mapLayersState)` und durch `useSelector(selectMapLayersState)` ersetzt.
- Alle `setMapLayersVisibility` durch `dispatch(setLayerVisibility(...))` ersetzt.
- LocalStorage-Handling für `mapLayersVisibility` mit Redux umgesetzt.
- Fehler "setMapLayersVisibility is not defined" behoben, indem `dispatch` verwendet wurde.
- Sicherstellung, dass `mapLayersSlice` im Redux-Store registriert ist.
Gängige Praxis: *Slice.js
Verwendung: Wenn du Redux Toolkit und createSlice nutzt, ist der Postfix Slice gängiger.
Begründung:
createSlice ist ein Begriff aus Redux Toolkit.
Der Name vermittelt, dass die Datei nicht nur den Reducer enthält, sondern auch Aktionen und den initialen Zustand.
Häufig in modernen Projekten verwendet.