feat(mock): zentrale Mock-API-Struktur eingeführt mit .env-Steuerung

- Mock-API-Endpunkte unter pages/api/mocks/webservice erstellt (JSON-basiert)
- Zentrale Variable NEXT_PUBLIC_USE_MOCKS zur Modussteuerung eingeführt
- fetchGis*-Services rufen je nach Modus reale oder Mockdaten ab
- Alert-Hinweis im UI für aktive Mockumgebung eingebaut
- .env.production sichert produktives Verhalten (Mocks deaktiviert)
- mockData-Verzeichnis via .gitignore vom Repo ausgeschlossen
- appVersion.js auf 1.1.231 erhöht
This commit is contained in:
ISA
2025-06-04 11:18:44 +02:00
parent 569790d35f
commit d80b36cb2d
24 changed files with 202 additions and 2165 deletions

View File

@@ -11,7 +11,7 @@ export const fetchGisSystemStaticService = async () => {
if (useMocks) {
console.log("🧪 Mock-Modus aktiviert: fetchGisSystemStaticService");
const response = await fetch("/mocks/webservice/gisSystemStatic.json");
const response = await fetch("/api/mocks/webservice/gisSystemStatic");
if (!response.ok) {
throw new Error("Mockdaten konnten nicht geladen werden");
}