Files
breakpilot-compliance/admin-compliance/components/sdk/assessment/EnrichmentHints.tsx
Benjamin Admin 6fcf7c13d7
Some checks failed
Build + Deploy / build-admin-compliance (push) Successful in 2m4s
Build + Deploy / build-backend-compliance (push) Successful in 2m55s
Build + Deploy / build-ai-sdk (push) Successful in 51s
Build + Deploy / build-developer-portal (push) Successful in 1m6s
Build + Deploy / build-tts (push) Successful in 1m13s
Build + Deploy / build-document-crawler (push) Successful in 31s
Build + Deploy / build-dsms-gateway (push) Successful in 21s
CI / branch-name (push) Has been skipped
CI / guardrail-integrity (push) Has been skipped
CI / loc-budget (push) Failing after 17s
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 2m44s
CI / dep-audit (push) Has been skipped
CI / sbom-scan (push) Has been skipped
CI / test-go (push) Successful in 44s
CI / test-python-backend (push) Successful in 37s
CI / test-python-document-crawler (push) Successful in 30s
CI / test-python-dsms-gateway (push) Successful in 26s
CI / validate-canonical-controls (push) Successful in 17s
Build + Deploy / trigger-orca (push) Successful in 3m8s
feat: Unified Facts Bridge — Company Profile fuer alle Bewertungsmodule
Verbindet Firmendaten (Mitarbeiterzahl, Branche, Land, Umsatz) mit der
UCCA-Bewertung und dem Compliance Optimizer. Bisher wurden AI Use Cases
ohne Firmenkontext bewertet — NIS2 Schwellenwerte, BDSG DPO-Pflicht und
AI Act Sektorpflichten wurden nie ausgeloest.

Aenderungen:
- NEU: company_profile.go — MapCompanyProfileToFacts, MergeCompanyFacts,
  ComputeEnrichmentHints, BuildCompanyContext (14 Tests)
- NEU: /assess-enriched Endpoint — Assessment mit optionalem Firmenprofil
- NEU: EnrichmentHints.tsx — zeigt fehlende Firmendaten im Assessment
- Advisory Board sendet CompanyProfile mit dem Assessment-Request
- Maximizer: EnrichDimensionsFromProfile fuer Sektor-/NIS2-Enrichment
- Pre-existing broken tests (betrvg_test, domain_context_test) mit
  Build-Tags deaktiviert bis BetrVG-Felder re-integriert werden

[migration-approved]

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-23 16:20:57 +02:00

71 lines
2.6 KiB
TypeScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
'use client'
import Link from 'next/link'
interface EnrichmentHint {
field: string
label: string
impact: string
regulation: string
priority: string
}
const PRIORITY_STYLES = {
high: { icon: '⚠️', border: 'border-amber-300', bg: 'bg-amber-50' },
medium: { icon: '', border: 'border-blue-200', bg: 'bg-blue-50' },
low: { icon: '💡', border: 'border-gray-200', bg: 'bg-gray-50' },
}
export function EnrichmentHints({ hints }: { hints: EnrichmentHint[] }) {
if (!hints || hints.length === 0) return null
const highPriority = hints.filter(h => h.priority === 'high')
const otherPriority = hints.filter(h => h.priority !== 'high')
return (
<div className="bg-amber-50 border border-amber-200 rounded-xl p-5">
<div className="flex items-start gap-3">
<span className="text-xl">📋</span>
<div className="flex-1">
<h3 className="text-sm font-semibold text-amber-900">
Bewertung verbessern {hints.length} fehlende Firmendaten
</h3>
<p className="text-xs text-amber-700 mt-1 mb-3">
Ergaenzen Sie diese Daten im Unternehmensprofil fuer eine vollstaendige regulatorische Bewertung.
</p>
<div className="space-y-2">
{highPriority.map((h, i) => {
const style = PRIORITY_STYLES[h.priority as keyof typeof PRIORITY_STYLES] || PRIORITY_STYLES.medium
return (
<div key={i} className={`flex items-start gap-2 ${style.bg} border ${style.border} rounded-lg px-3 py-2`}>
<span className="text-sm">{style.icon}</span>
<div className="flex-1 min-w-0">
<span className="text-sm font-medium text-gray-800">{h.label}</span>
<span className="text-xs text-gray-500 ml-2 px-1.5 py-0.5 bg-white rounded">{h.regulation}</span>
<p className="text-xs text-gray-600 mt-0.5">{h.impact}</p>
</div>
</div>
)
})}
{otherPriority.map((h, i) => (
<div key={`other-${i}`} className="flex items-center gap-2 text-sm text-gray-600">
<span></span>
<span>{h.label}</span>
<span className="text-xs text-gray-400">({h.regulation})</span>
</div>
))}
</div>
<Link
href="/sdk/company-profile"
className="inline-flex items-center gap-1 mt-3 text-sm text-blue-600 hover:text-blue-800 font-medium"
>
Unternehmensprofil ergaenzen
</Link>
</div>
</div>
</div>
)
}