From 9e18c666ad27d7a09ffa49ad9dc7c5f1ecf7bf15 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 31 Oct 2023 12:10:31 +0000 Subject: [PATCH] Restructure user list page a bit --- .../builder/portal/users/users/index.svelte | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/users/users/index.svelte b/packages/builder/src/pages/builder/portal/users/users/index.svelte index 5545765c15..ff8b749602 100644 --- a/packages/builder/src/pages/builder/portal/users/users/index.svelte +++ b/packages/builder/src/pages/builder/portal/users/users/index.svelte @@ -45,6 +45,10 @@ datasource: { type: "user", }, + options: { + paginate: true, + limit: 10, + }, }) let groupsLoaded = !$licensing.groupsEnabled || $groups?.length @@ -64,10 +68,12 @@ { column: "role", component: RoleTableRenderer }, ] let userData = [] + let invitesLoaded = false + let pendingInvites = [] + let parsedInvites = [] $: isOwner = $auth.accountPortalAccess && $admin.cloud $: readonly = !sdk.users.isAdmin($auth.user) || $features.isScimEnabled - $: debouncedUpdateFetch(searchEmail) $: schema = { email: { @@ -87,16 +93,6 @@ width: "1fr", }, } - - const getPendingSchema = tblSchema => { - if (!tblSchema) { - return {} - } - let pendingSchema = JSON.parse(JSON.stringify(tblSchema)) - pendingSchema.email.displayName = "Pending Invites" - return pendingSchema - } - $: pendingSchema = getPendingSchema(schema) $: userData = [] $: inviteUsersResponse = { successful: [], unsuccessful: [] } @@ -120,9 +116,15 @@ } }) } - let invitesLoaded = false - let pendingInvites = [] - let parsedInvites = [] + + const getPendingSchema = tblSchema => { + if (!tblSchema) { + return {} + } + let pendingSchema = JSON.parse(JSON.stringify(tblSchema)) + pendingSchema.email.displayName = "Pending Invites" + return pendingSchema + } const invitesToSchema = invites => { return invites.map(invite => {