Commit Graph

9 Commits

Author SHA1 Message Date
ISA
5c06abc85e Systeme mit Map === 0 vollständig ausgeblenden 2025-08-11 10:17:09 +02:00
ISA
7c89d8dae5 In Redux Slice mapLayersSlice
state[key] = system.Allow === 1 && system.Map === 1;
2025-08-11 10:04:03 +02:00
ISA
d8567a9928 feat: implement map-specific localStorage and TALAS-Kabelstrecken dependency logic
- Add map-specific localStorage keys using URL parameters (m=mapId, u=userId)
- Implement kartenspezifische Sichtbarkeitseinstellungen per Map/User
- Fix localStorage priority over GisSystemStatic Allow values to preserve user settings
- Add bidirectional TALAS ↔ Kabelstrecken dependency logic:
  * Kabelstrecken aktiviert → TALAS automatisch aktiviert
  * TALAS deaktiviert → Kabelstrecken automatisch deaktiviert
- Update mapLayersSlice.js to respect existing localStorage values over system defaults
- Modify MapComponent.js to load map-specific visibility settings on mount
- Update MapLayersControlPanel.js with kartenspezifische localStorage handling
- Fix useDynamicDeviceLayers.js visibility logic (corrected boolean conditions)
- Update useAreaMarkersLayer.js for map-specific localStorage keys

BREAKING CHANGES:
- localStorage structure changed from "mapLayersVisibility" to "mapLayersVisibility_m{mapId}_u{userId}"
- User visibility preferences now have priority over GisSystemStatic Allow values
- TALAS and Kabelstrecken are now logically linked (dependency relationship)

This resolves issues with:
- Map switching losing visibility settings
- Browser reload overriding user preferences with system defaults
- Missing logical connection between TALAS stations and their cable routes
2025-07-29 10:12:56 +02:00
ISA
4755cefdd7 feat: implement device filtering based on GisSystemStatic Allow property
- 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.
2025-07-29 08:11:31 +02:00
ISA
be2da8414c 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."
2025-06-02 09:00:49 +02:00
Ismail Ali
e4851fa53e Checkboxen funktioniert in DataSheet 2025-03-11 21:51:29 +01:00
Ismail Ali
984ce72201 refactor: Recoil durch Redux ersetzt und Fehler behoben
- 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.
2025-03-11 21:17:12 +01:00
ISA
2934565501 Pfade in slices als Kommentare 2024-12-18 21:17:36 +01:00
ISA
c85b0ee0ba Postfix *Slice.js in slices folder
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.
2024-12-18 21:12:53 +01:00