# Reports UI Generic, config-driven report screens live in `apps/web/src/core/report/`. Report definitions are backend `ReportConfigEntity` objects. Architecture and APIs: [trackgo-be/docs/report-engine.md](../../../../../trackgo-be/docs/report-engine.md) ## Layout | Path | Role | | ------------------------------------- | ------------------------------------------------------------------------ | | `constants/` | `FILTER_TYPE`, `DATA_FORMAT`, `REPORT_GROUP` — keep in sync with backend | | `entities/` | Frontend mirror of config / query contracts | | `data/report.remote.service.ts` | HTTP client (`apiClient`) | | `utils/filter.helper.ts` | Form values → `filterModel` | | `utils/column.helper.ts` | `columnConfigs` → AG Grid `columnDefs` | | `components/report-provider.tsx` | Load configs → Mantine tabs | | `components/report-table.tsx` | AG Grid SSRM + filter/bookmark actions | | `components/report-filter-drawer.tsx` | Config-driven filter form | | `components/report-bookmark-list.tsx` | Bookmark apply / delete | ## Product modules | Module | Path | `moduleKey` | | ----------------- | -------------------------------------------- | ------------------ | | Sales reports | `apps/main/modules/sales/reports/` | `SALES.REPORT` | | Logistics reports | `apps/main/modules/field/logistics-reports/` | `LOGISTICS.REPORT` | Each module wraps `ReportProvider` with `groupName` `sales_report` or `logistics_report` inside `EnterpriseModuleProvider` for RBAC. ## Grid contract Every server-side block sends: ```ts { groupName, uniqueName, queryModel: { /* AG Grid IServerSideGetRowsRequest + merged filterModel */ } } ``` Column defs, filters, and formats come from the config payload. Adding a report is a backend config change only.