Files
alla-allaos-fullstack/docs/implementation/task-k1-report-foundation.md
phaichayon 5c28080e9b task-k.1
2026-06-22 20:07:51 +07:00

40 lines
1.1 KiB
Markdown

# Task K.1 Implementation Summary
## Completed
- added `crm_report_definitions` schema and migration
- seeded `crm_report_category` master options
- seeded system report definitions:
- `lead_pipeline`
- `enquiry_pipeline`
- `sales_performance`
- `lost_analysis`
- `revenue_by_customer`
- added permissions:
- `crm.report.read`
- `crm.report.export`
- created `src/features/crm/reports/` foundation with:
- API contracts
- shared query options
- `ResolvedReportContext`
- `resolveCrmAccess()`
- dataset layer
- builder layer
- shared filter metadata builder
- export helpers
- added report discovery APIs:
- `GET /api/crm/reports`
- `GET /api/crm/reports/catalog`
- `GET /api/crm/reports/filters`
- added audit logging for report foundation reads
- added CRM Reports landing page and sidebar navigation entry
## Verification
- `npm exec tsc --noEmit`
## Notes
- this task creates the shared report platform only; it does not implement business report execution pages yet
- export helpers are centralized and ready for future report-specific export routes