Skip to content

Add CSV export and print for admin volunteer tables#268

Open
sachinkg12 wants to merge 1 commit intoopportunity-hack:developfrom
sachinkg12:feature/admin-export-print-volunteers
Open

Add CSV export and print for admin volunteer tables#268
sachinkg12 wants to merge 1 commit intoopportunity-hack:developfrom
sachinkg12:feature/admin-export-print-volunteers

Conversation

@sachinkg12
Copy link
Copy Markdown

Summary

  • Adds Export CSV and Print buttons to the admin volunteer management page (/admin/volunteer) for all participant types: mentors, judges, volunteers, hackers, and sponsors
  • CSV export properly escapes commas, quotes, and newlines, and includes all visible columns for the active tab
  • Print view uses @media print CSS to hide navigation, filters, and action buttons, showing only a clean table with all columns visible
  • Fixes a pre-existing bug where participationCount crashes renderCellContent when the value is numeric instead of a string

Implementation

  • Follows the existing CSV export + print pattern from JudgingResults.js
  • getPlainCellValue() extracts plain text from each of the 30+ column types for clean CSV output
  • Buttons are disabled when no data is loaded, and show icon-only on mobile to save space

Test plan

  • Navigate to /admin/volunteer, select a hackathon with data
  • Switch between tabs (Mentors, Judges, Volunteers, Hackers, Sponsors)
  • Click CSV button — verify a .csv file downloads and opens correctly in Excel/Google Sheets
  • Click Print button — verify the browser print dialog shows a clean table without navigation or buttons
  • Verify buttons are disabled when no data is loaded
  • Verify buttons show icon-only on mobile viewports

Closes #229

Adds export-to-CSV and print buttons to the volunteer management admin
page for all participant types (mentors, judges, volunteers, hackers,
sponsors). Also fixes a bug where participationCount crashes when the
value is numeric instead of a string.

Closes opportunity-hack#229
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 29, 2026

@sachinkg12 is attempting to deploy a commit to the Opportunity Hack Projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Be able to print volunteers, mentors, hacker, judges

1 participant