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

View File

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

View File

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