feat: inline resolve for sub-deadlines + milestone date tooltips

- DeadlineTimeline gains onResolveInline callback prop
- Milestone labels show small green checkmark button for resolvable items
- Clicking opens inline text input (motiv + OK/Cancel, Enter/Escape)
- RegistryEntryDetail wires resolve via onResolveDeadline prop
- Milestone date labels show "Data maximă: ..." on hover
- Auto-refreshes viewed entry after inline resolve

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
AI Assistant
2026-03-12 19:27:03 +02:00
parent 0f928b08e9
commit 55c807dd1b
3 changed files with 138 additions and 44 deletions
@@ -63,6 +63,8 @@ interface RegistryEntryDetailProps {
onDelete: (id: string) => void;
/** Create a new entry linked as reply (conex) to this entry */
onReply?: (entry: RegistryEntry) => void;
/** Resolve a tracked deadline inline */
onResolveDeadline?: (entryId: string, deadlineId: string, resolution: string, note: string) => void;
allEntries: RegistryEntry[];
}
@@ -152,6 +154,7 @@ export function RegistryEntryDetail({
onClose,
onDelete,
onReply,
onResolveDeadline,
allEntries,
}: RegistryEntryDetailProps) {
const [previewIndex, setPreviewIndex] = useState<number | null>(null);
@@ -595,7 +598,12 @@ export function RegistryEntryDetail({
{/* ── Legal deadlines (timeline view) ── */}
{(entry.trackedDeadlines ?? []).length > 0 && (
<DetailSection title="Termene legale">
<DeadlineTimeline deadlines={entry.trackedDeadlines!} />
<DeadlineTimeline
deadlines={entry.trackedDeadlines!}
onResolveInline={onResolveDeadline ? (deadlineId, note) => {
onResolveDeadline(entry.id, deadlineId, "completed", note);
} : undefined}
/>
</DetailSection>
)}