cleanup: veraltete GIS-Fetch-Dateien entfernt – Projekt verwendet nur noch zentrale Thunks und Services
This commit is contained in:
28
CHANGELOG.md
28
CHANGELOG.md
@@ -4,6 +4,34 @@ Alle bedeutenden Änderungen an diesem Projekt werden in dieser Datei dokumentie
|
||||
|
||||
---
|
||||
|
||||
## [1.1.125] – 2025-05-21
|
||||
|
||||
### Cleanup
|
||||
|
||||
- 🧼 Unnötige GIS-Fetch-Dateien entfernt:
|
||||
- `fetchGisStationsMeasurements.js`
|
||||
- `fetchGisStationsStatic.js`
|
||||
- `fetchGisStationsStaticDistrict.js`
|
||||
- `fetchGisStationsStatusDistrict.js`
|
||||
- `fetchGisSystemStatic.js`
|
||||
- Alle Datenquellen werden jetzt ausschließlich über zentrale Redux Thunks und zugehörige Services geladen
|
||||
- Alte Fetch-Struktur (`/redux/api/fromWebService`) vollständig obsolet
|
||||
|
||||
### Fixed
|
||||
|
||||
- Alle GIS-Redux-Slices greifen jetzt korrekt auf die Thunks aus `redux/thunks/` zu
|
||||
- `DataSheet.js` und `MapComponent.js` verwenden nur noch:
|
||||
- `gisStationsMeasurements`
|
||||
- `gisStationsStaticDistrict`
|
||||
- `gisStationsStatusDistrict`
|
||||
- `gisSystemStatic`
|
||||
|
||||
### Changed
|
||||
|
||||
- Versionsnummer aktualisiert auf `1.1.125`
|
||||
|
||||
---
|
||||
|
||||
## [1.1.123] – 2025-05-21
|
||||
|
||||
### Changed
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
// /config/appVersion
|
||||
export const APP_VERSION = "1.1.124";
|
||||
export const APP_VERSION = "1.1.126";
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
// /redux/api/fromWebService/fetchGisStationsMeasurements.js
|
||||
|
||||
export const fetchGisStationsMeasurements = async () => {
|
||||
const mode = process.env.NEXT_PUBLIC_API_PORT_MODE;
|
||||
|
||||
const apiBaseUrl = mode === "dev" ? `${window.location.protocol}//${window.location.hostname}:80/talas5/ClientData/WebServiceMap.asmx` : `${window.location.origin}/talas5/ClientData/WebServiceMap.asmx`;
|
||||
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const idMap = params.get("m");
|
||||
const idUser = params.get("u");
|
||||
|
||||
const url = `${apiBaseUrl}/GisStationsMeasurements?idMap=${idMap}&idUser=${idUser}`;
|
||||
console.log("🔍 fetchGisStationsMeasurements - URL:", url);
|
||||
|
||||
const response = await fetch(url);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error("GisStationsMeasurements konnte nicht geladen werden");
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
return data;
|
||||
};
|
||||
@@ -1,29 +0,0 @@
|
||||
// /redux/api/fromWebService/fetchGisStationsStatic.js
|
||||
|
||||
export const fetchGisStationsStatic = async () => {
|
||||
try {
|
||||
const mode = process.env.NEXT_PUBLIC_API_PORT_MODE;
|
||||
|
||||
const apiBaseUrl = mode === "dev" ? `${window.location.protocol}//${window.location.hostname}:80/talas5/ClientData/WebServiceMap.asmx` : `${window.location.origin}/talas5/ClientData/WebServiceMap.asmx`;
|
||||
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const idMap = params.get("m");
|
||||
|
||||
const url = `${apiBaseUrl}/GisStationsStatic?idMap=${idMap}`;
|
||||
console.log("🔍 fetchGisStationsStatic - URL:", url);
|
||||
|
||||
const response = await fetch(url);
|
||||
|
||||
const text = await response.text();
|
||||
console.log("📡 API Response Text von fetch:", text);
|
||||
|
||||
if (!response.ok || !response.headers.get("content-type")?.includes("application/json")) {
|
||||
throw new Error("❌ Fehler: Antwort ist kein gültiges JSON");
|
||||
}
|
||||
|
||||
return JSON.parse(text);
|
||||
} catch (error) {
|
||||
console.error("❌ Fehler beim Abrufen der GIS Stations Static:", error);
|
||||
return null;
|
||||
}
|
||||
};
|
||||
@@ -1,23 +0,0 @@
|
||||
// /redux/api/fromWebService/fetchGisStationsStaticDistrict.js
|
||||
|
||||
export const fetchGisStationsStaticDistrict = async () => {
|
||||
const mode = process.env.NEXT_PUBLIC_API_PORT_MODE;
|
||||
|
||||
const apiBaseUrl = mode === "dev" ? `${window.location.protocol}//${window.location.hostname}:80/talas5/ClientData/WebServiceMap.asmx` : `${window.location.origin}/talas5/ClientData/WebServiceMap.asmx`;
|
||||
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const idMap = params.get("m");
|
||||
const idUser = params.get("u");
|
||||
|
||||
const url = `${apiBaseUrl}/GisStationsStaticDistrict?idMap=${idMap}&idUser=${idUser}`;
|
||||
console.log("🔍 fetchGisStationsStaticDistrict - URL:", url);
|
||||
|
||||
const response = await fetch(url);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error("GisStationsStaticDistrict konnte nicht geladen werden");
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
return data;
|
||||
};
|
||||
@@ -1,23 +0,0 @@
|
||||
// /redux/api/fromWebService/fetchGisStationsStatusDistrict.js
|
||||
|
||||
export const fetchGisStationsStatusDistrict = async () => {
|
||||
const mode = process.env.NEXT_PUBLIC_API_PORT_MODE;
|
||||
|
||||
const apiBaseUrl = mode === "dev" ? `${window.location.protocol}//${window.location.hostname}:80/talas5/ClientData/WebServiceMap.asmx` : `${window.location.origin}/talas5/ClientData/WebServiceMap.asmx`;
|
||||
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const idMap = params.get("m");
|
||||
const idUser = params.get("u");
|
||||
|
||||
const url = `${apiBaseUrl}/GisStationsStatusDistrict?idMap=${idMap}&idUser=${idUser}`;
|
||||
console.log("🔍 fetchGisStationsStatusDistrict - URL:", url);
|
||||
|
||||
const response = await fetch(url);
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error("GisStationsStatusDistrict konnte nicht geladen werden");
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
return data;
|
||||
};
|
||||
@@ -1,20 +0,0 @@
|
||||
// /redux/api/fromWebService/fetchGisSystemStatic.js
|
||||
|
||||
export async function fetchGisSystemStatic() {
|
||||
const mode = process.env.NEXT_PUBLIC_API_PORT_MODE;
|
||||
|
||||
const apiBaseUrl = mode === "dev" ? `${window.location.protocol}//${window.location.hostname}:80/talas5/ClientData/WebServiceMap.asmx` : `${window.location.origin}/talas5/ClientData/WebServiceMap.asmx`;
|
||||
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const idMap = params.get("m");
|
||||
const idUser = params.get("u");
|
||||
console.log("🔍 fetchGisSystemStatic - idMap:", idMap);
|
||||
console.log("🔍 fetchGisSystemStatic - idUser:", idUser);
|
||||
console.log("🔍 fetchGisSystemStatic - URL:", `${apiBaseUrl}/GisSystemStatic?idMap=${idMap}&idUser=${idUser}`);
|
||||
|
||||
const response = await fetch(`${apiBaseUrl}/GisSystemStatic?idMap=${idMap}&idUser=${idUser}`);
|
||||
const data = await response.json();
|
||||
|
||||
//console.log("✅ fetchGisSystemStatic - Daten:", data);
|
||||
return data;
|
||||
}
|
||||
Reference in New Issue
Block a user