feat(MED-97): update benefit stats view in dashboards

This commit is contained in:
2025-09-26 13:47:32 +03:00
parent fdc2e3e064
commit 1aeee0bc30
23 changed files with 518 additions and 374 deletions

View File

@@ -17,6 +17,7 @@ import {
} from '~/lib/services/audit/pageView.service';
import { Dashboard } from './_components/dashboard';
import { loadAccountBenefitStatistics } from './_lib/server/load-team-account-benefit-statistics';
interface TeamAccountHomePageProps {
params: Promise<{ account: string }>;
@@ -39,9 +40,7 @@ function TeamAccountHomePage({ params }: TeamAccountHomePageProps) {
const teamAccount = use(teamAccountsApi.getTeamAccount(account));
const { memberParams, members } = use(teamAccountsApi.getMembers(account));
const bmiThresholds = use(userAnalysesApi.fetchBmiThresholds());
const companyParams = use(
teamAccountsApi.getTeamAccountParams(teamAccount.id),
);
const accountBenefitStatistics = use(loadAccountBenefitStatistics(teamAccount.id));
use(
createPageViewLog({
@@ -57,7 +56,7 @@ function TeamAccountHomePage({ params }: TeamAccountHomePageProps) {
memberParams={memberParams}
bmiThresholds={bmiThresholds}
members={members}
companyParams={companyParams}
accountBenefitStatistics={accountBenefitStatistics}
/>
</PageBody>
);