feat(sprint-5): Phase 2 — React Query API client layer

- @tanstack/react-query with QueryClientProvider in providers/index.tsx
- Typed api-client.ts fetch wrapper with ApiError class + apiDownload
- Service modules: members, distributions, stock, reports, dashboard, portal, staff
- Offline banner component (onlineManager subscription)
- API error boundary with retry button
- Loading skeleton components (card, table, chart, form, dashboard)
- i18n for error/loading states (de/en)
This commit is contained in:
Patrick Plate
2026-06-12 19:59:41 +02:00
parent 279f2f6de0
commit f42c166329
20 changed files with 2875 additions and 7 deletions
+12
View File
@@ -292,5 +292,17 @@
"allMonths": "Alle Monate",
"footerText": "Cannabis-Anbauverein — Sichere Mitgliederverwaltung",
"adminLogin": "Zum Admin-Login"
},
"api": {
"loading": "Wird geladen...",
"error": "Fehler beim Laden der Daten.",
"retry": "Erneut versuchen",
"offline": "Keine Verbindung zum Server — Daten könnten veraltet sein.",
"networkError": "Netzwerkfehler. Bitte prüfe deine Verbindung.",
"unauthorized": "Sitzung abgelaufen. Bitte erneut anmelden.",
"forbidden": "Keine Berechtigung für diese Aktion.",
"notFound": "Ressource nicht gefunden.",
"quotaExceeded": "Kontingent überschritten.",
"serverError": "Serverfehler. Bitte versuche es später erneut."
}
}
+12
View File
@@ -292,5 +292,17 @@
"allMonths": "All months",
"footerText": "Cannabis cultivation club — Secure member management",
"adminLogin": "Go to Admin Login"
},
"api": {
"loading": "Loading...",
"error": "Failed to load data.",
"retry": "Try again",
"offline": "No connection to server — data may be outdated.",
"networkError": "Network error. Please check your connection.",
"unauthorized": "Session expired. Please sign in again.",
"forbidden": "You do not have permission for this action.",
"notFound": "Resource not found.",
"quotaExceeded": "Quota exceeded.",
"serverError": "Server error. Please try again later."
}
}