From 7cc30d6135f302a705dcc1120df52f95ba468b90 Mon Sep 17 00:00:00 2001 From: Dean Date: Mon, 26 Sep 2022 09:52:20 +0100 Subject: [PATCH] Ensure display values for metrics are capped at 100% in the day pass modal --- .../components/portal/licensing/DayPassWarningModal.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/portal/licensing/DayPassWarningModal.svelte b/packages/builder/src/components/portal/licensing/DayPassWarningModal.svelte index b1aade2ca5..341e427bf0 100644 --- a/packages/builder/src/components/portal/licensing/DayPassWarningModal.svelte +++ b/packages/builder/src/components/portal/licensing/DayPassWarningModal.svelte @@ -12,7 +12,10 @@ $: daysRemaining = $licensing.quotaResetDaysRemaining $: quotaResetDate = $licensing.quotaResetDate - $: dayPassesUsed = $licensing.usageMetrics?.dayPasses + $: dayPassesUsed = + $licensing.usageMetrics?.dayPasses > 100 + ? 100 + : $licensing.usageMetrics?.dayPasses $: dayPassesTitle = dayPassesUsed >= 100 ? "You have run out of Day Passes"