feat(registratura): structured ClosureInfo who/when/why/attachment for every close

- Added ClosureInfo type with reason, closedBy, closedAt, linkedEntry, hadActiveDeadlines, attachment
- Rewrote close-guard-dialog into universal close dialog (always shown on close)
  - Reason field (always required)
  - Optional continuation entry search+link
  - Optional closing document attachment (file upload)
  - Active deadlines shown as warning banner when present
- Created ClosureBanner component (read-only, shown at top of closed entry edit)
  - Shows who, when, why, linked entry (clickable), attached doc (downloadable)
- All closes now go through the dialog  no more silent closeEntry
- Linked-entries sub-dialog preserved as second step
This commit is contained in:
AI Assistant
2026-02-27 17:06:03 +02:00
parent 5b99ad0400
commit db6662be39
7 changed files with 539 additions and 258 deletions
@@ -48,6 +48,7 @@ import { DeadlineAddDialog } from "./deadline-add-dialog";
import { DeadlineResolveDialog } from "./deadline-resolve-dialog";
import { QuickContactDialog } from "./quick-contact-dialog";
import { ThreadView } from "./thread-view";
import { ClosureBanner } from "./closure-banner";
import {
createTrackedDeadline,
resolveDeadline as resolveDeadlineFn,
@@ -394,6 +395,15 @@ export function RegistryEntryForm({
return (
<form onSubmit={handleSubmit} className="space-y-4">
{/* Closure info banner (if editing a closed entry) */}
{initial?.closureInfo && (
<ClosureBanner
closureInfo={initial.closureInfo}
allEntries={allEntries}
onNavigateLinked={onNavigateEntry}
/>
)}
{/* Thread view (if editing an entry that's in a thread) */}
{initial &&
allEntries &&