Skip to content

feat: add CSV and PDF export functionality#448

Open
pharwasz wants to merge 5 commits into
StayLitCodes:mainfrom
pharwasz:feature/export-functionality
Open

feat: add CSV and PDF export functionality#448
pharwasz wants to merge 5 commits into
StayLitCodes:mainfrom
pharwasz:feature/export-functionality

Conversation

@pharwasz

@pharwasz pharwasz commented Jun 28, 2026

Copy link
Copy Markdown

Closes #408


Summary

Implements export functionality across the transactions and admin pages, allowing users to download transaction data as CSV or PDF files with Vaultix branding.

Changes

New Components

  • ExportDropdown.tsx — dropdown button with CSV/PDF options and loading state
  • ExportModal.tsx — date range picker modal shown before export begins

New Libraries

  • pdf-export.ts — PDF generation with Vaultix branding, summary stats, and tabular data
  • csv-export.test.ts — 15 unit tests covering CSV generation, escaping, and edge cases

Pages Updated

  • /transactions — export button added to page header
  • /admin/analytics — export functionality added
  • /admin/escrows — export functionality added

Feature Details

CSV Export

  • Columns: Escrow ID, Status, Amount, Asset, Counterparty, Created At, Completed At, Deadline
  • Proper escaping of commas, quotes, and newlines
  • Respects active filters (event type, date range)
  • Auto-named: vaultix-transactions-YYYY-MM-DD.csv

PDF Export

  • Vaultix branding with blue header
  • Summary statistics (total transactions, amount, completed, active, disputed)
  • Tabular data with proper formatting
  • Auto-named: vaultix-transactions-YYYY-MM-DD.pdf

UX

  • Date range picker modal before export triggers
  • Loading spinner during export
  • Toast notifications on success/failure
  • Large datasets (1000+ rows) handled without UI freeze via setTimeout

Testing

  • 15 unit tests passing for CSV generation
  • Covers escaping edge cases, empty data, various filter combinations

Screenshots

Tested locally — export dropdown visible on /transactions, /admin/analytics, and /admin/escrows pages. CSV and PDF downloads verified.


That's the full description, ready to paste into your PR.

- Add export button with dropdown (CSV/PDF) on /transactions page
- Add export functionality to /admin/analytics and /admin/escrows
- CSV export: includes Escrow ID, Status, Amount, Asset, Counterparty, dates
  - Proper escaping of commas, quotes, and newlines
  - Respects active filters (event type, date range)
  - Auto-named: vaultix-transactions-YYYY-MM-DD.csv
- PDF export: Vaultix branding, summary stats, tabular data
  - Auto-named: vaultix-transactions-YYYY-MM-DD.pdf
- Date range picker modal before export
- Progress indicator and toast notifications
- Handles large datasets (>1000 rows) without UI freeze
- Unit tests: 15 tests passing (CSV generation, escaping, edge cases)
@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@pharwasz Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@pharwasz

Copy link
Copy Markdown
Author

Hello there, waiting for your approval

@pharwasz

Copy link
Copy Markdown
Author

kindly recheck now

@pharwasz

Copy link
Copy Markdown
Author

pls check now

@pharwasz

pharwasz commented Jul 1, 2026

Copy link
Copy Markdown
Author

Hi there, pls kindly approve workflow

@pharwasz

pharwasz commented Jul 4, 2026

Copy link
Copy Markdown
Author

Are you there?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(frontend): Add CSV/PDF export for transaction history

1 participant