allow creation of username
This commit is contained in:
parent
88a61b3b72
commit
b4440abdd6
|
@ -7,11 +7,13 @@
|
||||||
import LinkedRowSelector from "components/common/LinkedRowSelector.svelte"
|
import LinkedRowSelector from "components/common/LinkedRowSelector.svelte"
|
||||||
|
|
||||||
export let meta
|
export let meta
|
||||||
|
export let creating
|
||||||
export let value = meta.type === "boolean" ? false : ""
|
export let value = meta.type === "boolean" ? false : ""
|
||||||
|
|
||||||
$: type = meta.type
|
$: type = meta.type
|
||||||
$: label = capitalise(meta.name)
|
$: label = capitalise(meta.name)
|
||||||
$: userTableSelected = $backendUiStore.selectedTable?._id === TableNames.USERS
|
$: editingUser =
|
||||||
|
!creating && $backendUiStore.selectedTable?._id === TableNames.USERS
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if type === 'options'}
|
{#if type === 'options'}
|
||||||
|
@ -39,5 +41,5 @@
|
||||||
data-cy="{meta.name}-input"
|
data-cy="{meta.name}-input"
|
||||||
{type}
|
{type}
|
||||||
bind:value
|
bind:value
|
||||||
disabled={userTableSelected} />
|
disabled={editingUser} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
{#each tableSchema as [key, meta]}
|
{#each tableSchema as [key, meta]}
|
||||||
<div>
|
<div>
|
||||||
<RowFieldControl {meta} bind:value={row[key]} />
|
<RowFieldControl {meta} bind:value={row[key]} {creating} />
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
|
|
Loading…
Reference in New Issue