From 30622a53bf028a344158e42f16f6842d27e7f8e5 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"