Files
nodeMap/docs/redux/slices/database/locationDevice/locationDevicesSlice.md
2025-05-28 08:04:34 +02:00

781 B

🧩 locationDevicesSlice.js

Redux-Slice zur Verwaltung von Standortgeräten (Devices) aus der Tabelle location_device.


Zustand

{
  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

selectLocationDevices = (state) => state.locationDevices.data;
selectLocationDeviceStatus = (state) => state.locationDevices.status;

Besonderheiten

  • Zustand wird bei pending, fulfilled und rejected aktualisiert
  • Fehlernachricht wird in error gespeichert