User Interface medium complexity mobile
4
Dependencies
0
Dependents
0
Entities
1
Integrations

Description

Main screen for initiating a Bufdir export. Hosts scope selector, period picker, preview panel, and confirmation flow in a single scrollable layout.

Feature: Bufdir Report Export

bufdir-export-screen

Summaries

The Bufdir Export Screen is the primary interface through which the organization delivers structured data exports to Bufdir, Norway's Directorate for Children, Youth and Family Affairs. This capability is essential for regulatory compliance and continued eligibility for public funding — making it a direct business-critical feature. By consolidating scope selection, period configuration, data preview, and confirmation into a single guided flow, the screen minimizes user errors that could result in incorrect or incomplete submissions. Accurate, timely Bufdir reporting protects the organization from compliance risk and demonstrates accountability to stakeholders.

A well-designed export experience also reduces administrative burden on staff, freeing resources for program delivery rather than manual data handling.

The Bufdir Export Screen is a medium-complexity orchestration screen with four significant sub-component dependencies: the Export Scope Selector, Period Picker, Preview Panel, and Confirmation Dialog. All four must be completed and stable before full integration testing of this screen can begin, making dependency sequencing critical to the timeline. The scrollable single-layout approach simplifies navigation logic but requires careful state coordination between sub-components — changes in scope or period must propagate correctly to the preview panel. QA effort should cover multi-step flow validation, especially cancellation and re-entry scenarios.

The generated-report data model dependency means backend export generation logic must also be ready for end-to-end testing. Deployment should be gated on successful preview rendering with realistic data volumes to avoid performance surprises in production.

The Bufdir Export Screen acts as the top-level orchestrator for the export configuration flow, composing ExportScopeSelector, ExportPeriodPicker, ExportPreviewPanel, and ExportConfirmationDialog within a single scrollable widget tree. State management should track the current scope and period selections, passing them down to child components via callbacks (onScopeChanged, onPeriodChanged) and lifting state up for preview and confirmation triggers. The onPreviewRequested() handler should initiate an async call to the report generation layer, binding to the generated-report data model for structured output. The onExportConfirmed() callback triggers the final export submission, while onExportCancelled() should reset state and potentially pop the route.

Use Riverpod or equivalent for async state (loading, error, success) during preview generation. Ensure the build() method remains thin — delegate all business logic to providers or notifiers. Handle edge cases: empty scope selection, invalid date ranges, and network errors during preview fetch.

Responsibilities

  • Orchestrate export configuration UI
  • Display export readiness status
  • Trigger preview and confirmation steps

Interfaces

build()
onScopeChanged(scope)
onPeriodChanged(period)
onPreviewRequested()
onExportConfirmed()
onExportCancelled()

Used Integrations (1)

External integrations and APIs this component relies on