feat(registratura): add legal deadline tracking system (Termene Legale)

Full deadline tracking engine for Romanian construction permitting:
- 16 deadline types across 5 categories (Avize, Completări, Analiză, Autorizare, Publicitate)
- Working days vs calendar days with Romanian public holidays (Orthodox Easter via Meeus)
- Backward deadlines (AC extension: 45 working days BEFORE expiry)
- Chain deadlines (resolving one prompts adding the next)
- Tacit approval auto-detection (overdue + applicable type)
- Tabbed UI: Registru + Termene legale dashboard with stats/filters/table
- Inline deadline cards in entry form with add/resolve/remove
- Clock icon + count badge on registry table for entries with deadlines

Also adds CLAUDE.md with full project context for AI assistant handoff.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Marius Tarau
2026-02-18 11:27:34 +02:00
parent f0b878cf00
commit bb01268bcb
16 changed files with 1818 additions and 96 deletions
@@ -1,6 +1,6 @@
'use client';
import { Pencil, Trash2, CheckCircle2, Link2 } from 'lucide-react';
import { Pencil, Trash2, CheckCircle2, Link2, Clock } from 'lucide-react';
import { Button } from '@/shared/components/ui/button';
import { Badge } from '@/shared/components/ui/badge';
import type { RegistryEntry, DocumentType } from '../types';
@@ -100,6 +100,12 @@ export function RegistryTable({ entries, loading, onEdit, onDelete, onClose }: R
{entry.attachments.length} fișiere
</Badge>
)}
{(entry.trackedDeadlines ?? []).length > 0 && (
<Badge variant="outline" className="ml-1 text-[10px] px-1">
<Clock className="mr-0.5 inline h-2.5 w-2.5" />
{(entry.trackedDeadlines ?? []).length}
</Badge>
)}
</td>
<td className="px-3 py-2 max-w-[130px] truncate">{entry.sender}</td>
<td className="px-3 py-2 max-w-[130px] truncate">{entry.recipient}</td>