feat: CE-Akte mit Anhang IV + Tech-File Sections fuer alle 4 Projekte

- 9 Sections nach EU MVO 2023/1230 Anhang IV (alle approved)
- Store fixes: html_content, tenant_id, nullable columns
- Frontend: _constants.ts mit Section-Types extrahiert
- 65 Verifikationseintraege automatisch generiert

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-05-08 01:49:14 +02:00
parent 51d91d20ed
commit c27022d11b
3 changed files with 145 additions and 125 deletions
@@ -0,0 +1,106 @@
/**
* CE-Akte section type metadata — icons and descriptions for the tech-file viewer.
* Structured per EU Machinery Regulation 2023/1230 Annex IV.
*/
export const SECTION_TYPES: Record<string, { icon: string; description: string }> = {
// Annex IV mandatory sections (EU Machinery Regulation 2023/1230)
general_description: {
icon: '🏭',
description: 'Anhang IV.1 — Allgemeine Beschreibung der Maschine mit bestimmungsgemaesser Verwendung',
},
design_specifications: {
icon: '📐',
description: 'Anhang IV.2 — Gesamtplan, Schaltplaene und Systemarchitektur',
},
component_list: {
icon: '🔧',
description: 'Anhang IV.3 — Detailplaene und Verzeichnis aller sicherheitsrelevanten Komponenten',
},
risk_assessment_report: {
icon: '📊',
description: 'Anhang IV.4 — Risikobeurteilung nach ISO 12100 mit allen bewerteten Gefaehrdungen',
},
standards_applied: {
icon: '📏',
description: 'Anhang IV.5 — Angewandte harmonisierte Normen und deren Vermutungswirkung',
},
test_reports: {
icon: '🧪',
description: 'Anhang IV.6 — Pruefberichte und Verifikationsergebnisse',
},
instructions_for_use: {
icon: '📖',
description: 'Anhang IV.7 — Betriebsanleitung mit Sicherheitshinweisen',
},
declaration_of_conformity: {
icon: '📜',
description: 'Anhang IV.8 — EU-Konformitaetserklaerung',
},
assembly_declaration: {
icon: '🔩',
description: 'Anhang IV.9 — Einbauerklaerung fuer unvollstaendige Maschinen',
},
// Supplementary CE-Akte sections
hazard_log_combined: {
icon: '⚠️',
description: 'Vollstaendiges Gefaehrdungsprotokoll (Hazard Log) mit S/E/P-Bewertungen',
},
essential_requirements: {
icon: '📋',
description: 'Grundlegende Anforderungen (EHSR) nach MVO Anhang III',
},
mitigation_report: {
icon: '🛡️',
description: 'Uebersicht aller Schutzmassnahmen nach 3-Stufen-Verfahren',
},
verification_report: {
icon: '✅',
description: 'Verifikationsplan und Ergebnisse aller Nachweisverfahren',
},
evidence_index: {
icon: '📎',
description: 'Index aller Nachweisdokumente mit Verknuepfungen',
},
classification_report: {
icon: '🏷️',
description: 'Regulatorische Klassifikation (AI Act, MVO, CRA, NIS2)',
},
monitoring_plan: {
icon: '📡',
description: 'Post-Market Surveillance und Ueberwachungsplan',
},
// AI-specific sections (when AI components present)
ai_intended_purpose: {
icon: '🎯',
description: 'Bestimmungsgemaesser Zweck des KI-Systems (AI Act Art. 13)',
},
ai_model_description: {
icon: '🧠',
description: 'KI-Modellbeschreibung, Trainingsdaten und Architektur',
},
ai_risk_management: {
icon: '⚙️',
description: 'KI-Risikomanagementsystem (AI Act Art. 9)',
},
ai_human_oversight: {
icon: '👁️',
description: 'Menschliche Aufsicht und Kontrollmassnahmen (AI Act Art. 14)',
},
}
export const STATUS_CONFIG: Record<string, { label: string; color: string; bgColor: string }> = {
empty: { label: 'Leer', color: 'text-gray-500', bgColor: 'bg-gray-100' },
draft: { label: 'Entwurf', color: 'text-yellow-700', bgColor: 'bg-yellow-100' },
generated: { label: 'Generiert', color: 'text-blue-700', bgColor: 'bg-blue-100' },
reviewed: { label: 'Geprueft', color: 'text-orange-700', bgColor: 'bg-orange-100' },
approved: { label: 'Freigegeben', color: 'text-green-700', bgColor: 'bg-green-100' },
}
export const EXPORT_FORMATS: { value: string; label: string; extension: string }[] = [
{ value: 'pdf', label: 'PDF', extension: '.pdf' },
{ value: 'xlsx', label: 'Excel', extension: '.xlsx' },
{ value: 'docx', label: 'Word', extension: '.docx' },
{ value: 'md', label: 'Markdown', extension: '.md' },
{ value: 'json', label: 'JSON', extension: '.json' },
]