modcomms/frontend
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
..
components Add CSV export of campaign data for super_admin and oversight_admin 2026-03-19 11:35:24 +00:00
contexts Grant oversight_admin write access to campaigns and proofs 2026-03-03 13:08:54 +00:00
hooks Add PDF preview support with on-demand rasterization 2026-01-25 08:56:23 -06:00
public Fix WebSocket drops: add bidirectional keepalive pings 2026-03-18 13:10:27 +00:00
services Add CSV export of campaign data for super_admin and oversight_admin 2026-03-19 11:35:24 +00:00
utils Prepare production deployment for baic.oliver.solutions/modcomms 2026-03-06 11:54:00 +00:00
App.tsx Add CSV export of campaign data for super_admin and oversight_admin 2026-03-19 11:35:24 +00:00
constants.ts Restructure agent system: remove Tone, split Channel, implement Legal 2026-01-24 11:58:17 -06:00
index.html Fix favicon/CSS 404s; heartbeat 25s→10s already staged 2026-03-18 12:57:49 +00:00
index.tsx permissions changes 2025-12-18 16:51:27 +00:00
metadata.json permissions changes 2025-12-18 16:51:27 +00:00
package-lock.json permissions changes 2025-12-18 16:51:27 +00:00
package.json permissions changes 2025-12-18 16:51:27 +00:00
README.md permissions changes 2025-12-18 16:51:27 +00:00
tsconfig.json permissions changes 2025-12-18 16:51:27 +00:00
types.ts Add frontend RBAC: UserContext, role-based sidebar, agency filter, user management 2026-02-19 08:36:38 -06:00
vite.config.ts Replace WebSocket with REST polling to fix GCP LB 30s timeout 2026-03-18 15:26:01 +00:00

GHBanner

Run and deploy your AI Studio app

This contains everything you need to run your app locally.

View your app in AI Studio: https://ai.studio/apps/drive/1vH-R-vj0Xkk_g2ZFdHtLxNc12sFTOl2L

Run Locally

Prerequisites: Node.js

  1. Install dependencies: npm install
  2. Set the GEMINI_API_KEY in .env.local to your Gemini API key
  3. Run the app: npm run dev