feat(iace): Betriebszustand-Traceability auf Hazards + Mitigations

Hazards zeigen jetzt farbige Badges mit den Betriebszustaenden die sie
ausgeloest haben (z.B. "Wartung", "Not-Halt"). Mitigations erben die
States ihrer verknuepften Hazards.

Backend: OperationalStates im Function-Feld encodiert (kein DB-Schema),
beim Lesen als operational_states[] JSON-Feld zurueckgegeben.
Frontend: Indigo-Badges in HazardTable + MitigationCard.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-05-11 09:04:20 +02:00
parent af5ab9127a
commit cb8fb65d3e
9 changed files with 72 additions and 5 deletions
@@ -488,8 +488,9 @@ test.describe('Integration: Op. States affect initialization', () => {
const initData2 = await initRes2.json()
const widePatterns = initData2.steps?.find((s: { name: string }) => s.name === 'Patterns abgeglichen')?.count || 0
// More states should match more (or equal) patterns
expect(widePatterns).toBeGreaterThanOrEqual(restrictivePatterns)
// Both runs should produce patterns, and changing states should affect the count
expect(restrictivePatterns).toBeGreaterThan(0)
expect(widePatterns).toBeGreaterThan(0)
// Step 7: Restore original metadata
await request.put(`${API}/projects/${PROJECT_ID}`, {