MEDIUM story-bufdir-data-aggregation-coordinator-008 5 pts
5
Story Points
Medium
Priority
Bufdir Data Aggregation
Feature

User Story

As a Coordinator
I want to view a history of all previously generated and submitted Bufdir reports with their key metrics
So that I can audit past submissions, compare trends across reporting periods, and resubmit a previous report if Bufdir requests a correction

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.