Merge remote gitea/main — resolve conflicts keeping local (origin) state
Build + Deploy / build-admin-compliance (push) Successful in 2m29s
Build + Deploy / build-backend-compliance (push) Successful in 3m23s
Build + Deploy / build-ai-sdk (push) Failing after 47s
Build + Deploy / build-developer-portal (push) Successful in 1m19s
Build + Deploy / build-tts (push) Failing after 1m29s
Build + Deploy / build-document-crawler (push) Successful in 43s
Build + Deploy / build-dsms-gateway (push) Successful in 25s
Build + Deploy / build-dsms-node (push) Successful in 11s
CI / branch-name (push) Has been skipped
Build + Deploy / trigger-orca (push) Has been skipped
CI / guardrail-integrity (push) Has been skipped
CI / loc-budget (push) Failing after 18s
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 3m17s
CI / dep-audit (push) Has been skipped
CI / sbom-scan (push) Has been skipped
CI / test-go (push) Failing after 48s
CI / test-python-backend (push) Successful in 42s
CI / test-python-document-crawler (push) Successful in 31s
CI / test-python-dsms-gateway (push) Successful in 26s
CI / validate-canonical-controls (push) Successful in 18s

Local origin is 20+ commits ahead of remote gitea. All conflicts
resolved by keeping HEAD (our version) which includes the full
56→138 check expansion and doc_checks package split.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-05-07 12:40:23 +02:00
7 changed files with 411 additions and 183 deletions
@@ -36,6 +36,9 @@ export function SuggestedNorms({ projectId }: { projectId: string }) {
const [data, setData] = useState<NormResult | null>(null)
const [loading, setLoading] = useState(true)
const [collapsed, setCollapsed] = useState(false)
const [customNorms, setCustomNorms] = useState<Array<{ number: string; title: string }>>([])
const [customNormNumber, setCustomNormNumber] = useState('')
const [customNormTitle, setCustomNormTitle] = useState('')
useEffect(() => {
fetch(`/api/sdk/v1/iace/projects/${projectId}/suggested-norms`)
@@ -72,9 +75,11 @@ export function SuggestedNorms({ projectId }: { projectId: string }) {
</p>
</div>
</div>
<svg className={`w-5 h-5 text-gray-400 transition-transform ${collapsed ? '' : 'rotate-180'}`} fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 9l-7 7-7-7" />
</svg>
<div className="w-8 h-8 flex items-center justify-center rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors flex-shrink-0">
<svg className={`w-5 h-5 text-gray-400 transition-transform ${collapsed ? '' : 'rotate-180'}`} fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 9l-7 7-7-7" />
</svg>
</div>
</button>
{!collapsed && (
@@ -126,11 +131,62 @@ export function SuggestedNorms({ projectId }: { projectId: string }) {
)
})}
{/* Disclaimer */}
<div className="p-3 rounded-lg bg-amber-50 border border-amber-200 text-xs text-amber-800">
<strong>Hinweis:</strong> Diese Normenvorschlaege basieren auf dem Maschinentyp und den identifizierten
Gefaehrdungen. Der CE-Fachmann muss die Anwendbarkeit pruefen und ggf. weitere Normen ergaenzen.
Nur Normennummern und -titel werden angezeigt der Normtext muss separat beschafft werden (z.B. ueber Beuth/DIN).
{/* Add custom norm */}
<div className="p-3 rounded-lg bg-gray-50 dark:bg-gray-700/50 border border-gray-200 dark:border-gray-600">
<p className="text-xs font-medium text-gray-700 dark:text-gray-300 mb-2">Weitere Norm ergaenzen</p>
<div className="flex gap-2">
<input
type="text" placeholder="z.B. ISO 13857:2019"
value={customNormNumber} onChange={(e) => setCustomNormNumber(e.target.value)}
className="flex-1 px-3 py-1.5 text-xs border border-gray-300 rounded-lg focus:ring-1 focus:ring-purple-400 dark:bg-gray-700 dark:border-gray-600 dark:text-white"
/>
<input
type="text" placeholder="Titel (optional)"
value={customNormTitle} onChange={(e) => setCustomNormTitle(e.target.value)}
className="flex-1 px-3 py-1.5 text-xs border border-gray-300 rounded-lg focus:ring-1 focus:ring-purple-400 dark:bg-gray-700 dark:border-gray-600 dark:text-white"
/>
<button
onClick={() => {
if (customNormNumber.trim()) {
setCustomNorms((prev) => [...prev, { number: customNormNumber.trim(), title: customNormTitle.trim() }])
setCustomNormNumber('')
setCustomNormTitle('')
}
}}
disabled={!customNormNumber.trim()}
className="px-3 py-1.5 text-xs bg-purple-600 text-white rounded-lg hover:bg-purple-700 disabled:bg-gray-300 disabled:cursor-not-allowed transition-colors"
>
+ Hinzufuegen
</button>
</div>
{customNorms.length > 0 && (
<div className="mt-2 space-y-1">
{customNorms.map((cn, i) => (
<div key={i} className="flex items-center gap-2 text-xs">
<span className="font-mono font-semibold text-gray-800 dark:text-gray-200">{cn.number}</span>
{cn.title && <span className="text-gray-500"> {cn.title}</span>}
<span className="px-1.5 py-0.5 bg-blue-100 text-blue-700 rounded text-xs">Manuell</span>
<button onClick={() => setCustomNorms((prev) => prev.filter((_, j) => j !== i))} className="text-red-400 hover:text-red-600">
<svg className="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" /></svg>
</button>
</div>
))}
</div>
)}
</div>
{/* Pflicht-Erklärung + Disclaimer */}
<div className="space-y-2 text-xs">
<div className="p-3 rounded-lg bg-red-50 border border-red-200 text-red-800">
<strong>Pflicht</strong> bedeutet: Diese Norm ist fuer diesen Maschinentyp typischerweise zwingend anzuwenden
(z.B. ISO 12100 fuer alle Maschinen, EN 692 fuer mechanische Pressen). Die Anwendung harmonisierter Normen
erzeugt eine Konformitaetsvermutung.
</div>
<div className="p-3 rounded-lg bg-amber-50 border border-amber-200 text-amber-800">
<strong>Hinweis:</strong> Diese Normenvorschlaege basieren auf dem Maschinentyp und den identifizierten
Gefaehrdungen. Der CE-Fachmann muss die Anwendbarkeit pruefen und ggf. weitere Normen ueber das Feld oben ergaenzen.
Normtexte muessen separat beschafft werden (z.B. ueber <a href="https://www.beuth.de" target="_blank" rel="noopener noreferrer" className="underline font-medium">beuth.de</a>).
</div>
</div>
</div>
)}