KPI Module Filter Service
Component Detail
Service Layer
low complexity
backend
1
Dependencies
0
Dependents
2
Entities
0
Integrations
Description
Utility service that queries the module_configurations table for a given organization and returns the subset of KPI categories that should be surfaced. Ensures the dashboard only shows metrics for features the organization has enabled, preventing confusion or data leakage across disabled modules.
kpi-module-filter-service
Sources & reasoning
The module toggle system is a platform-wide constraint explicitly documented. Dashboard KPIs must not surface metrics for disabled modules, so a dedicated filter service ensures correct tenant scoping without polluting the aggregation service with toggle logic.
-
docs/source/likeperson.md · line 186Coordinator and organization-level dashboards and KPIs
-
docs/source/likeperson.md · line 317Aktivitetsoversikt og grunnleggende statistikk
-
docs/source/likeperson.md · line 231Admin Web Portal: `admin-dashboard`, `admin-user-management`, `admin-organization`, `admin-security`
Responsibilities
- Read enabled module set for the current organization from module_configurations
- Map area/module IDs to corresponding KPI categories
- Return a filtered list of KPI descriptors safe to render for this tenant
Interfaces
getEnabledKPICategories(orgId: string): Promise<KPICategory[]>
isKPICategoryEnabled(orgId: string, category: string): Promise<boolean>
Relationships
Related Data Entities (2)
Data entities managed by this component