feat: enhance report management and PDF generation capabilities
- 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:
1 parent
3ab5dae130
commit
ed2b457da3
8 files changed
+918
-493
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user