refactor: Remove Modules step, add Regulations card to Dashboard
- Modules step deleted from sdk-steps.ts and SDK Flow (regulations are now shown in Scope-Decision tab with toggles) - Dashboard: "Erkannte Regulierungen" card shows which regulations apply based on Scope-Profiling (DSGVO, AI Act, NIS2, HinSchG) - Dashboard: Amber warning if Scope-Profiling not yet completed - Link to Scope-Decision tab for details & customization Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -141,6 +141,63 @@ export default function SDKDashboard() {
|
|||||||
{/* Industry Presets with Document Preview */}
|
{/* Industry Presets with Document Preview */}
|
||||||
<PresetSection projectId={projectId} />
|
<PresetSection projectId={projectId} />
|
||||||
|
|
||||||
|
{/* Applicable Regulations Card */}
|
||||||
|
{state.complianceScope?.decision && (
|
||||||
|
<div className="bg-white rounded-xl border border-gray-200 p-6">
|
||||||
|
<div className="flex items-center justify-between mb-3">
|
||||||
|
<div className="flex items-center gap-3">
|
||||||
|
<div className="p-2 bg-green-100 rounded-lg">
|
||||||
|
<svg className="w-5 h-5 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" />
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h3 className="font-semibold text-gray-900">Erkannte Regulierungen</h3>
|
||||||
|
<p className="text-xs text-gray-500">Basierend auf Ihrem Scope-Profiling (Level {state.complianceScope.decision.level})</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<Link href={projectId ? `/sdk/compliance-scope?project=${projectId}` : '/sdk/compliance-scope'}
|
||||||
|
className="text-xs text-purple-600 hover:underline">
|
||||||
|
Details & Anpassen
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-wrap gap-2">
|
||||||
|
{(state.complianceScope.decision.requiredDocuments || []).length > 0 ? (
|
||||||
|
['DSGVO', 'AI Act', 'NIS2', 'HinSchG', 'TTDSG'].filter(reg => {
|
||||||
|
const docs = state.complianceScope?.decision?.requiredDocuments || []
|
||||||
|
const triggers = state.complianceScope?.decision?.hardTriggers || []
|
||||||
|
if (reg === 'DSGVO') return true
|
||||||
|
if (reg === 'AI Act') return triggers.some((t: string) => t.toLowerCase().includes('ai') || t.toLowerCase().includes('ki'))
|
||||||
|
if (reg === 'NIS2') return triggers.some((t: string) => t.toLowerCase().includes('nis') || t.toLowerCase().includes('kritisch'))
|
||||||
|
if (reg === 'HinSchG') return triggers.some((t: string) => t.toLowerCase().includes('whistleblower') || t.toLowerCase().includes('hinweis'))
|
||||||
|
return false
|
||||||
|
}).map(reg => (
|
||||||
|
<span key={reg} className="px-3 py-1.5 bg-green-50 text-green-700 border border-green-200 rounded-lg text-sm font-medium">
|
||||||
|
{reg}
|
||||||
|
</span>
|
||||||
|
))
|
||||||
|
) : (
|
||||||
|
<span className="px-3 py-1.5 bg-green-50 text-green-700 border border-green-200 rounded-lg text-sm font-medium">DSGVO</span>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{!state.complianceScope?.decision && (
|
||||||
|
<div className="bg-amber-50 border border-amber-200 rounded-xl p-5 flex items-center gap-4">
|
||||||
|
<div className="p-2 bg-amber-100 rounded-lg flex-shrink-0">
|
||||||
|
<svg className="w-5 h-5 text-amber-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h3 className="font-semibold text-amber-800">Scope-Profiling noch nicht abgeschlossen</h3>
|
||||||
|
<p className="text-sm text-amber-700">
|
||||||
|
Fuehren Sie das <Link href={projectId ? `/sdk/compliance-scope?project=${projectId}` : '/sdk/compliance-scope'} className="underline font-medium">Scope-Profiling</Link> durch um zu erfahren welche Regulierungen fuer Ihr Unternehmen gelten.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* Stats Grid */}
|
{/* Stats Grid */}
|
||||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
|
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
|
||||||
<StatCard title="Gesamtfortschritt" value={`${completionPercentage}%`} subtitle={`${state.completedSteps.length} von ${totalSteps} Schritten`}
|
<StatCard title="Gesamtfortschritt" value={`${completionPercentage}%`} subtitle={`${state.completedSteps.length} von ${totalSteps} Schritten`}
|
||||||
|
|||||||
@@ -124,27 +124,7 @@ export const STEPS_VORBEREITUNG: SDKFlowStep[] = [
|
|||||||
isOptional: false,
|
isOptional: false,
|
||||||
url: '/sdk/screening',
|
url: '/sdk/screening',
|
||||||
},
|
},
|
||||||
{
|
// Modules entfernt — Regulierungen im Scope-Decision-Tab
|
||||||
id: 'modules',
|
|
||||||
name: 'Compliance Modules',
|
|
||||||
nameShort: 'Module',
|
|
||||||
package: 'vorbereitung',
|
|
||||||
seq: 600,
|
|
||||||
checkpointId: 'CP-MOD',
|
|
||||||
checkpointType: 'REQUIRED',
|
|
||||||
checkpointReviewer: 'NONE',
|
|
||||||
description: 'Aktivierung der relevanten Compliance-Module basierend auf Screening-Ergebnissen.',
|
|
||||||
descriptionLong: 'Basierend auf dem Unternehmensprofil und den Screening-Ergebnissen werden die relevanten Compliance-Module aktiviert. Module umfassen z.B. DSGVO-Grundschutz, AI Act, NIS2, ePrivacy, Whistleblower-Richtlinie usw. Die RAG-Collection bp_compliance_gesetze wird verwendet, um aktuelle Gesetzestexte den Modulen zuzuordnen. Nur aktivierte Module erzeugen in den nachfolgenden Schritten Anforderungen, Controls und Dokumentation.',
|
|
||||||
inputs: ['companyProfile', 'screening'],
|
|
||||||
outputs: ['modules'],
|
|
||||||
prerequisiteSteps: ['screening'],
|
|
||||||
dbTables: ['compliance_service_modules', 'sdk_states'],
|
|
||||||
dbMode: 'read/write',
|
|
||||||
ragCollections: ['bp_compliance_gesetze'],
|
|
||||||
ragPurpose: 'Regulierungen den Modulen zuordnen',
|
|
||||||
isOptional: false,
|
|
||||||
url: '/sdk/modules',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: 'source-policy',
|
id: 'source-policy',
|
||||||
name: 'Source Policy',
|
name: 'Source Policy',
|
||||||
|
|||||||
@@ -83,19 +83,7 @@ export const SDK_STEPS: SDKStep[] = [
|
|||||||
checkpointId: 'CP-SCAN',
|
checkpointId: 'CP-SCAN',
|
||||||
prerequisiteSteps: ['use-case-assessment'],
|
prerequisiteSteps: ['use-case-assessment'],
|
||||||
isOptional: true },
|
isOptional: true },
|
||||||
{
|
// Modules entfernt — Regulierungen werden im Scope-Decision-Tab + Dashboard angezeigt
|
||||||
id: 'modules',
|
|
||||||
seq: 600,
|
|
||||||
phase: 1,
|
|
||||||
package: 'vorbereitung',
|
|
||||||
order: 6,
|
|
||||||
name: 'Compliance Modules',
|
|
||||||
nameShort: 'Module',
|
|
||||||
description: 'Manuelle Modul-Verwaltung (Experten)',
|
|
||||||
url: '/sdk/modules',
|
|
||||||
checkpointId: 'CP-MOD',
|
|
||||||
prerequisiteSteps: ['use-case-assessment'],
|
|
||||||
isOptional: true },
|
|
||||||
{
|
{
|
||||||
id: 'source-policy',
|
id: 'source-policy',
|
||||||
seq: 700,
|
seq: 700,
|
||||||
|
|||||||
Reference in New Issue
Block a user