1
0
Fork 0
mirror of synced 2024-09-29 08:41:16 +13:00

allow creation of username

This commit is contained in:
Martin McKeaveney 2020-11-27 15:24:43 +00:00
parent 88a61b3b72
commit b4440abdd6
2 changed files with 5 additions and 3 deletions

View file

@ -7,11 +7,13 @@
import LinkedRowSelector from "components/common/LinkedRowSelector.svelte"
export let meta
export let creating
export let value = meta.type === "boolean" ? false : ""
$: type = meta.type
$: label = capitalise(meta.name)
$: userTableSelected = $backendUiStore.selectedTable?._id === TableNames.USERS
$: editingUser =
!creating && $backendUiStore.selectedTable?._id === TableNames.USERS
</script>
{#if type === 'options'}
@ -39,5 +41,5 @@
data-cy="{meta.name}-input"
{type}
bind:value
disabled={userTableSelected} />
disabled={editingUser} />
{/if}

View file

@ -47,7 +47,7 @@
{/if}
{#each tableSchema as [key, meta]}
<div>
<RowFieldControl {meta} bind:value={row[key]} />
<RowFieldControl {meta} bind:value={row[key]} {creating} />
</div>
{/each}
</ModalContent>