feat: enhance report management and PDF generation capabilities
Deploy Development / deploy (push) Successful in 1m5s
Build Test / pytest-backend (push) Successful in 4s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 20s

- Introduced new API endpoints for managing report definitions, including listing, creating, and updating reports.
- Updated the frontend to include a dedicated section for configuring reports, enhancing user navigation and experience.
- Modified existing components to link to the new report settings, ensuring seamless access to report functionalities.
- Improved the report catalog API to support multiple definitions per profile and added validation for report limits.
- Updated documentation and tests to reflect the new features and ensure proper functionality.
This commit is contained in:
Lars committed 2026-04-29 12:11:26 +02:00
1 parent 3ab5dae130
commit ed2b457da3
8 files changed
+918 -493

No files matched your search

+12 -5
View File
@@ -268,11 +268,18 @@ export const api = {
// Strukturierter PDF-Bericht (Profil v1, unabhängig vom Dashboard)
getReportsCatalog: () => req('/reports/catalog'),
getReportProfile: () => req('/reports/profile'),
putReportProfile: (profile) => req('/reports/profile', jput(profile)),
resetReportProfile: () => req('/reports/profile', { method: 'DELETE' }),
generateStructuredReportPdf: async () => {
const res = await fetch(`${BASE}/reports/generate-pdf`, { method: 'POST', headers: hdrs() })
listReportDefinitions: () => req('/reports/definitions'),
createReportDefinition: (body) => req('/reports/definitions', json(body ?? {})),
updateReportDefinition: (id, body) =>
req(`/reports/definitions/${encodeURIComponent(id)}`, jput(body)),
deleteReportDefinition: (id) =>
req(`/reports/definitions/${encodeURIComponent(id)}`, { method: 'DELETE' }),
generateStructuredReportPdf: async (definitionId) => {
const res = await fetch(`${BASE}/reports/generate-pdf`, {
method: 'POST',
headers: { ...hdrs(), 'Content-Type': 'application/json' },
body: JSON.stringify(definitionId ? { definition_id: definitionId } : {}),
})
if (!res.ok) {
let msg = `HTTP ${res.status}`
try {