Access Report History for Audit and Resubmission
Coordinators must retain records of all Bufdir submissions for audit purposes and to respond to Bufdir queries about historical data. The report history screen lists all past exports with their period, submission timestamp, file format, and a summary of key metrics. A reexport coordinator allows regenerating and re-downloading a past report. Row-level security ensures coordinators only see their own organisation's history.
User Story
Acceptance Criteria
- Given the coordinator opens the report history screen, when history loads, then all past Bufdir exports for their organisation are listed in reverse chronological order
- Given a history entry is displayed, when the coordinator views it, then the period, export date, file format, total activities, and unique participant count are all shown
- Given the coordinator taps a history entry, when the detail opens, then a summary metrics widget shows the full breakdown of that report's aggregated data
- Given the coordinator taps Reexport on a history entry, when reexport is initiated, then the system regenerates the file from stored aggregated data and offers it for download
- Given a coordinator from a different organisation is authenticated, when they attempt to access another organisation's history, then Supabase RLS policies block the query and no records are returned
- Given history contains more entries than fit one page, when the coordinator scrolls, then additional entries load via pagination without performance degradation
Business Value
Bufdir audits can occur years after a submission, and organisations must be able to produce documentation of what was reported and when. Without a structured history, coordinators rely on email inboxes and shared drives to reconstruct past submissions — a fragile and time-consuming process. A built-in audit trail reduces audit preparation time from days to minutes.
Components
- Report History Screen ui
- Report History List Item Widget ui
- Report Summary Metrics Widget ui
- Report History Service service
- Report Re-export Coordinator service
- Report History Repository data
- Report File Storage Client data
- Report History RLS Policy Configuration infrastructure