Rename create new row to create new user for users table

This commit is contained in:
Andrew Kingston 2020-12-14 13:24:09 +00:00
parent 449509a203
commit 119107834f
3 changed files with 4 additions and 2 deletions

View File

@ -44,6 +44,7 @@
<CreateColumnButton /> <CreateColumnButton />
{#if schema && Object.keys(schema).length > 0} {#if schema && Object.keys(schema).length > 0}
<CreateRowButton <CreateRowButton
title={isUsersTable ? 'Create New User' : 'Create New Row'}
modalContentComponent={isUsersTable ? CreateEditUser : CreateEditRow} /> modalContentComponent={isUsersTable ? CreateEditUser : CreateEditRow} />
<CreateViewButton /> <CreateViewButton />
<ExportButton view={tableView} /> <ExportButton view={tableView} />

View File

@ -3,6 +3,7 @@
import CreateEditRow from "../modals/CreateEditRow.svelte" import CreateEditRow from "../modals/CreateEditRow.svelte"
export let modalContentComponent = CreateEditRow export let modalContentComponent = CreateEditRow
export let title = "Create New Row"
let modal let modal
</script> </script>
@ -10,7 +11,7 @@
<div> <div>
<Button text small on:click={modal.show}> <Button text small on:click={modal.show}>
<Icon name="addrow" /> <Icon name="addrow" />
Create New Row {title}
</Button> </Button>
</div> </div>
<Modal bind:this={modal}> <Modal bind:this={modal}>

View File

@ -7,7 +7,7 @@
$: { $: {
const allRoutes = $store.routes const allRoutes = $store.routes
const sortedPaths = Object.keys(allRoutes).sort() const sortedPaths = Object.keys(allRoutes || {}).sort()
const selectedRoleId = $selectedAccessRole const selectedRoleId = $selectedAccessRole
const selectedScreenId = $store.selectedScreenId const selectedScreenId = $store.selectedScreenId