Phase 5 Batch 5 Task 5.19: Report Generator Frontend-Oberfläche

- Created frontend/src/api/reports.ts: React Query hooks for templates, presets, generate
- Created frontend/src/pages/Reports.tsx: 3-column layout (template list, editor, generate)
- Preset quick-action buttons with format selection (PDF/Print/CSV/Excel)
- Template editor with Jinja2 code textarea, name, output format selector
- JSON data input for report parameters
- Download history tracking
- Route /reports registered in index.tsx (lazy-loaded)
- i18n keys added to de.json and en.json (reports section + nav.reports)
- 5 frontend tests: page render, template list, new template, select template, download history
- TSC: 0 new errors (2 pre-existing Dms.tsx errors only)
This commit is contained in:
Agent Zero
2026-07-23 23:26:40 +02:00
parent 15f1a57c0f
commit 0ec8502fd4
6 changed files with 783 additions and 2 deletions
+30 -1
View File
@@ -17,7 +17,8 @@
"auditLog": "Audit Log",
"settings": "Settings",
"aiAssistant": "AI Assistant",
"mcpSettings": "MCP Settings"
"mcpSettings": "MCP Settings",
"reports": "Reports"
},
"auth": {
"login": "Sign In",
@@ -967,5 +968,33 @@
"tools": "Tools",
"noTools": "No tools available"
}
},
"reports": {
"title": "Reports",
"presetReports": "Preset Reports",
"templates": "Templates",
"newTemplate": "New Template",
"editTemplate": "Edit Template",
"selectTemplate": "Select a template",
"noTemplates": "No templates yet",
"templateName": "Template name",
"templateContent": "Jinja2 template content (HTML for PDF)",
"templateCreated": "Template created successfully",
"templateUpdated": "Template updated successfully",
"templateDeleted": "Template deleted",
"confirmDelete": "Delete this template?",
"errorNameRequired": "Name is required",
"errorContentRequired": "Template content is required",
"saveFailed": "Failed to save template",
"deleteFailed": "Failed to delete template",
"generate": "Generate",
"generateReport": "Generate Report",
"generated": "Report generated successfully",
"generateFailed": "Failed to generate report",
"jsonData": "Data (JSON)",
"invalidJson": "Invalid JSON data",
"selectTemplateHint": "Select a template from the list",
"downloadHistory": "Download History",
"noDownloads": "No downloads yet"
}
}