Skip to content

Add export and error/empty states to Custom Report Builder #419

Description

@Wilfred007

What

Add report export (CSV, and PDF/Excel where supported) and proper loading/empty/error states to frontend/src/pages/CustomReportBuilder.tsx.

Why

The report builder lets employers select columns and filter rows, but there is no way to export the result, and it lacks loading/empty/error handling. Exporting is the primary reason to build a custom report (accounting, compliance filing). This complements the separate issue that replaces its mock dataset with real data.

Scope

In scope:

  • An export action producing at least CSV from the currently built/filtered report.
  • Reuse backend export endpoints for PDF/Excel where a report maps to them.
  • Loading, empty-result, and error states for the builder.

Out of scope:

  • Replacing the mock dataset (tracked separately) — build export against whatever data source is in place, so this lands cleanly after that.
  • Scheduled/emailed reports.

Acceptance criteria

  • User can export the current report to CSV (download triggers with correct columns/rows).
  • Empty and error states render instead of a blank table.
  • npm run lint and type build pass.

Technical context

  • Page: frontend/src/pages/CustomReportBuilder.tsx.
  • Backend export endpoints: backend/src/routes/exportRoutes.ts (/payroll/.../csv, /excel, /receipt/:txHash/pdf).
  • Pairs with the 'replace mock dataset in Custom Report Builder' issue.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26easySimple tasksfrontendFrontend development

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions