Filter the new users count to not include future days

This commit is contained in:
ernstmul
2024-12-20 13:40:50 +01:00
parent 0c084db575
commit 3b9138c21f
@@ -143,9 +143,11 @@
<Heading tag="h6" size="7">Users</Heading>
<p class="text">The total number of users across all projects in your organization.</p>
<svelte:fragment slot="aside">
{#if data.organizationUsage.users}
{@const users = data.organizationUsage.users.filter(
(user) => new Date(user.date) < new Date()
)}
{@const current = data.organizationUsage.usersTotal}
{@const max = getServiceLimit('users', tier, plan)}
<ProgressBarBig
@@ -169,7 +171,7 @@
{
name: 'Users',
data: accumulateFromEndingTotal(
data.organizationUsage.users,
users,
data.organizationUsage.usersTotal
)
}