feat(ai-sdk): order the hazard log by ISO 12100 hazard group
ListHazards returned hazards in pattern-firing order, which reads as a jumble. Sort by EN ISO 12100 hazard group (A. Mechanisch, B. Elektrisch, C. Thermisch, D. Pneumatik/Hydraulik, E. Laerm, F. Ergonomie, G. Stoffe, H. Software/Steuerung, I. Cyber, J. KI), stable within a group. Matches the frontend CATEGORY_LABELS. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -160,6 +160,7 @@ func (s *Store) ListHazards(ctx context.Context, projectID uuid.UUID) ([]Hazard,
|
||||
hazards = append(hazards, h)
|
||||
}
|
||||
|
||||
SortHazardsByISO12100(hazards)
|
||||
return hazards, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user