docs
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
# ➕ addPoiOnPolylineSlice
|
||||
|
||||
Verwaltet den Status für das Hinzufügen eines POIs auf einer bestehenden Polyline.
|
||||
|
||||
## 🔧 Zustand
|
||||
|
||||
```ts
|
||||
{
|
||||
isOpen: false,
|
||||
latlng: null
|
||||
}
|
||||
```
|
||||
|
||||
## 🎯 Aktionen
|
||||
|
||||
- `openAddPoiOnPolylineModal(latlng)` – öffnet das Modal mit Koordinaten
|
||||
- `closeAddPoiOnPolylineModal()` – schließt das Modal
|
||||
@@ -1,22 +0,0 @@
|
||||
# 📍 currentPoiSlice
|
||||
|
||||
Verwaltet den aktuell ausgewählten POI (z. B. für Bearbeitung oder Anzeige im Modal).
|
||||
|
||||
## 🔧 Zustand
|
||||
|
||||
```ts
|
||||
{
|
||||
currentPoi: null
|
||||
}
|
||||
```
|
||||
|
||||
## 🎯 Aktionen
|
||||
|
||||
- `setCurrentPoi(poi)` – setzt den aktiven POI
|
||||
- `clearCurrentPoi()` – löscht aktuellen POI
|
||||
|
||||
## 🔎 Selector
|
||||
|
||||
```ts
|
||||
selectCurrentPoi = (state) => state.currentPoi.currentPoi;
|
||||
```
|
||||
40
docs/redux/slices/database/area/updateAreaSlice.md
Normal file
40
docs/redux/slices/database/area/updateAreaSlice.md
Normal file
@@ -0,0 +1,40 @@
|
||||
<!-- /docs/redux/slices/database/area/updateAreaSlice.md -->
|
||||
|
||||
# 🧩 updateAreaSlice.js
|
||||
|
||||
Redux-Slice zur Verwaltung des Update-Zustands beim Aktualisieren eines Bereichs (Area).
|
||||
|
||||
---
|
||||
|
||||
## Zustand
|
||||
|
||||
```js
|
||||
{
|
||||
status: "idle" | "loading" | "succeeded" | "failed",
|
||||
error: string | null
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Thunk
|
||||
|
||||
- `updateAreaThunk`: Führt den API-Call zum Speichern von `x`, `y` für `idLocation` & `idMaps` durch.
|
||||
|
||||
---
|
||||
|
||||
## Aktionen
|
||||
|
||||
- `resetUpdateAreaStatus()`: Setzt Status auf `"idle"` und entfernt Fehler
|
||||
|
||||
---
|
||||
|
||||
## Verwendung
|
||||
|
||||
In der Komponente `useAreaMarkersLayer.js` beim Ziehen und Speichern von Stationsmarkern.
|
||||
|
||||
---
|
||||
|
||||
## Fehlerbehandlung
|
||||
|
||||
- Fehlernachricht wird in `error` gespeichert, falls `updateAreaThunk` fehlschlägt.
|
||||
@@ -0,0 +1,45 @@
|
||||
<!-- /docs/redux/slices/database/locationDevicesSlice.md -->
|
||||
|
||||
# 🧩 locationDevicesSlice.js
|
||||
|
||||
Redux-Slice zur Verwaltung von Standortgeräten (Devices) aus der Tabelle `location_device`.
|
||||
|
||||
---
|
||||
|
||||
## Zustand
|
||||
|
||||
```js
|
||||
{
|
||||
data: [],
|
||||
status: "idle" | "loading" | "succeeded" | "failed",
|
||||
error: string | null
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Thunks
|
||||
|
||||
- `fetchLocationDevicesThunk`: Lädt Geräte aus der API
|
||||
|
||||
---
|
||||
|
||||
## Aktionen
|
||||
|
||||
- `clearLocationDevices()`: Löscht Geräte-Array und setzt Status zurück
|
||||
|
||||
---
|
||||
|
||||
## Selektoren
|
||||
|
||||
```js
|
||||
selectLocationDevices = (state) => state.locationDevices.data;
|
||||
selectLocationDeviceStatus = (state) => state.locationDevices.status;
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Besonderheiten
|
||||
|
||||
- Zustand wird bei `pending`, `fulfilled` und `rejected` aktualisiert
|
||||
- Fehlernachricht wird in `error` gespeichert
|
||||
3
docs/redux/slices/database/pois/addPoiOnPolylineSlice.md
Normal file
3
docs/redux/slices/database/pois/addPoiOnPolylineSlice.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# 🧩 addPoiOnPolylineSlice.js
|
||||
|
||||
Redux-Slice zur Verwaltung von addPoiOnPolyline.
|
||||
3
docs/redux/slices/database/pois/addPoiSlice.md
Normal file
3
docs/redux/slices/database/pois/addPoiSlice.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# 🧩 addPoiSlice.js
|
||||
|
||||
Redux-Slice zur Verwaltung von addPoi.
|
||||
3
docs/redux/slices/database/pois/currentPoiSlice.md
Normal file
3
docs/redux/slices/database/pois/currentPoiSlice.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# 🧩 currentPoiSlice.js
|
||||
|
||||
Redux-Slice zur Verwaltung von currentPoi.
|
||||
3
docs/redux/slices/database/pois/poiIconsDataSlice.md
Normal file
3
docs/redux/slices/database/pois/poiIconsDataSlice.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# 🧩 poiIconsDataSlice.js
|
||||
|
||||
Redux-Slice zur Verwaltung von POIIconsData.
|
||||
3
docs/redux/slices/database/pois/poiLayerVisibleSlice.md
Normal file
3
docs/redux/slices/database/pois/poiLayerVisibleSlice.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# 🧩 poiLayerVisibleSlice.js
|
||||
|
||||
Redux-Slice zur Verwaltung von POILayerVisible.
|
||||
3
docs/redux/slices/database/pois/poiMarkersSlice.md
Normal file
3
docs/redux/slices/database/pois/poiMarkersSlice.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# 🧩 poiMarkersSlice.js
|
||||
|
||||
Redux-Slice zur Verwaltung von POIMarkers.
|
||||
@@ -0,0 +1,3 @@
|
||||
# 🧩 poiReadFromDbTriggerSlice.js
|
||||
|
||||
Redux-Slice zur Verwaltung von POIReadFromDbTrigger.
|
||||
3
docs/redux/slices/database/pois/poiTypSlice.md
Normal file
3
docs/redux/slices/database/pois/poiTypSlice.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# 🧩 poiTypSlice.js
|
||||
|
||||
Redux-Slice zur Verwaltung von POITyp.
|
||||
3
docs/redux/slices/database/pois/poiTypesSlice.md
Normal file
3
docs/redux/slices/database/pois/poiTypesSlice.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# 🧩 poiTypesSlice.js
|
||||
|
||||
Redux-Slice zur Verwaltung von POITypes.
|
||||
@@ -0,0 +1,3 @@
|
||||
# 🧩 readPoiMarkersStoreSlice.js
|
||||
|
||||
Redux-Slice zur Verwaltung von readPoiMarkersStore.
|
||||
3
docs/redux/slices/database/pois/selectedPoiSlice.md
Normal file
3
docs/redux/slices/database/pois/selectedPoiSlice.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# 🧩 selectedPoiSlice.js
|
||||
|
||||
Redux-Slice zur Verwaltung von selectedPoi.
|
||||
25
docs/redux/slices/database/polylines/gisLinesSlice.md
Normal file
25
docs/redux/slices/database/polylines/gisLinesSlice.md
Normal file
@@ -0,0 +1,25 @@
|
||||
<!-- /docs/redux/slices/database/polylines/gisLinesSlice.md -->
|
||||
|
||||
# 🧩 gisLinesSlice.js
|
||||
|
||||
Verwaltet alle Linienobjekte, die aus der Datenbank (`gis_lines`) gelesen wurden.
|
||||
|
||||
## Zustand
|
||||
|
||||
```js
|
||||
{
|
||||
data: [],
|
||||
status: "idle" | "loading" | "succeeded" | "failed",
|
||||
error: string | null
|
||||
}
|
||||
```
|
||||
|
||||
## Thunk
|
||||
|
||||
- `fetchGisLinesThunk()`
|
||||
|
||||
## Selector
|
||||
|
||||
```js
|
||||
selectGisLines = (state) => state.gisLines.data
|
||||
```
|
||||
@@ -0,0 +1,25 @@
|
||||
<!-- /docs/redux/slices/database/polylines/polylineContextMenuSlice.md -->
|
||||
|
||||
# 🧩 polylineContextMenuSlice.js
|
||||
|
||||
Verwaltet den Zustand des Kontextmenüs bei Polylinien (z. B. Stützpunkt hinzufügen/entfernen).
|
||||
|
||||
## Zustand
|
||||
|
||||
```js
|
||||
{
|
||||
isOpen: false,
|
||||
position: { lat, lng } | null,
|
||||
forceClose: false,
|
||||
timerStart: number | null,
|
||||
countdown: number,
|
||||
countdownActive: boolean
|
||||
}
|
||||
```
|
||||
|
||||
## Aktionen
|
||||
|
||||
- `openPolylineContextMenu(payload)`
|
||||
- `closePolylineContextMenu()`
|
||||
- `updateCountdown()`
|
||||
- `forceCloseContextMenu()`
|
||||
@@ -0,0 +1,16 @@
|
||||
<!-- /docs/redux/slices/database/polylines/polylineEventsDisabledSlice.md -->
|
||||
|
||||
# 🧩 polylineEventsDisabledSlice.js
|
||||
|
||||
Steuert, ob Interaktionen mit Polylinien (z. B. Ziehen, Klicks) temporär deaktiviert sind.
|
||||
|
||||
## Zustand
|
||||
|
||||
```js
|
||||
{ disabled: boolean }
|
||||
```
|
||||
|
||||
## Aktionen
|
||||
|
||||
- `setDisabled(boolean)`
|
||||
- `toggleDisabled()`
|
||||
@@ -0,0 +1,21 @@
|
||||
<!-- /docs/redux/slices/database/polylines/polylineLayerVisibleSlice.md -->
|
||||
|
||||
# 🧩 polylineLayerVisibleSlice.js
|
||||
|
||||
Steuert die Sichtbarkeit des Polylinienlayers auf der Karte.
|
||||
|
||||
## Zustand
|
||||
|
||||
```js
|
||||
{ visible: boolean }
|
||||
```
|
||||
|
||||
## Aktion
|
||||
|
||||
- `setPolylineVisible(boolean)`
|
||||
|
||||
## Selector
|
||||
|
||||
```js
|
||||
selectPolylineVisible = (state) => state.polylineLayerVisible.visible
|
||||
```
|
||||
@@ -0,0 +1,22 @@
|
||||
<!-- /docs/redux/slices/database/polylines/updatePolylineCoordinatesSlice.md -->
|
||||
|
||||
# 🧩 updatePolylineCoordinatesSlice.js
|
||||
|
||||
Redux-Slice zur Überwachung des Lade-/Fehlerstatus bei der Aktualisierung von Linienkoordinaten.
|
||||
|
||||
## Zustand
|
||||
|
||||
```js
|
||||
{
|
||||
status: "idle" | "loading" | "succeeded" | "failed",
|
||||
error: string | null
|
||||
}
|
||||
```
|
||||
|
||||
## Thunk
|
||||
|
||||
- `updatePolylineCoordinatesThunk()`
|
||||
|
||||
## Aktion
|
||||
|
||||
- `resetUpdateStatus()`
|
||||
@@ -1,16 +1,24 @@
|
||||
# 📶 lineVisibilitySlice
|
||||
<!-- /docs/redux/slices/ui/lineVisibilitySlice.md -->
|
||||
|
||||
Speichert, welche Linien (Kabelstrecken) aktiv sichtbar sind.
|
||||
# 📶 lineVisibilitySlice.js
|
||||
|
||||
## 🔧 Zustand
|
||||
Redux-Slice zur Steuerung der Sichtbarkeit aktiver Linien auf der Karte.
|
||||
|
||||
```ts
|
||||
## Zustand
|
||||
|
||||
```js
|
||||
{
|
||||
activeLines: { [idLD]: true | false }
|
||||
activeLines: {
|
||||
[idLD]: true | false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 🎯 Aktionen
|
||||
## Aktionen
|
||||
|
||||
- `updateLineStatus({ idLD, active })`
|
||||
- `setActiveLines({...})`
|
||||
- `updateLineStatus({ idLD, active })`: Einzelne Linie sichtbar/unsichtbar
|
||||
- `setActiveLines({ ... })`: Ganze Objektzuweisung
|
||||
|
||||
## Anwendung
|
||||
|
||||
Wird verwendet z. B. in `useLineData.js`, `MapComponent.js`
|
||||
@@ -1,18 +1,27 @@
|
||||
# 🗺️ mapLayersSlice
|
||||
<!-- /docs/redux/slices/ui/mapLayersSlice.md -->
|
||||
|
||||
Verwaltet Sichtbarkeit der verschiedenen Map-Layer pro System (TALAS, ECI, GMA usw.).
|
||||
# 🗺️ mapLayersSlice.js
|
||||
|
||||
## 🔧 Zustand
|
||||
Verwaltet die Sichtbarkeit einzelner Layergruppen (z. B. GMA, ECI, Siemens).
|
||||
|
||||
```ts
|
||||
## Zustand
|
||||
|
||||
```js
|
||||
{
|
||||
TALAS: true,
|
||||
ECI: true,
|
||||
ULAF: true,
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
## 🎯 Aktionen
|
||||
## Aktionen
|
||||
|
||||
- `toggleLayer(layerName)`
|
||||
- `setLayerVisibility({ layer, visibility })`
|
||||
- `toggleLayer(layer)`: Sichtbarkeit toggeln
|
||||
- `setLayerVisibility({ layer, visibility })`: Sichtbarkeit explizit setzen
|
||||
|
||||
## Selector
|
||||
|
||||
```js
|
||||
selectMapLayersState = (state) => state.mapLayers
|
||||
```
|
||||
@@ -1,16 +0,0 @@
|
||||
# 👁️ poiLayerVisibleSlice
|
||||
|
||||
Steuert, ob der POI-Layer auf der Karte angezeigt wird.
|
||||
|
||||
## 🔧 Zustand
|
||||
|
||||
```ts
|
||||
{
|
||||
visible: true
|
||||
}
|
||||
```
|
||||
|
||||
## 🎯 Aktionen
|
||||
|
||||
- `setVisible(true|false)`
|
||||
- `toggleVisible()`
|
||||
@@ -1,16 +0,0 @@
|
||||
# 🔄 poiReadFromDbTriggerSlice
|
||||
|
||||
Verwaltet einen Trigger, um POIs aus der DB neu zu laden.
|
||||
|
||||
## 🔧 Zustand
|
||||
|
||||
```ts
|
||||
{
|
||||
trigger: 0
|
||||
}
|
||||
```
|
||||
|
||||
## 🎯 Aktionen
|
||||
|
||||
- `incrementTrigger()` – erhöht den Wert (z. B. um useEffect auszulösen)
|
||||
- `resetTrigger()` – setzt auf 0 zurück
|
||||
@@ -1,71 +0,0 @@
|
||||
# 🧩 poiTypesSlice – Redux Slice für POI-Typen
|
||||
|
||||
## Zweck
|
||||
|
||||
Dieses Slice verwaltet die Liste der POI-Typen (`poiTyp`) aus der Datenbank.
|
||||
Die Daten werden beim Start der Karte vom Server abgerufen und im Redux Store gespeichert.
|
||||
|
||||
---
|
||||
|
||||
## Quelle
|
||||
|
||||
API-Endpunkt:
|
||||
|
||||
```
|
||||
/api/talas_v5_DB/poiTyp/readPoiTyp
|
||||
```
|
||||
|
||||
Die Daten werden über einen `createAsyncThunk` geladen:
|
||||
|
||||
```js
|
||||
export const fetchPoiTypes = createAsyncThunk("poiTypes/fetchPoiTypes", async () => {
|
||||
// ...
|
||||
});
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Dynamische API-URL
|
||||
|
||||
Damit kein Rebuild bei jedem Serverwechsel nötig ist, wird die API-URL dynamisch bestimmt:
|
||||
|
||||
```js
|
||||
let API_BASE_URL = "";
|
||||
|
||||
if (typeof window !== "undefined") {
|
||||
API_BASE_URL = `${window.location.protocol}//${window.location.hostname}:3000`;
|
||||
} else {
|
||||
API_BASE_URL = "http://localhost:3000";
|
||||
}
|
||||
```
|
||||
|
||||
➡ Dadurch kann dieselbe `.next`-Build auf verschiedenen Servern verwendet werden, ohne neu zu builden.
|
||||
|
||||
---
|
||||
|
||||
## Datenstruktur im Redux Store
|
||||
|
||||
```ts
|
||||
{
|
||||
poiTypes: {
|
||||
items: [], // Liste aller POI-Typen
|
||||
status: "idle" | "loading" | "succeeded" | "failed"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Verwendung in Komponenten
|
||||
|
||||
Diese Daten werden typischerweise verwendet in:
|
||||
|
||||
- `components/pois/AddPoiModalWindow.js`
|
||||
- `MapComponent.js` (indirekt)
|
||||
|
||||
---
|
||||
|
||||
## Siehe auch
|
||||
|
||||
- [`useFetchPoiData`](../../frontend/hooks/useFetchPoiData.md)
|
||||
- API-Datei: `pages/api/talas_v5_DB/poiTyp/readPoiTyp.js`
|
||||
@@ -1,23 +0,0 @@
|
||||
# 📋 polylineContextMenuSlice
|
||||
|
||||
Verwaltet das Kontextmenü für Polylinien (z. B. für Aktionen wie POI einfügen).
|
||||
|
||||
## 🔧 Zustand
|
||||
|
||||
```ts
|
||||
{
|
||||
isOpen: false,
|
||||
position: { lat, lng },
|
||||
forceClose: false,
|
||||
timerStart: null,
|
||||
countdown: 20,
|
||||
countdownActive: false
|
||||
}
|
||||
```
|
||||
|
||||
## 🎯 Aktionen
|
||||
|
||||
- `openPolylineContextMenu(position)`
|
||||
- `closePolylineContextMenu()`
|
||||
- `updateCountdown()`
|
||||
- `forceCloseContextMenu()`
|
||||
@@ -1,16 +0,0 @@
|
||||
# 🚫 polylineEventsDisabledSlice
|
||||
|
||||
Steuert, ob Events auf Polylinien (z. B. Klicks) deaktiviert sind.
|
||||
|
||||
## 🔧 Zustand
|
||||
|
||||
```ts
|
||||
{
|
||||
disabled: false
|
||||
}
|
||||
```
|
||||
|
||||
## 🎯 Aktionen
|
||||
|
||||
- `setDisabled(true|false)`
|
||||
- `toggleDisabled()`
|
||||
@@ -1,15 +0,0 @@
|
||||
# 📏 polylineLayerVisibleSlice
|
||||
|
||||
Steuert, ob der Layer mit Kabelstrecken (Polylinien) angezeigt wird.
|
||||
|
||||
## 🔧 Zustand
|
||||
|
||||
```ts
|
||||
{
|
||||
visible: false
|
||||
}
|
||||
```
|
||||
|
||||
## 🎯 Aktionen
|
||||
|
||||
- `setPolylineVisible(true|false)` → speichert Zustand auch in `localStorage`
|
||||
@@ -1,16 +0,0 @@
|
||||
# 📌 readPoiMarkersStoreSlice
|
||||
|
||||
Enthält alle POI-Marker, die von der Datenbank gelesen wurden.
|
||||
|
||||
## 🔧 Zustand
|
||||
|
||||
```ts
|
||||
{
|
||||
poiMarkers: []
|
||||
}
|
||||
```
|
||||
|
||||
## 🎯 Aktionen
|
||||
|
||||
- `setPoiMarkers(array)`
|
||||
- `clearPoiMarkers()`
|
||||
16
docs/redux/slices/selectedAreaSlice.md
Normal file
16
docs/redux/slices/selectedAreaSlice.md
Normal file
@@ -0,0 +1,16 @@
|
||||
<!-- /docs/redux/slices/ui/selectedAreaSlice.md -->
|
||||
|
||||
# 📍 selectedAreaSlice.js
|
||||
|
||||
Steuert die aktuell selektierte Station/Bereich in der Karte.
|
||||
|
||||
## Zustand
|
||||
|
||||
```js
|
||||
{ area: null | object }
|
||||
```
|
||||
|
||||
## Aktionen
|
||||
|
||||
- `setSelectedArea(area)`
|
||||
- `clearSelectedArea()`
|
||||
@@ -1,14 +1,16 @@
|
||||
# 🔧 selectedDeviceSlice
|
||||
<!-- /docs/redux/slices/ui/selectedDeviceSlice.md -->
|
||||
|
||||
Speichert das aktuell ausgewählte Gerät (z. B. für Detailanzeige, Popup oder Bearbeitung).
|
||||
# 🖥️ selectedDeviceSlice.js
|
||||
|
||||
## 🔧 Zustand
|
||||
Speichert das aktuell ausgewählte Gerät aus der Karte.
|
||||
|
||||
```ts
|
||||
null | { ...deviceData }
|
||||
## Zustand
|
||||
|
||||
```js
|
||||
null | { ...Gerät }
|
||||
```
|
||||
|
||||
## 🎯 Aktionen
|
||||
## Aktionen
|
||||
|
||||
- `setSelectedDevice(device)`
|
||||
- `clearSelectedDevice()`
|
||||
@@ -1,14 +0,0 @@
|
||||
# 📍 selectedPoiSlice
|
||||
|
||||
Speichert den aktuell ausgewählten POI (z. B. für Detailanzeige, Update oder Modal-Interaktion).
|
||||
|
||||
## 🔧 Zustand
|
||||
|
||||
```ts
|
||||
null | { ...poiData }
|
||||
```
|
||||
|
||||
## 🎯 Aktionen
|
||||
|
||||
- `setSelectedPoi(poi)`
|
||||
- `clearSelectedPoi()`
|
||||
@@ -1,18 +1,20 @@
|
||||
# 🌐 urlParameterSlice
|
||||
<!-- /docs/redux/slices/ui/urlParameterSlice.md -->
|
||||
|
||||
Verwaltet `mapId` und `userId`, die aus der URL gelesen werden.
|
||||
# 🔗 urlParameterSlice.js
|
||||
|
||||
## 🔧 Zustand
|
||||
Verwaltet die URL-Parameter `m` (mapId) und `u` (userId).
|
||||
|
||||
```ts
|
||||
## Zustand
|
||||
|
||||
```js
|
||||
{
|
||||
mapId: null | string,
|
||||
userId: null | string
|
||||
mapId: number | null,
|
||||
userId: number | null
|
||||
}
|
||||
```
|
||||
|
||||
## 🎯 Aktionen
|
||||
## Aktionen
|
||||
|
||||
- `setMapId(id)`
|
||||
- `setUserId(id)`
|
||||
- `setFromURL({ m, u })` – gleichzeitig beide setzen aus URL-Params
|
||||
- `setFromURL({ m, u })`
|
||||
25
docs/redux/slices/webService/gisLinesStatusSlice.md
Normal file
25
docs/redux/slices/webService/gisLinesStatusSlice.md
Normal file
@@ -0,0 +1,25 @@
|
||||
<!-- /docs/redux/slices/webservice/gisLinesStatusSlice.md -->
|
||||
|
||||
# 🧩 gisLinesStatusSlice.js
|
||||
|
||||
Lädt und speichert Statusdaten von Linien (z. B. Spannungswerte, Betriebszustand) aus dem Webservice.
|
||||
|
||||
## Zustand
|
||||
|
||||
```js
|
||||
{
|
||||
data: [],
|
||||
status: "idle" | "loading" | "succeeded" | "failed",
|
||||
error: string | null
|
||||
}
|
||||
```
|
||||
|
||||
## Thunk
|
||||
|
||||
- `fetchGisLinesStatusThunk()`
|
||||
|
||||
## Selector
|
||||
|
||||
```js
|
||||
selectGisLinesStatusFromWebservice = (state) => state.gisLinesStatusFromWebservice
|
||||
```
|
||||
@@ -1,26 +1,25 @@
|
||||
# 📈 gisStationsMeasurementsSlice
|
||||
<!-- /docs/redux/slices/webservice/gisStationsMeasurementsSlice.md -->
|
||||
|
||||
Verwaltet Messdaten für GIS-Stationen, z. B. Spannungen, Strom, Sensorwerte etc.
|
||||
# 🧩 gisStationsMeasurementsSlice.js
|
||||
|
||||
## 🔧 Pfad
|
||||
`/redux/slices/webService/gisStationsMeasurementsSlice.js`
|
||||
Verwaltet Messwerte einzelner Stationen (z. B. Schleifenwiderstand, Isolation) aus Webservice-Antworten.
|
||||
|
||||
## 📦 Initial State
|
||||
## Zustand
|
||||
|
||||
```ts
|
||||
```js
|
||||
{
|
||||
data: [],
|
||||
status: "idle",
|
||||
error: null
|
||||
status: "idle" | "loading" | "succeeded" | "failed",
|
||||
error: string | null
|
||||
}
|
||||
```
|
||||
|
||||
## 🔁 Thunk: `fetchGisStationsMeasurementsFromWebService`
|
||||
## Thunk
|
||||
|
||||
Verwendet `fetchGisStationsMeasurements()` als API-Quelle.
|
||||
- `fetchGisStationsMeasurementsThunk()`
|
||||
|
||||
## 📊 Selector
|
||||
## Selector
|
||||
|
||||
```ts
|
||||
selectGisStationsMeasurements = (state) => state.gisStationsMeasurements.data;
|
||||
```js
|
||||
selectGisStationsMeasurements = (state) => state.gisStationsMeasurements.data
|
||||
```
|
||||
@@ -1,18 +1,25 @@
|
||||
# 🏙️ gisStationsStaticDistrictSlice
|
||||
<!-- /docs/redux/slices/webservice/gisStationsStaticDistrictSlice.md -->
|
||||
|
||||
Verwaltet statische Daten für GIS-Bezirksstationen.
|
||||
# 🧩 gisStationsStaticDistrictSlice.js
|
||||
|
||||
## 🔧 Pfad
|
||||
`/redux/slices/webService/gisStationsStaticDistrictSlice.js`
|
||||
Lädt und speichert statische Standortdaten (z. B. Koordinaten) der Stationen im aktuellen Bezirk.
|
||||
|
||||
## 📦 Initial State
|
||||
## Zustand
|
||||
|
||||
```ts
|
||||
```js
|
||||
{
|
||||
data: [],
|
||||
status: "idle",
|
||||
error: null
|
||||
data: { Points: [] },
|
||||
status: "idle" | "loading" | "succeeded" | "failed",
|
||||
error: string | null
|
||||
}
|
||||
```
|
||||
|
||||
## 🔁 Thunk: `fetchGisStationsStaticDistrictFromWebService`
|
||||
## Thunk
|
||||
|
||||
- `fetchGisStationsStaticDistrictThunk()`
|
||||
|
||||
## Selector
|
||||
|
||||
```js
|
||||
selectGisStationsStaticDistrict = (state) => state.gisStationsStaticDistrict.data
|
||||
```
|
||||
@@ -1,26 +0,0 @@
|
||||
# 🛰️ gisStationsStaticSlice
|
||||
|
||||
Verwaltet statische Informationen zu GIS-Stationen – z. B. für das Dropdown im DataSheet-Bereich.
|
||||
|
||||
## 🔧 Pfad
|
||||
`/redux/slices/webService/gisStationsStaticSlice.js`
|
||||
|
||||
## 📦 Initial State
|
||||
|
||||
```ts
|
||||
{
|
||||
data: null,
|
||||
status: "idle",
|
||||
error: null
|
||||
}
|
||||
```
|
||||
|
||||
## 🔁 Thunk: `fetchGisStationsStatic`
|
||||
|
||||
Lädt Daten über dynamisch erzeugte URL (`idMap` aus `window.location.search`).
|
||||
|
||||
## 🧪 Logging
|
||||
|
||||
```ts
|
||||
console.log("📡 API Request URL in redux slice:", url);
|
||||
```
|
||||
@@ -1,18 +1,25 @@
|
||||
# 📶 gisStationsStatusDistrictSlice
|
||||
<!-- /docs/redux/slices/webservice/gisStationsStatusDistrictSlice.md -->
|
||||
|
||||
Verwaltet Statusinformationen für GIS-Bezirksstationen (z. B. online/offline, Fehlerstatus).
|
||||
# 🧩 gisStationsStatusDistrictSlice.js
|
||||
|
||||
## 🔧 Pfad
|
||||
`/redux/slices/webService/gisStationsStatusDistrictSlice.js`
|
||||
Verwaltet den Status aller Stationen im aktuellen Bezirk aus Webservice-Daten.
|
||||
|
||||
## 📦 Initial State
|
||||
## Zustand
|
||||
|
||||
```ts
|
||||
```js
|
||||
{
|
||||
data: [],
|
||||
status: "idle",
|
||||
error: null
|
||||
status: "idle" | "loading" | "succeeded" | "failed",
|
||||
error: string | null
|
||||
}
|
||||
```
|
||||
|
||||
## 🔁 Thunk: `fetchGisStationsStatusDistrictFromWebService`
|
||||
## Thunk
|
||||
|
||||
- `fetchGisStationsStatusDistrictThunk()`
|
||||
|
||||
## Selector
|
||||
|
||||
```js
|
||||
selectGisStationsStatusDistrict = (state) => state.gisStationsStatusDistrict.data
|
||||
```
|
||||
@@ -1,25 +1,25 @@
|
||||
# 🧭 gisSystemStaticSlice
|
||||
<!-- /docs/redux/slices/webservice/gisSystemStaticSlice.md -->
|
||||
|
||||
Verwaltet statische GIS-Systemdaten (`Systems[]`), die vom Server zurückgegeben werden.
|
||||
# 🧩 gisSystemStaticSlice.js
|
||||
|
||||
## 🔧 Pfad
|
||||
`/redux/slices/webService/gisSystemStaticSlice.js`
|
||||
Verwaltet statische Gerätedaten aller Systeme, die vom Webservice zurückgegeben werden.
|
||||
|
||||
## 📦 Initial State
|
||||
## Zustand
|
||||
|
||||
```ts
|
||||
```js
|
||||
{
|
||||
data: [], // enthält Systems[]
|
||||
status: "idle", // Ladezustand
|
||||
error: null
|
||||
data: [],
|
||||
status: "idle" | "loading" | "succeeded" | "failed",
|
||||
error: string | null
|
||||
}
|
||||
```
|
||||
|
||||
## 🔁 Thunk: `fetchGisSystemStaticFromWebService`
|
||||
## Thunk
|
||||
|
||||
Ruft `fetchGisSystemStatic()` auf und speichert nur das Feld `Systems` im Redux-State.
|
||||
- `fetchGisSystemStaticThunk()`
|
||||
|
||||
## 🧩 Aktionen
|
||||
## Selector
|
||||
|
||||
- `setGisSystemStatic(data)` → manuelles Setzen von `Systems[]`
|
||||
- `fulfilled` → speichert Systems[]
|
||||
```js
|
||||
selectGisSystemStatic = (state) => state.gisSystemStatic.data
|
||||
```
|
||||
26
docs/redux/slices/webService/userRightsSlice.md
Normal file
26
docs/redux/slices/webService/userRightsSlice.md
Normal file
@@ -0,0 +1,26 @@
|
||||
<!-- /docs/redux/slices/webservice/userRightsSlice.md -->
|
||||
|
||||
# 🧩 userRightsSlice.js
|
||||
|
||||
Verwaltet die Benutzerrechte, die vom Webservice für den angemeldeten Nutzer bereitgestellt werden.
|
||||
|
||||
## Zustand
|
||||
|
||||
```js
|
||||
{
|
||||
rights: [],
|
||||
status: "idle" | "loading" | "succeeded" | "failed",
|
||||
error: string | null
|
||||
}
|
||||
```
|
||||
|
||||
## Thunk
|
||||
|
||||
- `fetchUserRightsThunk()`
|
||||
|
||||
## Selector
|
||||
|
||||
```js
|
||||
selectGisUserRightsFromWebservice = (state) => state.gisUserRightsFromWebservice.rights
|
||||
selectGisUserRightsStatus = (state) => state.gisUserRightsFromWebservice.status
|
||||
```
|
||||
@@ -1,16 +1,16 @@
|
||||
# 🔍 zoomTriggerSlice
|
||||
<!-- /docs/redux/slices/ui/zoomTriggerSlice.md -->
|
||||
|
||||
Löst ein Neuzeichnen oder eine Zoom-Interaktion aus.
|
||||
# 🔍 zoomTriggerSlice.js
|
||||
|
||||
## 🔧 Zustand
|
||||
Ein Redux-Trigger, der die Karte zur Neuberechnung des Zoom-Zustands veranlasst.
|
||||
|
||||
```ts
|
||||
{
|
||||
trigger: 0
|
||||
}
|
||||
## Zustand
|
||||
|
||||
```js
|
||||
{ trigger: number }
|
||||
```
|
||||
|
||||
## 🎯 Aktionen
|
||||
## Aktionen
|
||||
|
||||
- `incrementZoomTrigger()` – erhöht Trigger-Zähler (z. B. zur Synchronisation)
|
||||
- `resetZoomTrigger()` – setzt Trigger zurück
|
||||
- `incrementZoomTrigger()`: Erhöht den Trigger
|
||||
- `resetZoomTrigger()`: Setzt auf 0 zurück
|
||||
Reference in New Issue
Block a user