You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Asset managers need to export data for reporting and offline analysis. exceljs and json2csv are installed but no export endpoints exist.
Proposed Solution
Create backend/src/opsce/exports/exports.service.ts and backend/src/opsce/exports/exports.controller.ts. Support CSV and XLSX formats with the same filter parameters as GET /api/assets.
Acceptance Criteria
GET /api/assets/export?format=csv returns a downloadable .csv file
GET /api/assets/export?format=xlsx returns a downloadable .xlsx file
Exported columns: ID, Name, Category, Status, Condition, Serial Number, Department, Location, Assigned To, Purchase Date, Purchase Value, Current Value
Accepts the same filter query params as the assets list endpoint (status, category, departmentId, etc.)
Problem
Asset managers need to export data for reporting and offline analysis.
exceljsandjson2csvare installed but no export endpoints exist.Proposed Solution
Create
backend/src/opsce/exports/exports.service.tsandbackend/src/opsce/exports/exports.controller.ts. Support CSV and XLSX formats with the same filter parameters asGET /api/assets.Acceptance Criteria
GET /api/assets/export?format=csvreturns a downloadable.csvfileGET /api/assets/export?format=xlsxreturns a downloadable.xlsxfileContent-Disposition: attachment; filename=assets-export-{date}.csv400ifformatis notcsvorxlsx