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:
@@ -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;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user