feat(billing): refacto billing (#14243)

… prices for metered billing

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: Félix Malfait <felix@twenty.com>
This commit is contained in:
Antoine Moreaux
2025-09-19 11:25:53 +02:00
committed by GitHub
parent 163890f6c8
commit 43e0cd5d05
351 changed files with 16091 additions and 6101 deletions
@@ -1,8 +1,8 @@
import { NumberFormat } from '@/localization/constants/NumberFormat';
import { detectNumberFormat } from '@/localization/utils/detectNumberFormat';
import { detectNumberFormat } from '@/localization/utils/detection/detectNumberFormat';
import { Select } from '@/ui/input/components/Select';
import { useLingui } from '@lingui/react/macro';
import { formatNumber } from '~/utils/format/formatNumber';
import { formatNumber as utilFormatNumber } from '~/utils/format/formatNumber';
type NumberFormatSelectProps = {
value: NumberFormat;
@@ -17,27 +17,26 @@ export const NumberFormatSelect = ({
const systemNumberFormat = NumberFormat[detectNumberFormat()];
const systemNumberFormatLabel = formatNumber(1234.56, systemNumberFormat, 2);
const commasAndDotExample = formatNumber(
1234.56,
NumberFormat.COMMAS_AND_DOT,
2,
);
const spacesAndCommaExample = formatNumber(
1234.56,
NumberFormat.SPACES_AND_COMMA,
2,
);
const dotsAndCommaExample = formatNumber(
1234.56,
NumberFormat.DOTS_AND_COMMA,
2,
);
const apostropheAndDotExample = formatNumber(
1234.56,
NumberFormat.APOSTROPHE_AND_DOT,
2,
);
const systemNumberFormatLabel = utilFormatNumber(1234.56, {
format: systemNumberFormat,
decimals: 2,
});
const commasAndDotExample = utilFormatNumber(1234.56, {
format: NumberFormat.COMMAS_AND_DOT,
decimals: 2,
});
const spacesAndCommaExample = utilFormatNumber(1234.56, {
format: NumberFormat.SPACES_AND_COMMA,
decimals: 2,
});
const dotsAndCommaExample = utilFormatNumber(1234.56, {
format: NumberFormat.DOTS_AND_COMMA,
decimals: 2,
});
const apostropheAndDotExample = utilFormatNumber(1234.56, {
format: NumberFormat.APOSTROPHE_AND_DOT,
decimals: 2,
});
return (
<Select