Skip to content

Add co-president letterhead PDF exports - #134

Merged
AlaqmarG merged 2 commits into
mainfrom
feat/data-exports
Sep 15, 2026
Merged

AlaqmarG merged 2 commits into
mainfrom
feat/data-exports

Conversation

@AlaqmarG

@AlaqmarG AlaqmarG commented Sep 14, 2026

Copy link
Copy Markdown
Member

Description

  • New Exports tile, co-presidents only (approverOnly + requireApprover on every route). PDFs on the club letterhead are built on demand and never stored. Downloads are rate limited and sent with no-store.
  • Access Request: every current exec's name, student ID and access card ID. Anyone missing any of the three is left out of the PDF; the page lists who was skipped and what's missing, never the PDF.
  • Access Removal: former execs from a past term whose card access should be revoked.
  • Executive Roster: position, name, student ID, personal and club email. For student-union club registration and handover.
  • Confirmation of Officers: positions and terms with co-president signature lines. For the credit union or the university.
  • Events Report: events in a date range, with recurring series listed once.
  • Signing Register: signing requests in a date range, with envelope, signers, status and dates.
  • Unicode-safe (Noto Sans), tables repeat their header across pages, footer shows page X of Y, and exports containing personal information carry a Confidential marker.
  • The letterhead header now lives in lib/documents/letterhead.ts, shared with the templates. The template PDFs are byte-identical after the refactor.

Checklist

  • npm run typecheck, npm run lint, npm run format:check and npm run build pass
  • Schema changes have a committed migration (npm run db:generate) — none
  • New env vars added to .env.example, .env.local.example, deploy/docker-compose.yml and komodo/deploy-context.mjs — none
  • Admin-only routes gated with requireAdmin / requireApprover
  • Tested on the branch's preview deploy (light theme): every export downloads a valid PDF, a bad date range returns 400, an unknown export returns 404
  • No secrets, internal hostnames or IPs committed

Testing Evidence

exports page exports page, lower cards
Exports page on the preview (names blurred) Roster, officers, events and signing cards
  • Signing Register shows 0 on previews because previews don't copy signing requests from prod.

Samples below are rendered from fake data through the real report code.

sample sample sample
Access Request Access Removal Executive Roster
sample sample sample
Confirmation of Officers Events Report Signing Register

The Access Request sample includes a fake exec missing an access card. They're left out of the table and the signature names; only the Exports page names them.

@AlaqmarG AlaqmarG added feature New capability for the people using the site security Access control, data exposure or dependency risk area: admin The admin portal: analytics, users, events labels Sep 14, 2026
@AlaqmarG AlaqmarG mentioned this pull request Sep 15, 2026
6 tasks
@AlaqmarG
AlaqmarG merged commit cd01059 into main Sep 15, 2026
12 checks passed
@AlaqmarG
AlaqmarG deleted the feat/data-exports branch September 15, 2026 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: admin The admin portal: analytics, users, events feature New capability for the people using the site security Access control, data exposure or dependency risk

Development

Successfully merging this pull request may close these issues.

1 participant