mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Merge pull request #1575 from appwrite/fix-user-usage-graph-going-into-future
Filter the new users count to not include future days
This commit is contained in:
2 files changed
+5
-3
No files matched your search
@@ -143,7 +143,6 @@
|
||||
<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 current = data.organizationUsage.usersTotal}
|
||||
@@ -169,7 +168,7 @@
|
||||
{
|
||||
name: 'Users',
|
||||
data: accumulateFromEndingTotal(
|
||||
data.organizationUsage.users,
|
||||
data.usersUsageToDate,
|
||||
data.organizationUsage.usersTotal
|
||||
)
|
||||
}
|
||||
|
||||
@@ -72,12 +72,15 @@ export const load: PageLoad = async ({ params, parent }) => {
|
||||
}
|
||||
}
|
||||
|
||||
const usersUsageToDate = usage.users.filter((user) => new Date(user.date) < new Date());
|
||||
|
||||
return {
|
||||
organizationUsage: usage,
|
||||
projectNames,
|
||||
invoices,
|
||||
currentInvoice,
|
||||
organizationMembers,
|
||||
plan
|
||||
plan,
|
||||
usersUsageToDate
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user