update tables if not eligible
This commit is contained in:
@@ -29,10 +29,13 @@ async function TeamAccountBillingPage({ params }: TeamAccountBillingPageProps) {
|
||||
|
||||
const account = await api.getTeamAccount(accountSlug);
|
||||
const { members } = await api.getMembers(accountSlug);
|
||||
const eligibleMembersCount = members.filter(
|
||||
({ is_eligible_for_benefits }) => !!is_eligible_for_benefits,
|
||||
).length;
|
||||
const [expensesOverview, companyParams] = await Promise.all([
|
||||
loadTeamAccountBenefitExpensesOverview({
|
||||
companyId: account.id,
|
||||
employeeCount: members.length,
|
||||
employeeCount: eligibleMembersCount,
|
||||
}),
|
||||
api.getTeamAccountParams(account.id),
|
||||
]);
|
||||
@@ -42,7 +45,7 @@ async function TeamAccountBillingPage({ params }: TeamAccountBillingPageProps) {
|
||||
<HealthBenefitForm
|
||||
account={account}
|
||||
companyParams={companyParams}
|
||||
employeeCount={members.length}
|
||||
employeeCount={eligibleMembersCount}
|
||||
expensesOverview={expensesOverview}
|
||||
/>
|
||||
</PageBody>
|
||||
|
||||
Reference in New Issue
Block a user