Refactor team account statistics and health details
- Simplified the TeamAccountStatistics component by removing unused code and integrating translation for health details. - Updated the load-team-account-health-details to calculate average BMI based on member parameters. - Adjusted the billing page to correctly reference the number of team members. - Enhanced the main account page to pass member parameters to the Dashboard component. - Modified the admin account page to destructure member data from the API response. - Updated the TeamAccountsApi to return member parameters alongside member data. - Added new translations for health details in Estonian locale.
This commit is contained in:
@@ -33,6 +33,7 @@ function TeamAccountHomePage({ params }: TeamAccountHomePageProps) {
|
||||
const client = getSupabaseServerClient();
|
||||
const api = createTeamAccountsApi(client);
|
||||
const teamAccount = use(api.getTeamAccount(account));
|
||||
const { memberParams } = use(api.getMembers(account));
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -46,7 +47,7 @@ function TeamAccountHomePage({ params }: TeamAccountHomePageProps) {
|
||||
/>
|
||||
|
||||
<PageBody>
|
||||
<Dashboard teamAccount={teamAccount} />
|
||||
<Dashboard teamAccount={teamAccount} memberParams={memberParams} />
|
||||
</PageBody>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user