Data Layer medium complexity backend
0
Dependencies
0
Dependents
2
Entities
0
Integrations

Description

Data access layer that executes aggregation queries against the activity, contact, and expense tables to retrieve raw KPI figures for a given tenant scope. It exposes focused read-only query methods consumed exclusively by DashboardKpiService.

Feature: Dashboard KPIs

dashboard-repository

Sources & reasoning

Lines 325-327 explicitly list "Aktivitetsoversikt og grunnleggende statistikk" (activity overview and basic statistics) as Admin Web Portal MVP scope. Lines 189-197 confirm "organization-level dashboards and KPIs" as a core admin portal capability. Both place this feature in Fase 1 / MVP, normalizing to target_release "MVP".

  • docs/source/likeperson.md · line 325-327
    Admin Web Portal (MVP scope): Brukeradministrasjon (invitere, deaktivere, rolletildeling) Organisasjonsinnstillinger og terminologikonfigurasjon Aktivitetsoversikt og grunnleggende statistikk
  • docs/source/likeperson.md · line 189-197

Responsibilities

  • Query the count of active peer mentors scoped to a tenant
  • Query the total number of activities logged within the current period
  • Query the count of activities or submissions in a pending-approval state
  • Query the sum of reimbursement amounts from the expense table for the tenant

Interfaces

getActivePeerMentorCount(tenantId: string): Promise<number>
getLoggedActivityCount(tenantId: string): Promise<number>
getPendingApprovalCount(tenantId: string): Promise<number>
getReimbursementTotal(tenantId: string): Promise<number>

Related Data Entities (2)

Data entities managed by this component