feat(MED-97): display accounts count, usage total

This commit is contained in:
2025-09-26 16:34:10 +03:00
parent 27689dbbff
commit 2d9e6f8df3
7 changed files with 58 additions and 29 deletions

View File

@@ -18,6 +18,7 @@ import {
import { Dashboard } from './_components/dashboard';
import { loadAccountBenefitStatistics } from './_lib/server/load-team-account-benefit-statistics';
import { loadTeamAccountBenefitExpensesOverview } from './_lib/server/load-team-account-benefit-expenses-overview';
interface TeamAccountHomePageProps {
params: Promise<{ account: string }>;
@@ -41,6 +42,10 @@ function TeamAccountHomePage({ params }: TeamAccountHomePageProps) {
const { memberParams, members } = use(teamAccountsApi.getMembers(account));
const bmiThresholds = use(userAnalysesApi.fetchBmiThresholds());
const accountBenefitStatistics = use(loadAccountBenefitStatistics(teamAccount.id));
const expensesOverview = use(loadTeamAccountBenefitExpensesOverview({
companyId: teamAccount.id,
employeeCount: members.length,
}));
use(
createPageViewLog({
@@ -57,6 +62,7 @@ function TeamAccountHomePage({ params }: TeamAccountHomePageProps) {
bmiThresholds={bmiThresholds}
members={members}
accountBenefitStatistics={accountBenefitStatistics}
expensesOverview={expensesOverview}
/>
</PageBody>
);