Backend — attik-backend
GET /cc-dashboard/metrics in src/routes/ccDashboard.ts already takes globalCategoryIds, resolves categories and descendant categories against GlobalServiceCategory and ServiceCategoryAssignment, then uses Charge.distinct on _inspectionId scoped to core inspection id lists from the cc_inspection_base view (CC_INSPECTION_BASE_VIEW from src/util/constants/ccDashboard.js). That path is the reference for “selected add-on” semantics.GET /cc-dashboard/scheduler-metrics in the same file does not read globalCategoryIds. The aggregation uses view fields such as hasAddon for addonNum / addonDenom, and computeRates exposes that as selectedAddOnRate—so the API name and UI label imply selected categories, while the implementation is category-agnostic unless changed./metrics uses Quote plus primary Charge rows and serviceFlagMap from assignments; /scheduler-metrics has a parallel path (including createdType: 'csr' constraints for open quotes). Any close-rate fixes should preserve parity between KPI / metrics and scheduler breakdowns unless product explicitly diverges.scripts/createCcDashboardViews.ts; if category-scoped add-on presence per row is needed at aggregation time, the view or pipeline may need extending—decision needed on whether to push category logic into the view, reuse charge lookups like /metrics, or another approach.Frontend — attik-frontend
src/app/admin/client-care-dashboard/CCDashboardClient.tsx loads add-on rates via cc-dashboard/metrics with globalCategoryIds in fetchAddonRates, but loads scheduler data via fetchSchedulerMetrics with only companyIds, startDate, and endDate—no selected category ids—so the UI cannot today drive scheduler add-on rates from the same selection.src/app/admin/client-care-dashboard/_components/EmployeeTable.tsx labels the column around selected add-ons and blends selectedAddOnRate across rows using ordersCreated weights in computeSubsetAverage; once the API matches selected categories, confirm the aggregate row still matches the intended definition.src/app/admin/client-care-dashboard/_types.ts (selectedAddOnRate on SchedulerRow).scripts/createCcDashboardViews.ts and CC_INSPECTION_BASE_VIEW usage in src/routes/ccDashboard.ts.Please authenticate to join the conversation.
Completed
Main App
About 2 months ago
Linear
Get notified by email when there are changes.
Completed
Main App
About 2 months ago
Linear
Get notified by email when there are changes.