Overview
Finance and compliance teams regularly need to extract data from AssetsUp into spreadsheets for external reporting, auditing, and processing. This issue adds CSV and XLSX export support for the three most-requested datasets: assets, audit logs, and report summaries.
Context
exceljs is a well-maintained library for XLSX generation — evaluate and install
- Exports for large datasets must be streamed, not buffered in memory (use Node.js
Readable streams or exceljs streaming API)
- Exports should respect the same RBAC scoping as the underlying list endpoints (MANAGER sees their department only)
Acceptance Criteria
Overview
Finance and compliance teams regularly need to extract data from AssetsUp into spreadsheets for external reporting, auditing, and processing. This issue adds CSV and XLSX export support for the three most-requested datasets: assets, audit logs, and report summaries.
Context
exceljsis a well-maintained library for XLSX generation — evaluate and installReadablestreams orexceljsstreaming API)Acceptance Criteria
exceljsand add topackage.jsonGET /assets/export?format=csv|xlsx&status=&category=&department=— exports all matching assets applying the same filters as the list endpoint; streams the file as a downloadGET /audit-logs/export?format=csv|xlsx&from=&to=— exports filtered audit log entries (ADMIN only)GET /reports/export?format=csv|xlsx— exports the summary report data including by-category and by-department breakdownsContent-Disposition: attachment; filename="assets-2024-01-01.xlsx"andContent-Typeheaders