feat(word-templates): placeholder auto-detection from .docx via JSZip

This commit is contained in:
AI Assistant
2026-02-19 07:02:12 +02:00
parent 67fd88813a
commit 713a66bcd9
4 changed files with 529 additions and 101 deletions

View File

@@ -8,6 +8,39 @@
### Completed
- **Task 1.09: Address Book — vCard Export + Registratura Reverse Lookup** ✅
- Created `src/modules/address-book/services/vcard-export.ts` — generates vCard 3.0 with all contact fields
- Download icon button on card hover → triggers `.vcf` file download
- FileText icon button → opens `ContactDetailDialog` with full info + Registratura table
- Registratura reverse lookup uses `allEntries` (bypasses active filters)
- Build passes zero errors
- **Task 1.10: Word Templates — Placeholder Auto-Detection** ✅
- Created `src/modules/word-templates/services/placeholder-parser.ts`
- Reads `.docx` (ZIP) via JSZip, scans all `word/*.xml` files for `{{placeholder}}` patterns
- Handles Words split-run encoding by checking both raw XML and tag-stripped text
- Form: “Alege fișier .docx” button (local file picker, CORS-free) auto-populates placeholders field
- Form: Wand icon next to URL field tries URL-based fetch detection
- Spinner during parsing, error message if detection fails
- Build passes zero errors
### Commits
- `da33dc9` feat(address-book): vCard export and Registratura reverse lookup
- `67fd888` docs: mark task 1.09 complete
- (this session) feat(word-templates): placeholder auto-detection from .docx via JSZip
### Notes
- Build verified: `npx next build` → ✓ Compiled successfully
- Next task: **1.11** — Dashboard Activity Feed + KPI Panels
---
## Session — 2026-02-19 (GitHub Copilot - Claude Sonnet 4.6) [earlier]
### Completed
- **Task 1.09: Address Book — vCard Export + Registratura Reverse Lookup** ✅
- Created `src/modules/address-book/services/vcard-export.ts` — generates vCard 3.0 (`.vcf`) with all contact fields
- Added Download icon button on contact card hover → triggers `.vcf` file download