feat(registratura): 3.02 bidirectional integration, simplified status, threads
- Dynamic document types: string-based DocumentType synced with Tag Manager (new types auto-create tags under 'document-type' category) - Added default types: 'Apel telefonic', 'Videoconferinta' - Bidirectional Address Book: quick-create contacts from sender/recipient/ assignee fields via QuickContactDialog popup - Simplified status: Switch toggle replaces dropdown (default open) - Responsabil (Assignee) field with contact autocomplete (ERP-ready) - Entry threads: threadParentId links entries as replies, ThreadView shows parent/current/children tree with branching support - Info tooltips on deadline, status, and assignee fields - New Resp. column and thread icon in registry table - All changes backward-compatible with existing data
This commit is contained in:
@@ -4,6 +4,45 @@
|
||||
|
||||
---
|
||||
|
||||
## Session — 2026-02-27 night (GitHub Copilot - Claude Opus 4.6)
|
||||
|
||||
### Context
|
||||
|
||||
Continued Phase 3 refinements. Picked task 3.02 (HEAVY) — Registratura bidirectional integration and UX improvements.
|
||||
|
||||
### Completed
|
||||
|
||||
- **3.02 ✅ Registratura — Integrare și UX:**
|
||||
- **Dynamic document types:** DocumentType changed from enum to string-based. Default types include "Apel telefonic" and "Videoconferință". Inline "Tip nou" input with Plus button auto-creates Tag Manager tags under category "document-type". Form select pulls from both defaults and Tag Manager.
|
||||
- **Bidirectional Address Book:** Sender/Recipient/Assignee autocomplete shows "Creează contact" button when typed name doesn't match any existing contact. QuickContactDialog popup creates contact in Address Book with Name (required), Phone (optional), Email (optional).
|
||||
- **Simplified status:** Removed Status dropdown. Replaced with Switch toggle — default is "Deschis" (open). Toggle to "Închis" when done. No "deschis" option in UI, everything is implicitly open.
|
||||
- **Internal deadline tooltip:** Added Info icon tooltips on "Termen limită intern" (explaining it's not a legal deadline), "Închis" (explaining default behavior), and "Responsabil" (explaining ERP prep).
|
||||
- **Responsabil (Assignee) field:** New field with contact autocomplete + quick-create. Separate `assignee` and `assigneeContactId` on RegistryEntry type. Shown in registry table as "Resp." column with User icon.
|
||||
- **Entry threads & branching:** New `threadParentId` field on RegistryEntry. Thread parent selector with search. ThreadView component showing parent → current → children tree with direction badges, siblings (branches), and click-to-navigate. Thread icon (GitBranch) in registry table. Supports one-to-many branching (one entry generates multiple outgoing replies).
|
||||
|
||||
### Files Created
|
||||
|
||||
- `src/modules/registratura/components/quick-contact-dialog.tsx` — Rapid contact creation popup from Registratura
|
||||
- `src/modules/registratura/components/thread-view.tsx` — Thread tree visualization (parent, current, siblings, children)
|
||||
|
||||
### Files Modified
|
||||
|
||||
- `src/modules/registratura/types.ts` — Dynamic DocumentType, DEFAULT_DOC_TYPE_LABELS, new fields (assignee, assigneeContactId, threadParentId)
|
||||
- `src/modules/registratura/index.ts` — Export new constants
|
||||
- `src/modules/registratura/components/registry-entry-form.tsx` — Complete rewrite: dynamic doc types, contact quick-create, Switch status, Responsabil field, thread parent selector, tooltips
|
||||
- `src/modules/registratura/components/registratura-module.tsx` — Wired useTags + useContacts, handleCreateContact + handleCreateDocType callbacks, thread navigation
|
||||
- `src/modules/registratura/components/registry-table.tsx` — Dynamic doc type labels, Resp. column, thread icon
|
||||
- `src/modules/registratura/components/registry-filters.tsx` — Uses DEFAULT_DOC_TYPE_LABELS from types.ts
|
||||
- `ROADMAP.md` — Marked 3.02 as done
|
||||
|
||||
### Notes
|
||||
|
||||
- Existing data is backward-compatible: old entries without `assignee`, `threadParentId` render fine (fields are optional)
|
||||
- Quick contact creation sets type to "collaborator" and adds note "Creat automat din Registratură"
|
||||
- DocumentType is now `string` but retains defaults via `DEFAULT_DOCUMENT_TYPES` array
|
||||
|
||||
---
|
||||
|
||||
## Session — 2026-02-27 evening (GitHub Copilot - Claude Opus 4.6)
|
||||
|
||||
### Context
|
||||
|
||||
Reference in New Issue
Block a user