-
-
- {getHighestRole(app.role).name}
+ {#if allAppList.length}
+ {#each allAppList as app}
+
-
+
+
{/each}
{:else}
diff --git a/packages/builder/src/pages/builder/portal/manage/users/_components/AddUserModal.svelte b/packages/builder/src/pages/builder/portal/manage/users/_components/AddUserModal.svelte
index 3ff1b3df0c..a475ea01c1 100644
--- a/packages/builder/src/pages/builder/portal/manage/users/_components/AddUserModal.svelte
+++ b/packages/builder/src/pages/builder/portal/manage/users/_components/AddUserModal.svelte
@@ -5,39 +5,33 @@
Label,
ModalContent,
Multiselect,
- notifications,
InputDropdown,
} from "@budibase/bbui"
- import { users, groups } from "stores/portal"
- import analytics, { Events } from "analytics"
+ import { createEventDispatcher } from "svelte"
+ import { groups } from "stores/portal"
import { Constants } from "@budibase/frontend-core"
export let disabled
export let showOnboardingTypeModal
- const options = ["Email onboarding", "Basic onboarding"]
- let selected = options[0]
- let builder, admin
- $: userData = [{ email: "", role: "", error: null }]
+ const dispatch = createEventDispatcher()
+
+ $: userData = [{ email: "", role: "", groups: [], error: null }]
- /*
- async function createUserFlow() {
- try {
- const res = await users.invite({ email: "", builder, admin })
- notifications.success(res.message)
- analytics.captureEvent(Events.USER.INVITE, { type: selected })
- } catch (error) {
- notifications.error("Error inviting user")
- }
- }
- */
function addNewInput() {
userData = [...userData, { email: "", role: "" }]
}
+
+ function setValue(e) {
+ userData.groups = e.detail
+ }
{
+ showOnboardingTypeModal()
+ dispatch("change", userData)
+ }}
size="M"
title="Add new user"
confirmText="Add user"
@@ -64,6 +58,7 @@
setValue(e)}
label="User Groups"
options={$groups}
getOptionLabel={option => option.name}
diff --git a/packages/builder/src/pages/builder/portal/manage/users/_components/ImportUsersModal.svelte b/packages/builder/src/pages/builder/portal/manage/users/_components/ImportUsersModal.svelte
index 24db91500d..b9b4f91af8 100644
--- a/packages/builder/src/pages/builder/portal/manage/users/_components/ImportUsersModal.svelte
+++ b/packages/builder/src/pages/builder/portal/manage/users/_components/ImportUsersModal.svelte
@@ -1,8 +1,44 @@
Import your users email addrresses from a CSV
-
-
- Upload
-
+
+
+
@@ -49,4 +88,51 @@
justify-content: center;
align-items: center;
}
+
+ .error {
+ color: var(--red);
+ }
+
+ .dropzone {
+ text-align: center;
+ display: flex;
+ align-items: center;
+ flex-direction: column;
+ border-radius: 10px;
+ transition: all 0.3s;
+ }
+ .uploaded {
+ color: var(--blue);
+ }
+
+ label {
+ font-family: var(--font-sans);
+ cursor: pointer;
+ font-weight: 600;
+ box-sizing: border-box;
+ overflow: hidden;
+ border-radius: var(--border-radius-s);
+ color: var(--ink);
+ padding: var(--spacing-m) var(--spacing-l);
+ transition: all 0.2s ease 0s;
+ display: inline-flex;
+ text-rendering: optimizeLegibility;
+ min-width: auto;
+ outline: none;
+ font-feature-settings: "case" 1, "rlig" 1, "calt" 0;
+ -webkit-box-align: center;
+ user-select: none;
+ flex-shrink: 0;
+ align-items: center;
+ justify-content: center;
+ width: 100%;
+ background-color: var(--grey-2);
+ font-size: var(--font-size-xs);
+ line-height: normal;
+ border: var(--border-transparent);
+ }
+
+ input[type="file"] {
+ display: none;
+ }
diff --git a/packages/builder/src/pages/builder/portal/manage/users/_components/OnboardingTypeModal.svelte b/packages/builder/src/pages/builder/portal/manage/users/_components/OnboardingTypeModal.svelte
index 089721348e..7ec6d338d5 100644
--- a/packages/builder/src/pages/builder/portal/manage/users/_components/OnboardingTypeModal.svelte
+++ b/packages/builder/src/pages/builder/portal/manage/users/_components/OnboardingTypeModal.svelte
@@ -1,6 +1,7 @@
@@ -11,31 +80,44 @@
Assign users to your app and define their access here
-
+
-
-
-
-
-
-
+ {#each appGroups as group}
+
+
+
+ {/each}
-
-
-
-
-
-
-
-
-
+ {#each appUsers as user}
+
+ extractAppId(x) === extractAppId(app.appId)
+ )
+ ]}
+ />
+
+ {/each}
+