+
-
+
diff --git a/app/home/[account]/_lib/server/load-team-account-benefit-statistics.ts b/app/home/[account]/_lib/server/load-team-account-benefit-statistics.ts
index 4de4be5..f61f350 100644
--- a/app/home/[account]/_lib/server/load-team-account-benefit-statistics.ts
+++ b/app/home/[account]/_lib/server/load-team-account-benefit-statistics.ts
@@ -29,7 +29,7 @@ export const loadCompanyPersonalAccountsBalanceEntries = async ({
const { count, data: accountMemberships } = await supabase
.schema('medreport')
.from('accounts_memberships')
- .select('user_id')
+ .select('user_id', { count: 'exact' })
.eq('account_id', accountId)
.throwOnError();
diff --git a/app/home/[account]/page.tsx b/app/home/[account]/page.tsx
index 5cff5d3..e8eb7ba 100644
--- a/app/home/[account]/page.tsx
+++ b/app/home/[account]/page.tsx
@@ -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}
/>
);
diff --git a/public/locales/en/teams.json b/public/locales/en/teams.json
index f0a728b..8af264f 100644
--- a/public/locales/en/teams.json
+++ b/public/locales/en/teams.json
@@ -28,7 +28,8 @@
"budget": {
"title": "Company Health Account Balance",
"balance": "Budget Balance {{balance}}",
- "volume": "Budget Volume"
+ "volume": "Budget Volume",
+ "membersCount": "Members Count"
},
"data": {
"reservations": "{{value}} services",
@@ -38,7 +39,8 @@
"analysisPackages": "Health Analysis Packages",
"analysisPackagesCount": "{{value}} service usage",
"totalSum": "Total Sum",
- "eclinic": "E-Clinic"
+ "eclinic": "E-Clinic",
+ "currentMonthUsageTotal": "Current Month Usage"
}
},
"healthDetails": {
diff --git a/public/locales/et/teams.json b/public/locales/et/teams.json
index f506595..884923d 100644
--- a/public/locales/et/teams.json
+++ b/public/locales/et/teams.json
@@ -28,17 +28,19 @@
"budget": {
"title": "Ettevõtte Tervisekassa seis",
"balance": "Eelarve jääk {{balance}}",
- "volume": "Eelarve maht"
+ "volume": "Eelarve maht",
+ "membersCount": "Töötajate arv"
},
"data": {
- "reservations": "{{value}} teenust",
+ "reservations": "{{value}} tellimus(t)",
"analysis": "Analüüsid",
"doctorsAndSpecialists": "Eriarstid ja spetsialistid",
"researches": "Uuringud",
"analysisPackages": "Terviseuuringute paketid",
- "analysisPackagesCount": "{{value}} teenuse kasutust",
+ "analysisPackagesCount": "{{value}} tellimus(t)",
"totalSum": "Tellitud teenuste summa",
- "eclinic": "Digikliinik"
+ "eclinic": "Digikliinik",
+ "currentMonthUsageTotal": "Kasutatud eelarve"
}
},
"healthDetails": {
diff --git a/public/locales/ru/teams.json b/public/locales/ru/teams.json
index aa61b70..74111f1 100644
--- a/public/locales/ru/teams.json
+++ b/public/locales/ru/teams.json
@@ -28,7 +28,8 @@
"budget": {
"title": "Баланс Tervisekassa компании",
"balance": "Остаток бюджета {{balance}}",
- "volume": "Объем бюджета"
+ "volume": "Объем бюджета",
+ "membersCount": "Количество сотрудников"
},
"data": {
"reservations": "{{value}} услуги",
@@ -38,7 +39,8 @@
"analysisPackages": "Пакеты медицинских исследований",
"analysisPackagesCount": "{{value}} использование услуг",
"totalSum": "Сумма услуг",
- "eclinic": "Дигиклиника"
+ "eclinic": "Дигиклиника",
+ "currentMonthUsageTotal": "Текущее использование бюджета"
}
},
"healthDetails": {