allow creation of child views

This commit is contained in:
Martin McKeaveney 2020-03-26 10:10:18 +00:00
parent 6ac63dfdf9
commit ff0ecda010
3 changed files with 15 additions and 6 deletions

View File

@ -4,6 +4,7 @@
import Button from "../common/Button.svelte"
import Dropdown from "../common/Dropdown.svelte"
import { store } from "../builderStore"
import ActionsHeader from "./ActionsHeader.svelte"
import { filter, some, map, compose } from "lodash/fp"
import { hierarchy as hierarchyFunctions, common } from "../../../core/src"
import ErrorsBox from "../common/ErrorsBox.svelte"
@ -98,6 +99,7 @@
<CodeArea bind:text={index.getShardName} label="Shard Name" />
{/if}
<ActionsHeader />
</form>
<style>

View File

@ -6,5 +6,4 @@
<section>
<IndexView />
<ActionsHeader />
</section>

View File

@ -1,4 +1,5 @@
<script>
import { tick } from "svelte"
import Textbox from "../common/Textbox.svelte"
import Button from "../common/Button.svelte"
import Select from "../common/Select.svelte"
@ -7,7 +8,7 @@
import FieldView from "./FieldView.svelte"
import Modal from "../common/Modal.svelte"
import { map, join, filter, some, find, keys, isDate } from "lodash/fp"
import { store } from "../builderStore"
import { store, backendUiStore } from "../builderStore"
import { common, hierarchy } from "../../../core/src"
import { getNode } from "../common/core"
import { templateApi, pipe, validate } from "../common/core"
@ -154,6 +155,13 @@
<ActionButton color="primary" on:click={store.newChildRecord}>
Create Child Model on {record.name}
</ActionButton>
<ActionButton color="primary" on:click={async () => {
backendUiStore.actions.modals.show("VIEW")
await tick()
store.newChildIndex()
}}>
Create Child View on {record.name}
</ActionButton>
{/if}
</ActionsHeader>
{:else}