modcomms/backend/app
Vadym Samoilenko 447c4b2a95 Add CSV export of campaign data for super_admin and oversight_admin
Adds a server-side CSV export covering all campaign, proof, and version
data including agent RAG statuses. The export respects the active agency
filter so oversight admins can scope the download to a single agency.

- backend: `CampaignRepository.get_export_rows()` — flat join across
  Campaign → Proof → ProofVersion with Agency and User, extracts agent
  RAG statuses from the `agent_review` JSONB column
- backend: `GET /api/export/campaigns-csv` endpoint gated to
  super_admin / oversight_admin, streams a dated CSV file
- frontend: `apiService.downloadCampaignsCsv(agencyId?)` — fetches blob
  and triggers browser download
- frontend: threads `selectedAgencyId` prop from App → Campaigns →
  CampaignList so the export uses the active filter
- frontend: Export CSV button in CampaignList header, visible only to
  super_admin / oversight_admin, with spinner while downloading

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 11:35:24 +00:00
..
agents Add toast notification when primary Gemini model falls back to backup 2026-03-02 13:00:12 +00:00
api Add CSV export of campaign data for super_admin and oversight_admin 2026-03-19 11:35:24 +00:00
dependencies Fix email resolution from Azure AD token claims 2026-03-03 15:55:00 +00:00
models Fix KB distillation fallback and SpecVersion type annotation 2026-03-16 14:03:25 +00:00
repositories Add CSV export of campaign data for super_admin and oversight_admin 2026-03-19 11:35:24 +00:00
services Switch primary model to Pro, Flash as fallback 2026-03-18 15:37:56 +00:00
__init__.py permissions changes 2025-12-18 16:51:27 +00:00
config.py Fix LlamaParse 401 + update logo to v5 2026-03-16 12:22:31 +00:00
main.py Replace WebSocket with REST polling to fix GCP LB 30s timeout 2026-03-18 15:26:01 +00:00