feat(registratura): fix thread clear, close via conex entry

- Fix threadParentId clear: always show "Sterge" button even when parent not found in allEntries
- Bigger clear button with text label instead of tiny X icon
- Fallback display when parent not in current list (shows truncated ID)
- Close via conex: table/detail "Inchide" now creates a new reply entry that closes the original
- Header shows "Conex la BTG-XXX" + "Inchide originala" badge when closing via conex
- After saving the new conex entry, parent is auto-closed with resolution "finalizat"
- onClose signature changed from (id: string) to (entry: RegistryEntry) across table + detail

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
AI Assistant
2026-03-10 21:15:40 +02:00
parent f5e19ce3d1
commit 85077251f3
4 changed files with 68 additions and 21 deletions
@@ -40,7 +40,7 @@ interface RegistryTableProps {
onView: (entry: RegistryEntry) => void;
onEdit: (entry: RegistryEntry) => void;
onDelete: (id: string) => void;
onClose: (id: string) => void;
onClose: (entry: RegistryEntry) => void;
/** Create a new entry linked as reply (conex) to this entry */
onReply?: (entry: RegistryEntry) => void;
}
@@ -495,7 +495,7 @@ export function RegistryTable({
className="h-7 w-7 text-green-600"
onClick={(e) => {
e.stopPropagation();
onClose(entry.id);
onClose(entry);
}}
title="Inchide"
>