feat(billing): enhance health benefit form and yearly expenses overview with employee count and loading state

This commit is contained in:
Danel Kungla
2025-08-11 15:04:16 +03:00
parent 6e63646944
commit 9298abe354
6 changed files with 79 additions and 39 deletions

View File

@@ -21,7 +21,7 @@ const YearlyExpensesOverview = ({
case 'yearly':
return (companyParams.benefit_amount / 12).toFixed(2);
case 'quarterly':
return (companyParams.benefit_amount / 4).toFixed(2);
return (companyParams.benefit_amount / 3).toFixed(2);
case 'monthly':
return companyParams.benefit_amount.toFixed(2);
default:
@@ -38,7 +38,7 @@ const YearlyExpensesOverview = ({
case 'yearly':
return companyParams.benefit_amount.toFixed(2);
case 'quarterly':
return (companyParams.benefit_amount * 4).toFixed(2);
return (companyParams.benefit_amount * 3).toFixed(2);
case 'monthly':
return (companyParams.benefit_amount * 12).toFixed(2);
default:
@@ -80,8 +80,15 @@ const YearlyExpensesOverview = ({
</div>
<Separator />
<div className="mt-4 flex justify-between">
<p className="font-semibold">Kokku</p>
<span className="font-semibold">13 200,00 </span>
<p className="font-semibold">
<Trans i18nKey="billing:expensesOverview.sum" />
</p>
<span className="font-semibold">
{companyParams.benefit_amount
? companyParams.benefit_amount * employeeCount
: 0}{' '}
</span>
</div>
</div>
);