UI fixes
This commit is contained in:
parent
c19a67b095
commit
32e6c5bd7a
|
@ -37,6 +37,7 @@
|
||||||
const id = event?.detail
|
const id = event?.detail
|
||||||
const role = $roles.find(role => role._id === id)
|
const role = $roles.find(role => role._id === id)
|
||||||
if (role) {
|
if (role) {
|
||||||
|
console.log("INH ", role.inherits)
|
||||||
selectedRole = {
|
selectedRole = {
|
||||||
...role,
|
...role,
|
||||||
inherits: role.inherits ?? "",
|
inherits: role.inherits ?? "",
|
||||||
|
@ -124,7 +125,7 @@
|
||||||
<Select
|
<Select
|
||||||
label="Inherits Role"
|
label="Inherits Role"
|
||||||
bind:value={selectedRole.inherits}
|
bind:value={selectedRole.inherits}
|
||||||
options={otherRoles}
|
options={$roles}
|
||||||
getOptionValue={role => role._id}
|
getOptionValue={role => role._id}
|
||||||
getOptionLabel={role => role.name}
|
getOptionLabel={role => role.name}
|
||||||
disabled={builtInRoles.includes(selectedRole.name)}
|
disabled={builtInRoles.includes(selectedRole.name)}
|
||||||
|
@ -139,7 +140,7 @@
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
{#if !isCreating}
|
{#if !isCreating && !builtInRoles.includes(selectedRole.name)}
|
||||||
<Button warning on:click={deleteRole}>Delete</Button>
|
<Button warning on:click={deleteRole}>Delete</Button>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue