From 8b8bce186c6c7f9b77e6ba73babc0d2af292ea11 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Tue, 29 Aug 2023 14:41:56 +0100 Subject: [PATCH] builder side panel changes to support inviting creators --- .../src/components/common/RoleSelect.svelte | 79 ++- .../_components/BuilderSidePanel.svelte | 542 +++++++++++------- .../src/api/controllers/global/users.ts | 15 +- 3 files changed, 395 insertions(+), 241 deletions(-) diff --git a/packages/builder/src/components/common/RoleSelect.svelte b/packages/builder/src/components/common/RoleSelect.svelte index 62be915dcb..cef032f7c5 100644 --- a/packages/builder/src/components/common/RoleSelect.svelte +++ b/packages/builder/src/components/common/RoleSelect.svelte @@ -1,5 +1,5 @@ - role.name} + getOptionValue={role => role._id} + getOptionColour={getColor} + getOptionIcon={getIcon} + isOptionEnabled={option => { + if (option._id == CreatorID && !$licensing.perAppBuildersEnabled) { + return false + } else { + return true + } + }} + {placeholder} + {error} + /> +{/if} 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 bf405dbc52..5bb8676ec0 100644 --- a/packages/builder/src/pages/builder/app/[application]/_components/BuilderSidePanel.svelte +++ b/packages/builder/src/pages/builder/app/[application]/_components/BuilderSidePanel.svelte @@ -1,6 +1,7 @@