Fix labels and add colours to access level selctor for queries

This commit is contained in:
Andrew Kingston 2024-10-22 15:25:15 +01:00
parent 3ae5ce9802
commit 1e4f105901
No known key found for this signature in database
3 changed files with 7 additions and 11 deletions

View File

@ -5,6 +5,7 @@
export let value
export let error
export let placeholder = null
export let autoWidth = false
</script>
<Select
@ -16,4 +17,5 @@
getOptionColour={role => role.uiMetadata.color}
{placeholder}
{error}
{autoWidth}
/>

View File

@ -1,7 +1,8 @@
<script>
import { Label, notifications, Select } from "@budibase/bbui"
import { permissions, roles } from "stores/builder"
import { Label, notifications } from "@budibase/bbui"
import { permissions } from "stores/builder"
import { Constants } from "@budibase/frontend-core"
import RoleSelect from "components/design/settings/controls/RoleSelect.svelte"
export let query
export let label
@ -52,12 +53,5 @@
{#if label}
<Label>{label}</Label>
{/if}
<Select
value={roleId}
on:change={e => updateRole(e.detail)}
options={$roles}
getOptionLabel={x => x.name}
getOptionValue={x => x._id}
autoWidth
/>
<RoleSelect value={roleId} on:change={e => updateRole(e.detail)} autoWidth />
{/if}

View File

@ -503,7 +503,7 @@
on:save={saveQuery}
/>
<div class="access">
<Label>Access level</Label>
<Label>Access</Label>
<AccessLevelSelect {query} {saveId} />
</div>
</div>