WIP: Add basic structure for edit mode to DataSheet.js

Der Bearbeitungsmodus ist noch nicht vollständig, und es fehlen
einige Funktionalitäten. Reduzierung der Datenbankanfragen noch in Arbeit.
This commit is contained in:
ISA
2024-09-06 10:41:47 +02:00
parent 98e8bdf96e
commit 6850fee16a
8 changed files with 66 additions and 217 deletions

View File

@@ -21,6 +21,12 @@ const determinePriority = (iconPath, priorityConfig) => {
// Funktion zum Erstellen und Setzen von Markern
export const createAndSetDevices = async (systemId, setMarkersFunction, GisSystemStatic, priorityConfig) => {
try {
// Zähler für externe API-Aufrufe in localStorage speichern
let requestCount = localStorage.getItem("gisStationsStaticRequestCount") || 0;
requestCount++;
localStorage.setItem("gisStationsStaticRequestCount", requestCount);
console.log(`config.mapGisStationsStaticDistrictUrl in createAndSetDevice wurde ${requestCount} Mal aufgerufen.`);
const response1 = await fetch(config.mapGisStationsStaticDistrictUrl);
const jsonResponse = await response1.json();
const response2 = await fetch(config.mapGisStationsStatusDistrictUrl);