POI hinzufügen auf die Kabelstrecken/Polylines ausgeblendert
This commit is contained in:
24
redux/slices/addPoiOnPolylineSlice.js
Normal file
24
redux/slices/addPoiOnPolylineSlice.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import { createSlice } from "@reduxjs/toolkit";
|
||||
|
||||
const initialState = {
|
||||
isOpen: false,
|
||||
latlng: null,
|
||||
};
|
||||
|
||||
const addPoiOnPolylineSlice = createSlice({
|
||||
name: "addPoiOnPolyline",
|
||||
initialState,
|
||||
reducers: {
|
||||
openAddPoiOnPolylineModal: (state, action) => {
|
||||
state.isOpen = true;
|
||||
state.latlng = action.payload;
|
||||
},
|
||||
closeAddPoiOnPolylineModal: (state) => {
|
||||
state.isOpen = false;
|
||||
state.latlng = null;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const { openAddPoiOnPolylineModal, closeAddPoiOnPolylineModal } = addPoiOnPolylineSlice.actions;
|
||||
export default addPoiOnPolylineSlice.reducer;
|
||||
@@ -10,6 +10,7 @@ import gisStationsMeasurementsReducer from "./slices/webService/gisStationsMeasu
|
||||
import gisSystemStaticReducer from "./slices/webService/gisSystemStaticSlice";
|
||||
import gisStationsStaticReducer from "./slices/webService/gisStationsStaticSlice";
|
||||
import poiTypesReducer from "./slices/db/poiTypesSlice";
|
||||
import addPoiOnPolylineReducer from "./slices/addPoiOnPolylineSlice";
|
||||
|
||||
export const store = configureStore({
|
||||
reducer: {
|
||||
@@ -23,5 +24,6 @@ export const store = configureStore({
|
||||
gisSystemStatic: gisSystemStaticReducer,
|
||||
gisStationsStatic: gisStationsStaticReducer,
|
||||
poiTypes: poiTypesReducer,
|
||||
addPoiOnPolyline: addPoiOnPolylineReducer,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user