diff --git a/lerna.json b/lerna.json
index 36b7efdf76..c8f2b409df 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,5 +1,5 @@
{
- "version": "1.1.32-alpha.4",
+ "version": "1.1.33-alpha.0",
"npmClient": "yarn",
"packages": [
"packages/*"
diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json
index c6d924c66b..9657702909 100644
--- a/packages/backend-core/package.json
+++ b/packages/backend-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@budibase/backend-core",
- "version": "1.1.32-alpha.4",
+ "version": "1.1.33-alpha.0",
"description": "Budibase backend core libraries used in server and worker",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
@@ -20,7 +20,7 @@
"test:watch": "jest --watchAll"
},
"dependencies": {
- "@budibase/types": "1.1.32-alpha.4",
+ "@budibase/types": "1.1.33-alpha.0",
"@techpass/passport-openidconnect": "0.3.2",
"aws-sdk": "2.1030.0",
"bcrypt": "5.0.1",
diff --git a/packages/bbui/package.json b/packages/bbui/package.json
index 1ff4801766..fdccebe2df 100644
--- a/packages/bbui/package.json
+++ b/packages/bbui/package.json
@@ -1,7 +1,7 @@
{
"name": "@budibase/bbui",
"description": "A UI solution used in the different Budibase projects.",
- "version": "1.1.32-alpha.4",
+ "version": "1.1.33-alpha.0",
"license": "MPL-2.0",
"svelte": "src/index.js",
"module": "dist/bbui.es.js",
@@ -38,7 +38,7 @@
],
"dependencies": {
"@adobe/spectrum-css-workflow-icons": "^1.2.1",
- "@budibase/string-templates": "1.1.32-alpha.4",
+ "@budibase/string-templates": "1.1.33-alpha.0",
"@spectrum-css/actionbutton": "^1.0.1",
"@spectrum-css/actiongroup": "^1.0.1",
"@spectrum-css/avatar": "^3.0.2",
diff --git a/packages/bbui/src/Form/Core/PickerDropdown.svelte b/packages/bbui/src/Form/Core/PickerDropdown.svelte
index 5682a91218..fbe43717ba 100644
--- a/packages/bbui/src/Form/Core/PickerDropdown.svelte
+++ b/packages/bbui/src/Form/Core/PickerDropdown.svelte
@@ -233,7 +233,10 @@
{:else if getPrimaryOptionColour(option, idx)}
-
+
{/if}
{:else if secondaryFieldColour}
-
+
{/if}
@@ -319,6 +323,7 @@
{#if getSecondaryOptionColour(option, idx)}
@@ -351,6 +356,13 @@
min-width: 0;
width: 100%;
}
+ .spectrum-InputGroup :global(.spectrum-Search-input) {
+ border: none;
+ border-bottom: 1px solid var(--spectrum-global-color-gray-300);
+ border-bottom-left-radius: 0;
+ border-bottom-right-radius: 0;
+ }
+
.override-borders {
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
diff --git a/packages/builder/package.json b/packages/builder/package.json
index ee817f3796..4e4089ebe5 100644
--- a/packages/builder/package.json
+++ b/packages/builder/package.json
@@ -1,6 +1,6 @@
{
"name": "@budibase/builder",
- "version": "1.1.32-alpha.4",
+ "version": "1.1.33-alpha.0",
"license": "GPL-3.0",
"private": true,
"scripts": {
@@ -69,10 +69,10 @@
}
},
"dependencies": {
- "@budibase/bbui": "1.1.32-alpha.4",
- "@budibase/client": "1.1.32-alpha.4",
- "@budibase/frontend-core": "1.1.32-alpha.4",
- "@budibase/string-templates": "1.1.32-alpha.4",
+ "@budibase/bbui": "1.1.33-alpha.0",
+ "@budibase/client": "1.1.33-alpha.0",
+ "@budibase/frontend-core": "1.1.33-alpha.0",
+ "@budibase/string-templates": "1.1.33-alpha.0",
"@sentry/browser": "5.19.1",
"@spectrum-css/page": "^3.0.1",
"@spectrum-css/vars": "^3.0.1",
diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte
index 304d41ad19..3c99c90d49 100644
--- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte
+++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte
@@ -186,7 +186,7 @@
$goto("./navigation")
}
} else if (type === "request-add-component") {
- $goto("./components/new")
+ $goto(`./components/${$selectedComponent?._id}/new`)
} else if (type === "highlight-setting") {
store.actions.settings.highlight(data.setting)
diff --git a/packages/builder/src/pages/builder/portal/_layout.svelte b/packages/builder/src/pages/builder/portal/_layout.svelte
index 26409ef695..21259c4d84 100644
--- a/packages/builder/src/pages/builder/portal/_layout.svelte
+++ b/packages/builder/src/pages/builder/portal/_layout.svelte
@@ -72,7 +72,7 @@
href: "/builder/portal/manage/groups",
}
- menu.splice(1, 0, item)
+ menu.splice(2, 0, item)
}
if (!$adminStore.cloud) {
diff --git a/packages/builder/src/pages/builder/portal/manage/groups/[groupId].svelte b/packages/builder/src/pages/builder/portal/manage/groups/[groupId].svelte
index 2bcfd85cb6..17c16c639b 100644
--- a/packages/builder/src/pages/builder/portal/manage/groups/[groupId].svelte
+++ b/packages/builder/src/pages/builder/portal/manage/groups/[groupId].svelte
@@ -18,23 +18,44 @@
import { users, apps, groups } from "stores/portal"
import { onMount } from "svelte"
import { RoleUtils } from "@budibase/frontend-core"
+ import { roles } from "stores/backend"
export let groupId
+
let popoverAnchor
let popover
let searchTerm = ""
let selectedUsers = []
- let prevSearch = undefined,
- search = undefined
+ let prevSearch = undefined
let pageInfo = createPaginationStore()
+ let loaded = false
$: page = $pageInfo.page
- $: fetchUsers(page, search)
+ $: fetchUsers(page, searchTerm)
$: group = $groups.find(x => x._id === groupId)
async function addAll() {
- group.users = selectedUsers
+ selectedUsers = [...selectedUsers, ...filtered.map(u => u._id)]
+
+ let reducedUserObjects = filtered.map(u => {
+ return {
+ _id: u._id,
+ email: u.email,
+ }
+ })
+ group.users = [...reducedUserObjects, ...group.users]
+
await groups.actions.save(group)
+
+ $users.data.forEach(async user => {
+ let userToEdit = await users.get(user._id)
+ let userGroups = userToEdit.userGroups || []
+ userGroups.push(groupId)
+ await users.save({
+ ...userToEdit,
+ userGroups,
+ })
+ })
}
async function selectUser(id) {
@@ -97,106 +118,119 @@
prevSearch = search
try {
pageInfo.loading()
- await users.search({ page, search })
+ await users.search({ page, email: search })
pageInfo.fetched($users.hasNextPage, $users.nextPage)
} catch (error) {
notifications.error("Error getting user list")
}
}
+ const getRoleLabel = appId => {
+ const roleId = group?.roles?.[`app_${appId}`]
+ const role = $roles.find(x => x._id === roleId)
+ return role?.name || "Custom role"
+ }
+
onMount(async () => {
try {
- await groups.actions.init()
- await apps.load()
+ await Promise.all([groups.actions.init(), apps.load(), roles.fetch()])
+ loaded = true
} catch (error) {
- notifications.error("Error fetching User Group data")
+ notifications.error("Error fetching user group data")
}
})
-
-
-
$goto("../groups")} size="S" icon="ArrowLeft">
- Back
-
-
-