From 5dff2f30173a32cf122b20b96dd40635577c4bd5 Mon Sep 17 00:00:00 2001 From: Dean Date: Wed, 26 Apr 2023 14:16:36 +0100 Subject: [PATCH 1/5] Added pending users to user portal screen --- .../builder/portal/users/users/index.svelte | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) 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 984ecd46ff..0c69e2c213 100644 --- a/packages/builder/src/pages/builder/portal/users/users/index.svelte +++ b/packages/builder/src/pages/builder/portal/users/users/index.svelte @@ -110,6 +110,27 @@ } }) } + let invitesLoaded = false + let pendingInvites = [] + let parsedInvites = [] + + const invitesToSchema = invites => { + return invites.map(invite => { + const { admin, builder, userGroups, apps } = invite.info + + return { + email: invite.email, + builder, + admin, + userGroups: userGroups, + apps: apps ? [...new Set(Object.keys(apps))] : undefined, + } + }) + } + $: parsedInvites = invitesToSchema(pendingInvites) + $: console.log("parsed invites ", parsedInvites) + // $: console.log(pendingInvites) + $: console.log(enrichedUsers) const updateFetch = email => { fetch.update({ @@ -232,6 +253,9 @@ try { await groups.actions.init() groupsLoaded = true + + pendingInvites = await users.getInvites() + invitesLoaded = true } catch (error) { notifications.error("Error fetching user group data") } @@ -326,6 +350,23 @@ + + + Pending invitations + A list of all pending user invitations + + + + + + From 785b6f50ae7619bf9fcc82389e7635697ae7c399 Mon Sep 17 00:00:00 2001 From: Dean Date: Wed, 26 Apr 2023 14:53:31 +0100 Subject: [PATCH 2/5] Removed console debugging --- .../builder/src/pages/builder/portal/users/users/index.svelte | 3 --- 1 file changed, 3 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 0c69e2c213..19beb67773 100644 --- a/packages/builder/src/pages/builder/portal/users/users/index.svelte +++ b/packages/builder/src/pages/builder/portal/users/users/index.svelte @@ -128,9 +128,6 @@ }) } $: parsedInvites = invitesToSchema(pendingInvites) - $: console.log("parsed invites ", parsedInvites) - // $: console.log(pendingInvites) - $: console.log(enrichedUsers) const updateFetch = email => { fetch.update({ From 4f8e293dc9dec147d66de0fb4e0703f52c472346 Mon Sep 17 00:00:00 2001 From: Dean Date: Wed, 26 Apr 2023 16:42:27 +0100 Subject: [PATCH 3/5] Refresh pending invites after inviting a new user in the portal user menu --- .../builder/src/pages/builder/portal/users/users/index.svelte | 1 + 1 file changed, 1 insertion(+) 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 19beb67773..ff5ad2356e 100644 --- a/packages/builder/src/pages/builder/portal/users/users/index.svelte +++ b/packages/builder/src/pages/builder/portal/users/users/index.svelte @@ -162,6 +162,7 @@ })) try { inviteUsersResponse = await users.invite(payload) + pendingInvites = await users.getInvites() inviteConfirmationModal.show() } catch (error) { notifications.error("Error inviting user") From 19ed0ec3f59270c6c7418e0ea7870e9055f1bbbe Mon Sep 17 00:00:00 2001 From: Dean Date: Wed, 3 May 2023 11:22:38 +0100 Subject: [PATCH 4/5] Feedback updates and a fix for z-index issue in user side panel --- .../components/backend/DataTable/Table.svelte | 2 ++ .../_components/BuilderSidePanel.svelte | 4 ++-- .../builder/portal/users/users/index.svelte | 22 ++++++++++--------- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/Table.svelte b/packages/builder/src/components/backend/DataTable/Table.svelte index 4df6e9a306..460a02a9b1 100644 --- a/packages/builder/src/components/backend/DataTable/Table.svelte +++ b/packages/builder/src/components/backend/DataTable/Table.svelte @@ -22,6 +22,7 @@ export let rowCount export let disableSorting = false export let customPlaceholder = false + export let allowClickRows const dispatch = createEventDispatcher() @@ -110,6 +111,7 @@ {disableSorting} {customPlaceholder} showAutoColumns={!hideAutocolumns} + {allowClickRows} on:clickrelationship={e => selectRelationship(e.detail)} on:sort > diff --git a/packages/builder/src/pages/builder/app/[application]/_components/BuilderSidePanel.svelte b/packages/builder/src/pages/builder/app/[application]/_components/BuilderSidePanel.svelte index 9a6d9ea1d3..be8237f616 100644 --- a/packages/builder/src/pages/builder/app/[application]/_components/BuilderSidePanel.svelte +++ b/packages/builder/src/pages/builder/app/[application]/_components/BuilderSidePanel.svelte @@ -555,7 +555,7 @@ {#if filteredUsers?.length}
-
+
Users
Access
@@ -696,7 +696,7 @@ max-width: calc(100vw - 40px); background: var(--background); border-left: var(--border-light); - z-index: 3; + z-index: 999; display: flex; flex-direction: column; overflow-y: auto; 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 ff5ad2356e..4053ef5ff3 100644 --- a/packages/builder/src/pages/builder/portal/users/users/index.svelte +++ b/packages/builder/src/pages/builder/portal/users/users/index.svelte @@ -88,6 +88,16 @@ }, } + 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: [] } $: { @@ -346,22 +356,14 @@ goToNextPage={fetch.nextPage} />
- - - - - Pending invitations - A list of all pending user invitations - - -
From b713b3f414ec0b5e3437b9da6f67a40d8d5b4ae9 Mon Sep 17 00:00:00 2001 From: Budibase Staging Release Bot <> Date: Mon, 15 May 2023 10:54:40 +0000 Subject: [PATCH 5/5] Bump version to 2.6.8-alpha.11 --- lerna.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lerna.json b/lerna.json index e3afa83e45..664712d568 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.6.8-alpha.10", + "version": "2.6.8-alpha.11", "npmClient": "yarn", "packages": [ "packages/backend-core",