This commit is contained in:
ISA
2025-05-28 08:04:34 +02:00
parent 97fbb6fdc1
commit 5f0133d638
107 changed files with 1446 additions and 454 deletions

View 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.

View File

@@ -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

View File

@@ -0,0 +1,3 @@
# 🧩 addPoiOnPolylineSlice.js
Redux-Slice zur Verwaltung von addPoiOnPolyline.

View File

@@ -0,0 +1,3 @@
# 🧩 addPoiSlice.js
Redux-Slice zur Verwaltung von addPoi.

View File

@@ -0,0 +1,3 @@
# 🧩 currentPoiSlice.js
Redux-Slice zur Verwaltung von currentPoi.

View File

@@ -0,0 +1,3 @@
# 🧩 poiIconsDataSlice.js
Redux-Slice zur Verwaltung von POIIconsData.

View File

@@ -0,0 +1,3 @@
# 🧩 poiLayerVisibleSlice.js
Redux-Slice zur Verwaltung von POILayerVisible.

View File

@@ -0,0 +1,3 @@
# 🧩 poiMarkersSlice.js
Redux-Slice zur Verwaltung von POIMarkers.

View File

@@ -0,0 +1,3 @@
# 🧩 poiReadFromDbTriggerSlice.js
Redux-Slice zur Verwaltung von POIReadFromDbTrigger.

View File

@@ -0,0 +1,3 @@
# 🧩 poiTypSlice.js
Redux-Slice zur Verwaltung von POITyp.

View File

@@ -0,0 +1,3 @@
# 🧩 poiTypesSlice.js
Redux-Slice zur Verwaltung von POITypes.

View File

@@ -0,0 +1,3 @@
# 🧩 readPoiMarkersStoreSlice.js
Redux-Slice zur Verwaltung von readPoiMarkersStore.

View File

@@ -0,0 +1,3 @@
# 🧩 selectedPoiSlice.js
Redux-Slice zur Verwaltung von selectedPoi.

View 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
```

View File

@@ -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()`

View File

@@ -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()`

View File

@@ -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
```

View File

@@ -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()`