Objective
- Expose calendar / scheduled event data in Reports Hub (or the connected reporting stack) so teams can run reports on events, not only on jobs, charges, or quotes.
- Make event-based operational reporting a part of the Reports Hub roadmap.
Background
- The Data exports surface defines export entities such as
inspections,charges, andquotesinattik-backend/src/config/exportFieldDefinitions.ts; there is noeventsentity in that list today, so “report on events” is not a turnkey export the way job rows are. - Scheduled work is stored as
Eventdocuments (attik-backend/src/models/eventSchema.ts) and listed viaGETonattik-backend/src/routes/event.ts(filters such asafter/before,inspectorId,inspectionId, optional radon path, etc.). Events tie to work through optional_inspectionIdand_chargeId(charge → service), not a directeventsrow in the current data-export model. - Decision needed on the right Reports Hub dataset: extend data exports with an
eventsentity, derive event rows in a join from inspections, or a dedicated reporting endpoint—product and performance implications differ.
Scope
Backend
Eventschema, indexes, and the event routes inattik-backend/src/routes/event.tsas the source of event rows and populates; trace how an event row relates to a job when_inspectionId/_chargeIdare set.- The data export and Reports Hub pipeline in the backend (export builders,
entityFieldDefinitions, and any job runner that materializes CSV/sheets) if the feature reuses that engine; exact files depend on whether the team adds a new entity or a hub-specific query—decision needed.
Frontend
- Reports Hub / Data exports under
attik-frontend/src/app/tools/data-exports/(form state, report types, column pickers, filters) and how new datasets or linked entities are registered for preview and run. - Decision needed on which filters and columns (inspector, time range, service via charge, etc.) belong in the first release.
Other surfaces
- Mobile or client apps: out of scope unless explicitly required for viewing exported event data; default is back-office reporting.
References
attik-backend/src/config/exportFieldDefinitions.ts— export entities and field definitionsattik-backend/src/routes/event.ts— event list API and query parametersattik-frontend/src/app/tools/data-exports/— reporting UI and payloads