feat: IACE CE-Compliance Module — Normen, Risikobewertung, Production Lines

Major features:
- 215 norms library with section references + Beuth URLs (A/B1/B2/C norms)
- 173 hazard patterns with detail fields (scenario, trigger, harm, zone)
- Deterministic pattern matching: Component × Lifecycle × Pattern cross-product
- SIL/PL auto-calculation from S×E×P risk graph
- Risk assessment table with editable S/E/P dropdowns
- Production Line Dashboard with animated station flow (Running Dots)
- IACE process flow + norms coverage on start page
- Non-blocking cookie banner, ProcessFlow SSR fix
- 104 Playwright E2E tests passing

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-05-07 10:53:26 +02:00
parent 3853a0838a
commit e7f2f98da3
59 changed files with 8326 additions and 525 deletions
@@ -148,9 +148,25 @@ func (h *IACEHandler) ListHazards(c *gin.Context) {
hazards = []iace.Hazard{}
}
// Enrich hazards with latest risk assessment
type enrichedHazard struct {
iace.Hazard
RiskAssessment interface{} `json:"risk_assessment"`
}
enriched := make([]enrichedHazard, len(hazards))
for i, hz := range hazards {
enriched[i] = enrichedHazard{Hazard: hz}
// Get latest assessment for this hazard
assessments, err := h.store.ListAssessments(c.Request.Context(), hz.ID)
if err == nil && len(assessments) > 0 {
enriched[i].RiskAssessment = assessments[len(assessments)-1]
}
}
c.JSON(http.StatusOK, gin.H{
"hazards": hazards,
"total": len(hazards),
"hazards": enriched,
"total": len(enriched),
})
}