modcomms/backend
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
..
alembic Prepare production deployment for baic.oliver.solutions/modcomms 2026-03-06 11:54:00 +00:00
app Add CSV export of campaign data for super_admin and oversight_admin 2026-03-19 11:35:24 +00:00
.env.example Add support email functionality via Mailgun 2026-01-24 07:03:11 -06:00
alembic.ini permissions changes 2025-12-18 16:51:27 +00:00
Dockerfile Fix large file preview and download issues 2026-01-25 08:06:41 -06:00
requirements.txt Switch LlamaParse to llama-cloud SDK with agentic_plus tier 2026-02-12 15:29:23 -06:00