feat: timeline milestones for deadlines, auto-close reply entries, cleanup
- Entry created via "Inchide" flow now gets status "inchis" with closureInfo - New DeadlineTimeline component: main deadlines as cards with progress bar, auto-tracked sub-deadlines as milestone dots on horizontal timeline - Auto-tracked deadlines hidden from dashboard when user deadlines exist - Verification milestone shows "Expirat — nu se mai pot solicita clarificari" - Parent closureInfo now includes linkedEntryId/Number of the closing act - Removed orphaned deadline-table.tsx and use-deadline-filters.ts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -52,6 +52,7 @@ import { findAuthorityForContact } from "../services/authority-catalog";
|
||||
import { computeTransmissionStatus } from "../services/deadline-service";
|
||||
import { StatusMonitorConfig } from "./status-monitor-config";
|
||||
import { FlowDiagram } from "./flow-diagram";
|
||||
import { DeadlineTimeline } from "./deadline-timeline";
|
||||
|
||||
interface RegistryEntryDetailProps {
|
||||
entry: RegistryEntry | null;
|
||||
@@ -584,58 +585,10 @@ export function RegistryEntryDetail({
|
||||
</DetailSection>
|
||||
)}
|
||||
|
||||
{/* ── Legal deadlines ── */}
|
||||
{/* ── Legal deadlines (timeline view) ── */}
|
||||
{(entry.trackedDeadlines ?? []).length > 0 && (
|
||||
<DetailSection
|
||||
title={`Termene legale (${entry.trackedDeadlines!.length})`}
|
||||
>
|
||||
<div className="space-y-2">
|
||||
{entry.trackedDeadlines!.map((dl) => (
|
||||
<div
|
||||
key={dl.id}
|
||||
className={cn(
|
||||
"rounded-md border px-3 py-2 text-xs",
|
||||
dl.resolution === "pending" &&
|
||||
new Date(dl.dueDate) < new Date()
|
||||
? "border-destructive/50 bg-destructive/5"
|
||||
: dl.resolution === "pending"
|
||||
? "border-amber-300 dark:border-amber-700 bg-amber-50/50 dark:bg-amber-950/20"
|
||||
: "border-muted",
|
||||
)}
|
||||
>
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="font-medium">{dl.typeId}</span>
|
||||
<Badge
|
||||
variant="outline"
|
||||
className={cn(
|
||||
"text-[10px]",
|
||||
dl.resolution === "pending" &&
|
||||
"border-amber-400 text-amber-700 dark:text-amber-300",
|
||||
dl.resolution === "completed" &&
|
||||
"border-green-400 text-green-700 dark:text-green-300",
|
||||
)}
|
||||
>
|
||||
{DEADLINE_RES_LABELS[dl.resolution] ?? dl.resolution}
|
||||
</Badge>
|
||||
</div>
|
||||
<div className="flex gap-4 mt-1 text-muted-foreground">
|
||||
<span>
|
||||
<Calendar className="mr-0.5 inline h-2.5 w-2.5" />
|
||||
Start: {formatDate(dl.startDate)}
|
||||
</span>
|
||||
<span>
|
||||
<Clock className="mr-0.5 inline h-2.5 w-2.5" />
|
||||
Scadent: {formatDate(dl.dueDate)}
|
||||
</span>
|
||||
</div>
|
||||
{dl.resolutionNote && (
|
||||
<p className="mt-1 text-muted-foreground">
|
||||
{dl.resolutionNote}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<DetailSection title="Termene legale">
|
||||
<DeadlineTimeline deadlines={entry.trackedDeadlines!} />
|
||||
</DetailSection>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user