Ensure display values for metrics are capped at 100% in the day pass modal

This commit is contained in:
Dean 2022-09-26 09:52:20 +01:00
parent 4227beb51f
commit 7cc30d6135
1 changed files with 4 additions and 1 deletions

View File

@ -12,7 +12,10 @@
$: daysRemaining = $licensing.quotaResetDaysRemaining $: daysRemaining = $licensing.quotaResetDaysRemaining
$: quotaResetDate = $licensing.quotaResetDate $: quotaResetDate = $licensing.quotaResetDate
$: dayPassesUsed = $licensing.usageMetrics?.dayPasses $: dayPassesUsed =
$licensing.usageMetrics?.dayPasses > 100
? 100
: $licensing.usageMetrics?.dayPasses
$: dayPassesTitle = $: dayPassesTitle =
dayPassesUsed >= 100 dayPassesUsed >= 100
? "You have run out of Day Passes" ? "You have run out of Day Passes"