Export Organisational Data and Administrative Reports
The admin export panel provides scoped export controls for multiple data types: all activity registrations for a date range, full user roster with roles and status, expense claim summaries, and Bufdir-formatted output. Exports are generated asynchronously — the user receives a progress indicator and a download link once complete. All exports respect the admin's hierarchy scope and RLS policy. The double-export guard prevents triggering the same export run multiple times within a short window to avoid duplicate files.
User Story
Acceptance Criteria
- Given I select 'Export user roster' with the current date range, when I tap Export, then a CSV file is generated containing all users in my org scope with their role, status, and last activity date
- Given I request an activity export for Q1, when the export completes, then the downloaded file contains one row per activity with peer mentor name, contact ID (anonymised per GDPR), activity type, date, duration, and chapter attribution
- Given an export is in progress, when I navigate away and return, then the export progress indicator shows current status and does not restart the job
- Given I trigger the same export twice within 60 seconds, when the second trigger fires, then the double-export guard blocks it and surfaces the existing pending job instead
- Given an export is complete, when I view the export history panel, then the file appears with its generation timestamp and I can re-download it for up to 30 days
- Given my org uses a custom terminology override (e.g., 'likeperson' instead of 'peer mentor'), when I download an export, then the column headers use my org's custom terminology
Business Value
Board reporting, funding applications, and member communication all require regular data exports that currently involve manual extraction from multiple systems. Admins at NHF currently spend an estimated 2–4 hours per month on data compilation tasks that this feature would reduce to minutes. Self-service export also eliminates dependency on technical staff for routine data requests, freeing engineering capacity for product development while giving administrators the autonomy to respond to stakeholder requests on their own schedule.
Components
- Admin Export Panel ui
- Admin Export Service service
- Admin Row-Level Security Guard service
- Admin Data Repository data
- Double-Export Guard service
- CSV / JSON File Generator infrastructure
- File Download Handler infrastructure
- Export Storage Bucket infrastructure