Update design section to use new role metadata
This commit is contained in:
parent
aa75fca377
commit
dc0f93e314
|
@ -1,7 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
import { Select } from "@budibase/bbui"
|
import { Select } from "@budibase/bbui"
|
||||||
import { roles } from "stores/builder"
|
import { roles } from "stores/builder"
|
||||||
import { RoleUtils } from "@budibase/frontend-core"
|
|
||||||
|
|
||||||
export let value
|
export let value
|
||||||
export let error
|
export let error
|
||||||
|
@ -12,10 +11,9 @@
|
||||||
bind:value
|
bind:value
|
||||||
on:change
|
on:change
|
||||||
options={$roles}
|
options={$roles}
|
||||||
getOptionLabel={role => role.name}
|
getOptionLabel={role => role.displayName}
|
||||||
getOptionValue={role => role._id}
|
getOptionValue={role => role._id}
|
||||||
getOptionColour={role =>
|
getOptionColour={role => role.color}
|
||||||
role.color || "var(--spectrum-global-color-static-magenta-400)"}
|
|
||||||
{placeholder}
|
{placeholder}
|
||||||
{error}
|
{error}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<script>
|
<script>
|
||||||
import { RoleUtils } from "@budibase/frontend-core"
|
|
||||||
import { Tooltip, StatusLight } from "@budibase/bbui"
|
import { Tooltip, StatusLight } from "@budibase/bbui"
|
||||||
import { roles } from "stores/builder"
|
import { roles } from "stores/builder"
|
||||||
import { Roles } from "constants/backend"
|
import { Roles } from "constants/backend"
|
||||||
|
@ -13,7 +12,7 @@
|
||||||
$: tooltip =
|
$: tooltip =
|
||||||
roleId === Roles.PUBLIC
|
roleId === Roles.PUBLIC
|
||||||
? "Open to the public"
|
? "Open to the public"
|
||||||
: `Requires ${role?.name} access`
|
: `Requires ${role?.displayName} access`
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||||
|
|
Loading…
Reference in New Issue