'use client' import { useVendorCompliance } from '@/lib/sdk/vendor-compliance' import Link from 'next/link' export default function VendorComplianceDashboard() { const { vendors, processingActivities, contracts, findings, vendorStats, complianceStats, riskOverview, isLoading, } = useVendorCompliance() if (isLoading) { return (
) } return (
{/* Header */}

Vendor & Contract Compliance

Übersicht über Verarbeitungsverzeichnis, Vendor Register und Vertragsprüfung

{/* Quick Stats */}
c.reviewStatus === 'COMPLETED').length} geprüft`} href="/sdk/vendor-compliance/contracts" color="green" />
{/* Risk Overview */}
{/* Vendor Risk Distribution */}

Vendor Risiko-Verteilung

Durchschn. Inherent Risk {Math.round(riskOverview.averageInherentRisk)}%
Durchschn. Residual Risk {Math.round(riskOverview.averageResidualRisk)}%
{/* Compliance Score */}

Compliance Status

{Math.round(complianceStats.averageComplianceScore)}%
{complianceStats.resolvedFindings}
Behoben
{complianceStats.openFindings}
Offen
Control Pass Rate {Math.round(complianceStats.controlPassRate)}%
{/* Quick Actions */}
} /> } /> } />
{/* Recent Activity */}

Fällige Reviews

{vendors .filter((v) => v.nextReviewDate && new Date(v.nextReviewDate) <= new Date()) .slice(0, 5) .map((vendor) => (

{vendor.name}

{vendor.serviceDescription}

Review fällig
))} {vendors.filter((v) => v.nextReviewDate && new Date(v.nextReviewDate) <= new Date()).length === 0 && (
Keine fälligen Reviews
)}
) } function StatCard({ title, value, description, href, color, }: { title: string value: number description: string href: string color: 'blue' | 'purple' | 'green' | 'red' }) { const colors = { blue: 'bg-blue-50 dark:bg-blue-900/20', purple: 'bg-purple-50 dark:bg-purple-900/20', green: 'bg-green-50 dark:bg-green-900/20', red: 'bg-red-50 dark:bg-red-900/20', } return (

{title}

{value}

{description}

) } function RiskBar({ label, count, total, color, }: { label: string count: number total: number color: string }) { const percentage = total > 0 ? (count / total) * 100 : 0 return (
{label} {count}
) } function QuickActionCard({ title, description, href, icon, }: { title: string description: string href: string icon: React.ReactNode }) { return (
{icon}

{title}

{description}

) }