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

@@ -2,10 +2,13 @@
import { createAsyncThunk } from "@reduxjs/toolkit";
import { fetchGisSystemStaticService } from "../../../services/webservice/fetchGisSystemStaticService";
import { setInitialLayers } from "../../slices/mapLayersSlice"; // Importiere die Action Creator
/**
* Redux-Thunk für fetchGisSystemStatic
*/
export const fetchGisSystemStaticThunk = createAsyncThunk("gisSystemStatic/fetch", async () => {
return await fetchGisSystemStaticService();
export const fetchGisSystemStaticThunk = createAsyncThunk("gisSystemStatic/fetch", async (_, { dispatch }) => {
const systems = await fetchGisSystemStaticService();
dispatch(setInitialLayers(systems)); // ✅ jetzt funktioniert!
return systems;
});