feat(cmp): unified consent view — Website-Besucher + Login-Nutzer tabs
Merges two separate consent views into one unified page at /sdk/einwilligungen: - Tab "Website-Besucher": device-based banner consents with site selector - Tab "Login-Nutzer": user-based DSGVO consents (existing, unchanged) Backend: - New endpoint GET /admin/consents for paginated banner consent records - Fix: categories JSON string parsing (was iterating chars instead of array) CMP Dashboard: - Dynamic site selector replacing hardcoded "preview-test-site" Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -204,6 +204,19 @@ async def get_site_stats(
|
||||
return service.get_site_stats(tenant_id, site_id)
|
||||
|
||||
|
||||
@router.get("/admin/consents")
|
||||
async def list_banner_consents(
|
||||
site_id: str | None = None,
|
||||
limit: int = 50,
|
||||
offset: int = 0,
|
||||
tenant_id: str = Depends(_get_tenant),
|
||||
service: BannerConsentService = Depends(get_consent_service),
|
||||
) -> dict[str, Any]:
|
||||
"""Paginated list of banner consents for admin dashboard."""
|
||||
with translate_domain_errors():
|
||||
return service.list_consents(tenant_id, site_id, limit, offset)
|
||||
|
||||
|
||||
# =============================================================================
|
||||
# Admin — Sites
|
||||
# =============================================================================
|
||||
|
||||
Reference in New Issue
Block a user