feat: Webservice-Mockdaten im public-Verzeichnis hinzugefügt
- JSON-Dateien für Linienstatus, Stationsstatus, Systemdaten und Benutzerrechte unter /public/mocks/webservice/ abgelegt - Struktur der Dateien an echte Webservice-Antworten angepasst (z. B. 'Statis' statt 'Status') - Dienste wurden entsprechend auf Umschaltung zwischen Mock- und Echtbetrieb vorbereitet - Ermöglicht lokale Entwicklung und Tests ohne Backend-Verbindung
This commit is contained in:
@@ -120,11 +120,11 @@ export const mockGisStationsMeasurements = {
|
||||
|
||||
// Optional: Funktion zum Ändern
|
||||
export const updateMeasurement = (id, changes) => {
|
||||
const deviceMeasurement = mockGisStationsMeasurements.Statis.find((p) => p.IdLD === id);
|
||||
const deviceMeasurement = mockGisStationsMeasurements.Statis.find(p => p.IdLD === id);
|
||||
if (deviceMeasurement) Object.assign(deviceMeasurement, changes);
|
||||
};
|
||||
|
||||
export const deleteMeasurement = (id) => {
|
||||
const index = mockGisStationsMeasurements.Statis.findIndex((p) => p.IdLD === id);
|
||||
export const deleteMeasurement = id => {
|
||||
const index = mockGisStationsMeasurements.Statis.findIndex(p => p.IdLD === id);
|
||||
if (index !== -1) mockGisStationsMeasurements.Statis.splice(index, 1);
|
||||
};
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
// __mocks__/webservice/gisStationsStaticDistrict.js
|
||||
/*
|
||||
Icon: 20, CPL rot
|
||||
Icon: 19, Telefon rot
|
||||
|
||||
*/
|
||||
|
||||
export const mockGisStationsStaticDistrict = {
|
||||
Name: "Liste aller Geraete einer bestimmten Karte",
|
||||
@@ -163,11 +168,11 @@ export const mockGisStationsStaticDistrict = {
|
||||
|
||||
// Optional: Funktion zum Ändern
|
||||
export const updateDevice = (id, changes) => {
|
||||
const device = mockGisStationsStaticDistrict.Points.find((p) => p.IdLD === id);
|
||||
const device = mockGisStationsStaticDistrict.Points.find(p => p.IdLD === id);
|
||||
if (device) Object.assign(device, changes);
|
||||
};
|
||||
|
||||
export const deleteDevice = (id) => {
|
||||
const index = mockGisStationsStaticDistrict.Points.findIndex((p) => p.IdLD === id);
|
||||
export const deleteDevice = id => {
|
||||
const index = mockGisStationsStaticDistrict.Points.findIndex(p => p.IdLD === id);
|
||||
if (index !== -1) mockGisStationsStaticDistrict.Points.splice(index, 1);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user