chore(billing): add tests + fix meter name for trial (#14701)

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: Righteousness Akinbola <righteousnessakinbola@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>
Co-authored-by: Weiko <corentin@twenty.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@twenty.com>
Co-authored-by: martmull <martmull@hotmail.fr>
Co-authored-by: Raphaël Bosi <71827178+bosiraphael@users.noreply.github.com>
Co-authored-by: Abdullah. <125115953+mabdullahabaid@users.noreply.github.com>
Co-authored-by: Thomas Trompette <thomas.trompette@sfr.fr>
Co-authored-by: Paul Rastoin <45004772+prastoin@users.noreply.github.com>
This commit is contained in:
Antoine Moreaux
2025-09-30 10:01:51 +02:00
committed by GitHub
parent da3c3d2b9d
commit 7692fb2b6c
13 changed files with 2663 additions and 1192 deletions
@@ -79,25 +79,23 @@ export const SettingsBillingCreditsSection = ({
withBorderRadius={true}
/>
<StyledLineSeparator />
{!isTrialing && (
<SettingsBillingLabelValueItem
label={t`Extra Credits Used`}
value={`${formatToShortNumber(extraCreditsUsed)}`}
/>
)}
{!isTrialing && (
<SettingsBillingLabelValueItem
label={t`Cost per 1k Extra Credits`}
value={`$${formatNumber(costPer1kExtraCredits, { abbreviate: true, decimals: 6 })}`}
/>
)}
{!isTrialing && (
<SettingsBillingLabelValueItem
label={t`Cost`}
isValueInPrimaryColor={true}
value={`$${formatNumber(costExtraCredits, { decimals: 2 })}`}
/>
<>
<StyledLineSeparator />
<SettingsBillingLabelValueItem
label={t`Extra Credits Used`}
value={`${formatToShortNumber(extraCreditsUsed)}`}
/>
<SettingsBillingLabelValueItem
label={t`Cost per 1k Extra Credits`}
value={`$${formatNumber(costPer1kExtraCredits, { abbreviate: true, decimals: 6 })}`}
/>
<SettingsBillingLabelValueItem
label={t`Cost`}
isValueInPrimaryColor={true}
value={`$${formatNumber(costExtraCredits, { decimals: 2 })}`}
/>
</>
)}
</SubscriptionInfoContainer>
</Section>