feat: Kontakt-Ordner mit Drag&Drop Baum (wie KI-Chat Sidebar)

- Backend: ContactFolder model (hierarchisch, parent_id, sort_order)
- Migration 0022: contact_folders Tabelle + folder_id FK auf contacts
- CRUD Routes: /api/v1/contact-folders (list, create, update, delete, reorder)
- Move Contact API: /api/v1/contact-folders/contacts/{id}/move
- folder_id Filter in contacts list API
- Frontend: ContactFolderTree mit Baum-Struktur, Drag&Drop, Kontext-Menü
- Kontakt-Personen-Icon statt Ordner-Symbol
- ContactList Items draggable (List/Table/Cards View)
- React Query Hooks für Folder CRUD + Move Contact
- Alle 266 Frontend-Tests passing
This commit is contained in:
Agent Zero
2026-07-20 01:33:44 +02:00
parent 4bc11efc25
commit 29202325a6
17 changed files with 942 additions and 8 deletions
+9
View File
@@ -53,6 +53,12 @@ export function ContactsListPage() {
return undefined;
}, [selectedFilter]);
// Derive folder filter
const folderId = useMemo(() => {
if (selectedFilter.startsWith('folder:')) return selectedFilter.slice(7);
return undefined;
}, [selectedFilter]);
// Derive tag filter
const tagFilter = useMemo(() => {
if (selectedFilter.startsWith('tag:')) return selectedFilter.slice(4);
@@ -67,6 +73,7 @@ export function ContactsListPage() {
contactType,
sortBy,
sortOrder,
folderId,
);
// Fetch selected contact detail (with contact_persons)
@@ -219,6 +226,7 @@ export function ContactsListPage() {
selectedFilter={selectedFilter}
onSelect={handleSelectFilter}
tags={allTags}
contacts={contacts}
/>
</div>
</ResizablePanel>
@@ -351,6 +359,7 @@ export function ContactsListPage() {
selectedFilter={selectedFilter}
onSelect={handleSelectFilter}
tags={allTags}
contacts={contacts}
/>
</div>
</div>