Handle disabled

This commit is contained in:
Adria Navarro 2023-09-01 11:44:40 +02:00
parent 5b7756936d
commit 8c801f2bbe
1 changed files with 18 additions and 21 deletions

View File

@ -71,14 +71,11 @@
{#if requiresPlanToModify} {#if requiresPlanToModify}
<span class="lock-tag"> <span class="lock-tag">
<Tags> <Tags>
<Tag icon="LockClosed">{requiresPlanToModify}</Tag> <Tag icon="LockClosed">{capitalise(requiresPlanToModify)}</Tag>
</Tags> </Tags>
</span> </span>
{/if} {/if}
</span> </span>
{#if requiresPlanToModify}
<Body size="S">{requiresPlanToModify}</Body>
{:else}
<Body size="S">Specify the minimum access level role for this data.</Body> <Body size="S">Specify the minimum access level role for this data.</Body>
<div class="row"> <div class="row">
<Label extraSmall grey>Level</Label> <Label extraSmall grey>Level</Label>
@ -86,6 +83,7 @@
{#each Object.keys(computedPermissions) as level} {#each Object.keys(computedPermissions) as level}
<Input value={capitalise(level)} disabled /> <Input value={capitalise(level)} disabled />
<Select <Select
disabled={requiresPlanToModify}
placeholder={false} placeholder={false}
value={computedPermissions[level].selectedValue} value={computedPermissions[level].selectedValue}
on:change={e => changePermission(level, e.detail)} on:change={e => changePermission(level, e.detail)}
@ -95,7 +93,6 @@
/> />
{/each} {/each}
</div> </div>
{/if}
</ModalContent> </ModalContent>
<style> <style>