mock: Linien
This commit is contained in:
119
__mocks__/webservice/gisStationsStatusDistrict.js
Normal file
119
__mocks__/webservice/gisStationsStatusDistrict.js
Normal file
@@ -0,0 +1,119 @@
|
||||
// __mocks__/webservice/gisStationsStatusDistrict.js
|
||||
|
||||
export const mockGisStationsStatusDistrict = {
|
||||
Name: "Liste aller Statis der Geraete",
|
||||
Zeitstempel: "2025-05-29T08:45:50.7257018+02:00",
|
||||
IdMap: "12",
|
||||
Statis: [
|
||||
{
|
||||
IdLD: 50922,
|
||||
Na: "system",
|
||||
Le: 4,
|
||||
Co: "#FF00FF",
|
||||
Me: "Eingang DE 01 kommend",
|
||||
Feld: 4,
|
||||
Icon: 0,
|
||||
},
|
||||
{
|
||||
IdLD: 50922,
|
||||
Na: "system",
|
||||
Le: 4,
|
||||
Co: "#FF00FF",
|
||||
Me: "Eingang DE 05 kommend",
|
||||
Feld: 4,
|
||||
Icon: 0,
|
||||
},
|
||||
{
|
||||
IdLD: 50922,
|
||||
Na: "system",
|
||||
Le: 4,
|
||||
Co: "#FF00FF",
|
||||
Me: "Eingang DE 17 kommend",
|
||||
Feld: 4,
|
||||
Icon: 0,
|
||||
},
|
||||
{
|
||||
IdLD: 50922,
|
||||
Na: "system",
|
||||
Le: 4,
|
||||
Co: "#FF00FF",
|
||||
Me: "Eingang DE 31 kommend",
|
||||
Feld: 4,
|
||||
Icon: 0,
|
||||
},
|
||||
{
|
||||
IdLD: 50922,
|
||||
Na: "system",
|
||||
Le: 4,
|
||||
Co: "#FF00FF",
|
||||
Me: "Eingang DE 32 kommend",
|
||||
Feld: 4,
|
||||
Icon: 0,
|
||||
},
|
||||
{
|
||||
IdLD: 50922,
|
||||
Na: "system",
|
||||
Le: 4,
|
||||
Co: "#FF00FF",
|
||||
Me: "Station offline",
|
||||
Feld: 4,
|
||||
Icon: 0,
|
||||
},
|
||||
{
|
||||
IdLD: 50922,
|
||||
Na: "minor",
|
||||
Le: 3,
|
||||
Co: "#FFFF00",
|
||||
Me: "Eingang DE 02 kommend",
|
||||
Feld: 4,
|
||||
Icon: 0,
|
||||
},
|
||||
{
|
||||
IdLD: 50922,
|
||||
Na: "minor",
|
||||
Le: 3,
|
||||
Co: "#FFFF00",
|
||||
Me: "KÜG 08: Überspannung gehend",
|
||||
Feld: 4,
|
||||
Icon: 0,
|
||||
},
|
||||
{
|
||||
IdLD: 50922,
|
||||
Na: "major",
|
||||
Le: 2,
|
||||
Co: "#FF9900",
|
||||
Me: "Eingang DE 03 kommend",
|
||||
Feld: 4,
|
||||
Icon: 0,
|
||||
},
|
||||
{
|
||||
IdLD: 50922,
|
||||
Na: "critical",
|
||||
Le: 1,
|
||||
Co: "#FF0000",
|
||||
Me: "KÜG 02: Aderbruch kommend",
|
||||
Feld: 4,
|
||||
Icon: 0,
|
||||
},
|
||||
{
|
||||
IdLD: 50922,
|
||||
Na: "critical",
|
||||
Le: 1,
|
||||
Co: "#FF0000",
|
||||
Me: "KÜG 03: Aderbruch kommend",
|
||||
Feld: 4,
|
||||
Icon: 0,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
// Optional: Funktion zum Ändern
|
||||
export const updateDeviceStatus = (id, changes) => {
|
||||
const deviceStatus = mockGisStationsStatusDistrict.Statis.find((p) => p.IdLD === id);
|
||||
if (deviceStatus) Object.assign(deviceStatus, changes);
|
||||
};
|
||||
|
||||
export const deleteDeviceStatus = (id) => {
|
||||
const index = mockGisStationsStatusDistrict.Statis.findIndex((p) => p.IdLD === id);
|
||||
if (index !== -1) mockGisStationsStatusDistrict.Statis.splice(index, 1);
|
||||
};
|
||||
Reference in New Issue
Block a user