feat(iace): CE-Flag auf Komponenten + AIAG-VDA Action Priority (AP)
Build + Deploy / build-admin-compliance (push) Successful in 1m54s
Build + Deploy / build-backend-compliance (push) Successful in 11s
Build + Deploy / build-ai-sdk (push) Successful in 10s
Build + Deploy / build-developer-portal (push) Successful in 11s
Build + Deploy / build-tts (push) Successful in 12s
Build + Deploy / build-document-crawler (push) Successful in 11s
Build + Deploy / build-dsms-gateway (push) Successful in 11s
Build + Deploy / build-dsms-node (push) Successful in 12s
CI / branch-name (push) Has been skipped
CI / guardrail-integrity (push) Has been skipped
CI / loc-budget (push) Failing after 15s
CI / secret-scan (push) Has been skipped
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / nodejs-build (push) Successful in 2m25s
CI / dep-audit (push) Has been skipped
CI / sbom-scan (push) Has been skipped
CI / test-go (push) Successful in 41s
CI / test-python-backend (push) Successful in 37s
CI / test-python-document-crawler (push) Successful in 25s
CI / test-python-dsms-gateway (push) Successful in 21s
CI / validate-canonical-controls (push) Successful in 14s
Build + Deploy / trigger-orca (push) Successful in 2m14s
Build + Deploy / build-admin-compliance (push) Successful in 1m54s
Build + Deploy / build-backend-compliance (push) Successful in 11s
Build + Deploy / build-ai-sdk (push) Successful in 10s
Build + Deploy / build-developer-portal (push) Successful in 11s
Build + Deploy / build-tts (push) Successful in 12s
Build + Deploy / build-document-crawler (push) Successful in 11s
Build + Deploy / build-dsms-gateway (push) Successful in 11s
Build + Deploy / build-dsms-node (push) Successful in 12s
CI / branch-name (push) Has been skipped
CI / guardrail-integrity (push) Has been skipped
CI / loc-budget (push) Failing after 15s
CI / secret-scan (push) Has been skipped
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / nodejs-build (push) Successful in 2m25s
CI / dep-audit (push) Has been skipped
CI / sbom-scan (push) Has been skipped
CI / test-go (push) Successful in 41s
CI / test-python-backend (push) Successful in 37s
CI / test-python-document-crawler (push) Successful in 25s
CI / test-python-dsms-gateway (push) Successful in 21s
CI / validate-canonical-controls (push) Successful in 14s
Build + Deploy / trigger-orca (push) Successful in 2m14s
CE-Flag: - Toggle "Bereits CE-gekennzeichnet" im ComponentForm - ce_marked Boolean auf Component (via metadata JSONB, kein DB-Change) - Hinweis "(Nur Schnittstellen bewerten)" im Formular AIAG-VDA Action Priority: - CalculateAP(S,O,D) → H/M/L nach AIAG-VDA FMEA Handbuch 2019 - AP-Spalte in FMEA-Worksheet: H=rot, M=gelb, L=grün - Ergänzt (nicht ersetzt) die bestehende RPZ-Berechnung Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,7 @@ export function ComponentForm({
|
||||
version: initialData?.version || '',
|
||||
description: initialData?.description || '',
|
||||
safety_relevant: initialData?.safety_relevant || false,
|
||||
ce_marked: initialData?.ce_marked || false,
|
||||
parent_id: parentId || initialData?.parent_id || null,
|
||||
})
|
||||
|
||||
@@ -73,6 +74,19 @@ export function ComponentForm({
|
||||
</label>
|
||||
<span className="text-sm text-gray-700 dark:text-gray-300">Sicherheitsrelevant</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-3 pt-6">
|
||||
<label className="relative inline-flex items-center cursor-pointer">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={formData.ce_marked}
|
||||
onChange={(e) => setFormData({ ...formData, ce_marked: e.target.checked })}
|
||||
className="sr-only peer"
|
||||
/>
|
||||
<div className="w-9 h-5 bg-gray-200 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-green-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-green-500" />
|
||||
</label>
|
||||
<span className="text-sm text-gray-700 dark:text-gray-300">Bereits CE-gekennzeichnet</span>
|
||||
<span className="text-[10px] text-gray-400">(Nur Schnittstellen bewerten)</span>
|
||||
</div>
|
||||
<div className="md:col-span-2">
|
||||
<label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">Beschreibung</label>
|
||||
<textarea
|
||||
|
||||
@@ -5,10 +5,12 @@ export interface Component {
|
||||
version: string
|
||||
description: string
|
||||
safety_relevant: boolean
|
||||
ce_marked?: boolean
|
||||
parent_id: string | null
|
||||
children: Component[]
|
||||
library_component_id?: string
|
||||
energy_source_ids?: string[]
|
||||
metadata?: Record<string, unknown>
|
||||
}
|
||||
|
||||
export interface LibraryComponent {
|
||||
@@ -41,6 +43,7 @@ export interface ComponentFormData {
|
||||
version: string
|
||||
description: string
|
||||
safety_relevant: boolean
|
||||
ce_marked: boolean
|
||||
parent_id: string | null
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,15 @@ export interface FMEARow {
|
||||
occurrence: number
|
||||
detection: number
|
||||
rpz: number
|
||||
ap: 'H' | 'M' | 'L'
|
||||
}
|
||||
|
||||
/** AIAG-VDA Action Priority (2019 Handbook) */
|
||||
export function calculateAP(s: number, o: number, d: number): 'H' | 'M' | 'L' {
|
||||
if (s >= 9) return (o >= 4 || d >= 7) ? 'H' : (o >= 2 || d >= 5) ? 'M' : 'L'
|
||||
if (s >= 7) return (o >= 5 || d >= 8) ? 'H' : (o >= 3 || d >= 5) ? 'M' : 'L'
|
||||
if (s >= 5) return (o >= 7 || d >= 9) ? 'H' : (o >= 4 || d >= 7) ? 'M' : 'L'
|
||||
return (o >= 8 && d >= 9) ? 'H' : (o >= 6 || d >= 8) ? 'M' : 'L'
|
||||
}
|
||||
|
||||
export function useFMEA(projectId: string) {
|
||||
@@ -99,6 +108,7 @@ export function useFMEA(projectId: string) {
|
||||
occurrence: o,
|
||||
detection: d,
|
||||
rpz: s * o * d,
|
||||
ap: calculateAP(s, o, d),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,6 +79,7 @@ export default function FMEAPage() {
|
||||
<th className="px-3 py-2.5 text-center text-xs font-medium text-gray-500 uppercase w-12">O</th>
|
||||
<th className="px-3 py-2.5 text-center text-xs font-medium text-gray-500 uppercase w-12">D</th>
|
||||
<th className="px-3 py-2.5 text-center text-xs font-medium text-gray-500 uppercase w-16">RPZ</th>
|
||||
<th className="px-3 py-2.5 text-center text-xs font-medium text-gray-500 uppercase w-12">AP</th>
|
||||
<th className="px-3 py-2.5 text-left text-xs font-medium text-gray-500 uppercase">Bewertung</th>
|
||||
<th className="px-3 py-2.5 text-left text-xs font-medium text-gray-500 uppercase">Erkennung</th>
|
||||
</tr>
|
||||
@@ -121,6 +122,15 @@ function FMEATableRow({ row }: { row: FMEARow }) {
|
||||
{row.rpz}
|
||||
</span>
|
||||
</td>
|
||||
<td className="px-3 py-2.5 text-center">
|
||||
<span className={`inline-flex items-center px-2 py-1 rounded text-xs font-bold ${
|
||||
row.ap === 'H' ? 'bg-red-600 text-white' :
|
||||
row.ap === 'M' ? 'bg-yellow-500 text-white' :
|
||||
'bg-green-500 text-white'
|
||||
}`}>
|
||||
{row.ap}
|
||||
</span>
|
||||
</td>
|
||||
<td className="px-3 py-2.5">
|
||||
<span className={`text-xs px-2 py-0.5 rounded-full ${color}`}>{rpzLabel(row.rpz)}</span>
|
||||
</td>
|
||||
|
||||
@@ -115,6 +115,52 @@ func (fm *FailureModeEntry) CalculateRPZ() int {
|
||||
// RPZThresholdAction is the RPZ value above which corrective action is required.
|
||||
const RPZThresholdAction = 100
|
||||
|
||||
// CalculateAP computes the AIAG-VDA Action Priority (H/M/L).
|
||||
// Replaces pure RPN/RPZ with a 3D severity-occurrence-detection priority matrix
|
||||
// per the AIAG-VDA FMEA Handbook (2019). Returns "H", "M", or "L".
|
||||
func CalculateAP(s, o, d int) string {
|
||||
if s >= 9 {
|
||||
if o >= 4 || d >= 7 {
|
||||
return "H"
|
||||
}
|
||||
if o >= 2 || d >= 5 {
|
||||
return "M"
|
||||
}
|
||||
return "L"
|
||||
}
|
||||
if s >= 7 {
|
||||
if o >= 5 || d >= 8 {
|
||||
return "H"
|
||||
}
|
||||
if o >= 3 || d >= 5 {
|
||||
return "M"
|
||||
}
|
||||
return "L"
|
||||
}
|
||||
if s >= 5 {
|
||||
if o >= 7 || d >= 9 {
|
||||
return "H"
|
||||
}
|
||||
if o >= 4 || d >= 7 {
|
||||
return "M"
|
||||
}
|
||||
return "L"
|
||||
}
|
||||
// S < 5
|
||||
if o >= 8 && d >= 9 {
|
||||
return "H"
|
||||
}
|
||||
if o >= 6 || d >= 8 {
|
||||
return "M"
|
||||
}
|
||||
return "L"
|
||||
}
|
||||
|
||||
// CalculateAPForFM computes AP for a FailureModeEntry.
|
||||
func (fm *FailureModeEntry) CalculateAPForFM() string {
|
||||
return CalculateAP(fm.DefaultSeverity, fm.DefaultOccurrence, fm.DefaultDetection)
|
||||
}
|
||||
|
||||
// AssessmentType represents the type of risk assessment
|
||||
type AssessmentType string
|
||||
|
||||
|
||||
Reference in New Issue
Block a user