Fix labels and add colours to access level selctor for queries
This commit is contained in:
parent
3ae5ce9802
commit
1e4f105901
|
@ -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}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -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}
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue