Phase 3 (Cookie Banner): Backend + Frontend existierten bereits — keine Aenderungen noetig. Phase 4 (Deadlines): DeadlineTab mit Fristen-Timeline (30 Tage, 4 Erinnerungen, Auto-Sperrung). Backend-Cron in Production via Core. Phase 5 (Public DSR): PublicFormConfig im DSR Settings-Tab — konfigurierbare Anfragetypen, Identitaetspflicht, Embed-Code. Phase 6 (Integrations): IntegrationStubs fuer Matrix, Jitsi, OAuth, 2FA, Notifications — vorbereitet fuer Core-Service-Anbindung. Consent Management: 2 neue Tabs (Fristen, Integrationen). DSR: Settings-Tab mit Public Form statt Platzhalter. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
91 lines
3.8 KiB
TypeScript
91 lines
3.8 KiB
TypeScript
'use client'
|
|
|
|
import Link from 'next/link'
|
|
|
|
interface DeadlineConfig {
|
|
gracePeriodDays: number
|
|
reminderDays: number[]
|
|
suspendOnExpiry: boolean
|
|
}
|
|
|
|
export function DeadlineTab() {
|
|
// Phase 4: Deadline management — backend service pending (Core integration)
|
|
const config: DeadlineConfig = {
|
|
gracePeriodDays: 30,
|
|
reminderDays: [28, 21, 14, 7],
|
|
suspendOnExpiry: true,
|
|
}
|
|
|
|
return (
|
|
<div className="p-6 space-y-6">
|
|
<div className="flex items-center justify-between">
|
|
<h2 className="text-lg font-semibold text-slate-900">Fristen & Erinnerungen</h2>
|
|
<span className="px-2 py-1 bg-yellow-100 text-yellow-700 rounded text-xs">In Vorbereitung</span>
|
|
</div>
|
|
|
|
<div className="bg-blue-50 border border-blue-200 rounded-lg p-4 text-sm text-blue-800">
|
|
Das Fristen-System wird automatisch Erinnerungen an Nutzer senden, die neue Pflichtdokumente
|
|
noch nicht akzeptiert haben. Nach Ablauf der Frist wird der Account gesperrt bis die Zustimmung erfolgt.
|
|
Die E-Mail-Zustellung wird ueber den Core-Service in Production bereitgestellt.
|
|
</div>
|
|
|
|
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
<div className="border border-slate-200 rounded-lg p-4">
|
|
<h3 className="text-sm font-medium text-slate-700">Nachfrist</h3>
|
|
<p className="text-2xl font-bold text-slate-900 mt-1">{config.gracePeriodDays} Tage</p>
|
|
<p className="text-xs text-slate-500 mt-1">Nach Veroeffentlichung eines Pflichtdokuments</p>
|
|
</div>
|
|
<div className="border border-slate-200 rounded-lg p-4">
|
|
<h3 className="text-sm font-medium text-slate-700">Erinnerungen</h3>
|
|
<p className="text-2xl font-bold text-slate-900 mt-1">{config.reminderDays.length}x</p>
|
|
<p className="text-xs text-slate-500 mt-1">
|
|
Tag {config.reminderDays.join(', ')} nach Veroeffentlichung
|
|
</p>
|
|
</div>
|
|
<div className="border border-slate-200 rounded-lg p-4">
|
|
<h3 className="text-sm font-medium text-slate-700">Auto-Sperrung</h3>
|
|
<p className="text-2xl font-bold text-slate-900 mt-1">{config.suspendOnExpiry ? 'Aktiv' : 'Inaktiv'}</p>
|
|
<p className="text-xs text-slate-500 mt-1">Account wird nach Fristablauf gesperrt</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div className="border border-slate-200 rounded-lg p-4">
|
|
<h3 className="text-sm font-medium text-slate-700 mb-3">Erinnerungs-Timeline</h3>
|
|
<div className="flex items-center gap-1">
|
|
{Array.from({ length: 30 }, (_, i) => {
|
|
const day = 30 - i
|
|
const isReminder = config.reminderDays.includes(day)
|
|
const isDeadline = day === 0
|
|
return (
|
|
<div key={i} className="flex-1 relative group">
|
|
<div className={`h-2 rounded-sm ${
|
|
isDeadline ? 'bg-red-500' : isReminder ? 'bg-yellow-400' : 'bg-slate-100'
|
|
}`} />
|
|
{isReminder && (
|
|
<span className="absolute -top-5 left-1/2 -translate-x-1/2 text-[10px] text-yellow-600 whitespace-nowrap">
|
|
Tag {day}
|
|
</span>
|
|
)}
|
|
</div>
|
|
)
|
|
})}
|
|
<div className="flex-none w-3 h-2 bg-red-500 rounded-sm" title="Sperrung" />
|
|
</div>
|
|
<div className="flex justify-between mt-1 text-[10px] text-slate-400">
|
|
<span>Veroeffentlichung</span>
|
|
<span>Sperrung</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div className="flex gap-3">
|
|
<Link href="/sdk/email-templates" className="text-sm text-purple-600 hover:underline">
|
|
E-Mail-Templates konfigurieren →
|
|
</Link>
|
|
<Link href="/sdk/dsr" className="text-sm text-purple-600 hover:underline">
|
|
Betroffenenrechte verwalten →
|
|
</Link>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|