Files copy and paste from store atoms and selector to redux slices folder

This commit is contained in:
ISA
2024-12-18 07:29:47 +01:00
parent 4d1a218b21
commit 19e0570310
32 changed files with 47 additions and 104 deletions

View File

@@ -0,0 +1,7 @@
// store/atoms/currentPoiState.js
import { atom } from 'recoil';
export const currentPoiState = atom({
key: 'currentPoiState', // Eindeutiger Key, der dieses Atom identifiziert
default: null, // Standardwert ist null oder ein leeres Objekt, je nach Bedarf
});

View File

@@ -0,0 +1,7 @@
// Pfad: store/atoms/gisStationState.js
import { atom } from "recoil";
export const gisStationsStaticDistrictState = atom({
key: "gisStationsStaticDistrict", // Eindeutiger Schlüssel (innerhalb des Projekts)
default: [], // Standardwert (Anfangszustand)
});

View File

@@ -0,0 +1,7 @@
// Pfad: store/atoms/gisSystemtate.js
import { atom } from "recoil";
export const gisSystemStaticState = atom({
key: "gisSystemStatic", // Eindeutiger Schlüssel (innerhalb des Projekts)
default: [], // Standardwert (Anfangszustand)
});

View File

@@ -0,0 +1,24 @@
// store/mapLayersState.js
import { atom } from "recoil";
export const mapLayersState = atom({
key: "mapLayersState", // Eindeutiger Schlüssel für das Atom
default: {
// Standardwerte für jeden Layer
TALAS: true,
ECI: true,
ULAF: true,
GSMModem: true,
CiscoRouter: true,
WAGO: true,
Siemens: true,
OTDR: true,
WDM: true,
GMA: true,
Messstellen: true,
TALASICL: true,
DAUZ: true,
SMSFunkmodem: true,
Sonstige: true,
},
});

View File

@@ -0,0 +1,9 @@
// /store/atoms/poiLayerVisible.js
// Recoil atom for the visibility of the POI layer
//
import { atom } from "recoil";
export const poiLayerVisibleState = atom({
key: "poiLayerVisibleState",
default: true,
});

View File

@@ -0,0 +1,8 @@
// /store/atoms/poiLayerVisibleState.js
// Recoil atom for the visibility of the POI layer
import { atom } from "recoil";
export const poiLayerVisibleState = atom({
key: "poiLayerVisibleState",
default: true,
});

View File

@@ -0,0 +1,7 @@
// store/atoms/poiReadFromDbTriggerAtom.js
import { atom } from 'recoil';
export const poiReadFromDbTriggerAtom = atom({
key: 'poiReadFromDbTriggerAtom',
default: 0, // Sie können auch einen booleschen Wert verwenden
});

View File

@@ -0,0 +1,7 @@
// /store/atoms/polylineEventsDisabledState.js
import { atom } from "recoil";
export const polylineEventsDisabledState = atom({
key: "polylineEventsDisabledState",
default: false,
});

View File

@@ -0,0 +1,7 @@
// /sttore/atoms/polylineLayerVisibleState.js
import { atom } from "recoil";
export const polylineLayerVisibleState = atom({
key: "polylineLayerVisibleState",
default: true, // Standardmäßig auf sichtbar setzen
});

View File

@@ -0,0 +1,7 @@
//store/selectors/readPoiMarkersStore.js
import { atom } from 'recoil';
export const readPoiMarkersStore = atom({
key: 'readPoiMarkersStore',
default: [],
});

View File

@@ -0,0 +1,7 @@
// In deinem Recoil store
import { atom } from "recoil";
export const selectedAreaState = atom({
key: "selectedAreaState", // unique ID (with respect to other atoms/selectors)
default: null, // default value (aka initial value)
});

View File

@@ -0,0 +1,8 @@
// store/atoms/poiState.js
//Ist gedacht um ausgewählte Poi Informationen zu speichern und zu PoiUpdateModal.js zu übergeben
import { atom } from "recoil";
export const selectedPoiState = atom({
key: "poiState", // Einzigartiger Key (mit der gesamten Anwendung)
default: null, // Standardwert
});

View File

@@ -0,0 +1,13 @@
import { atom } from "recoil";
// Atom für die Speicherung der mapId aus der URL
export const mapIdState = atom({
key: "mapIdState", // Eindeutiger Schlüssel (innerhalb des gesamten Projekts)
default: "10", // Standardwert
});
// Atom für die Speicherung der userId aus der URL
export const userIdState = atom({
key: "userIdState",
default: "484",
});

View File

@@ -0,0 +1,7 @@
// store/zoomTriggerState.js
import { atom } from "recoil";
export const zoomTriggerState = atom({
key: "zoomTriggerState",
default: 0, // Dies kann eine einfache Zählvariable sein, die inkrementiert wird.
});

View File

@@ -1,6 +1,6 @@
// /redux/store.js
import { configureStore } from "@reduxjs/toolkit";
import websocketMiddleware from "./websocketMiddleware";
import websocketMiddleware from "./middleware/websocketMiddleware";
import websocketReducer from "./reducer";
// Erstelle den Store mit configureStore