We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3ee3821 + a08709e commit 61bc0adCopy full SHA for 61bc0ad
src/lib/components/billing/usageRates.svelte
@@ -50,6 +50,13 @@
50
];
51
52
$: isFree = org.billingPlan === BillingPlan.FREE;
53
+
54
+ // equal or above means unlimited!
55
+ $: getCorrectSeatsCountValue = (count: number): string | number => {
56
+ // php int max is always larger than js
57
+ const exceedsSafeLimit = count >= Number.MAX_SAFE_INTEGER;
58
+ return exceedsSafeLimit ? 'Unlimited' : count || 0;
59
+ };
60
</script>
61
62
<Modal bind:show size="big" headerDivider={false} title="Usage rates">
@@ -81,7 +88,7 @@
81
88
<TableRow>
82
89
<TableCellText title="resource">{usage.resource}</TableCellText>
83
90
<TableCellText title="limit">
84
- {plan.addons.seats.limit || 0}
91
+ {getCorrectSeatsCountValue(plan.addons.seats.limit)}
85
92
</TableCellText>
86
93
{#if !isFree}
87
94
<TableCellText title="rate">
0 commit comments