feat(5.22): Saved Searches / Smart Lists — reusable filters for list views

- SavedFilter model with TenantMixin (name, entity_type, filter_criteria JSONB, user_id)
- Routes: GET/POST /saved-filters, DELETE /saved-filters/{id} with RBAC
- Alembic migration 0029_saved_filters creates saved_filters table
- Frontend: SavedFilters.tsx component with save/load/delete UI
- Frontend: api/savedFilters.ts with React Query hooks
- Integrated into ContactsListPage as example
- i18n keys for savedFilters.* in de.json and en.json
- Tests: test_saved_filters.py (9 tests) + SavedFilters.test.tsx (3 tests)
- Registered SavedFilter in conftest.py
This commit is contained in:
Agent Zero
2026-07-23 23:44:50 +02:00
parent 2c9e74776e
commit 182af355d1
12 changed files with 663 additions and 0 deletions
+2
View File
@@ -48,6 +48,7 @@ from app.routes import (
system_settings,
attachments,
custom_fields,
saved_filters,
)
@@ -306,6 +307,7 @@ def create_app() -> FastAPI:
app.include_router(addresses.router)
app.include_router(audit.router)
app.include_router(custom_fields.router)
app.include_router(saved_filters.router)
# ── Register plugin routes (before SPA catch-all) ──────────────────
registry = get_registry()