|
|
|
@ -1,12 +1,12 @@ |
|
|
|
<script> |
|
|
|
import { tick } from "svelte" |
|
|
|
import Textbox from "../common/Textbox.svelte" |
|
|
|
import Button from "../common/Button.svelte" |
|
|
|
import Select from "../common/Select.svelte" |
|
|
|
import ActionButton from "../common/ActionButton.svelte" |
|
|
|
import getIcon from "../common/icon" |
|
|
|
import Textbox from "components/common/Textbox.svelte" |
|
|
|
import Button from "components/common/Button.svelte" |
|
|
|
import Select from "components/common/Select.svelte" |
|
|
|
import ActionButton from "components/common/ActionButton.svelte" |
|
|
|
import getIcon from "components/common/icon" |
|
|
|
import FieldView from "./FieldView.svelte" |
|
|
|
import Modal from "../common/Modal.svelte" |
|
|
|
import Modal from "components/common/Modal.svelte" |
|
|
|
import { |
|
|
|
get, |
|
|
|
compose, |
|
|
|
@ -18,11 +18,11 @@ |
|
|
|
keys, |
|
|
|
isDate, |
|
|
|
} from "lodash/fp" |
|
|
|
import { store, backendUiStore } from "../builderStore" |
|
|
|
import { common, hierarchy } from "../../../core/src" |
|
|
|
import { getNode } from "../common/core" |
|
|
|
import { templateApi, pipe, validate } from "../common/core" |
|
|
|
import ErrorsBox from "../common/ErrorsBox.svelte" |
|
|
|
import { store, backendUiStore } from "builderStore" |
|
|
|
import { common, hierarchy } from "../../../../../core/src/" |
|
|
|
import { getNode } from "components/common/core" |
|
|
|
import { templateApi, pipe, validate } from "components/common/core" |
|
|
|
import ErrorsBox from "components/common/ErrorsBox.svelte" |
|
|
|
|
|
|
|
let record |
|
|
|
let getIndexAllowedRecords |
|
|
|
@ -154,7 +154,7 @@ |
|
|
|
<div>{field.name}</div> |
|
|
|
</td> |
|
|
|
<td>{field.type}</td> |
|
|
|
<td>{field.typeOptions.values || ""}</td> |
|
|
|
<td>{field.typeOptions.values || ''}</td> |
|
|
|
<td> |
|
|
|
<i |
|
|
|
class="ri-delete-bin-6-line hoverable" |
|
|
|
@ -164,26 +164,28 @@ |
|
|
|
{/each} |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
<div class="uk-margin"> |
|
|
|
<ActionButton color="secondary" on:click={store.saveCurrentNode}> |
|
|
|
Save |
|
|
|
<div class="uk-margin"> |
|
|
|
<ActionButton color="secondary" on:click={store.saveCurrentNode}> |
|
|
|
Save |
|
|
|
</ActionButton> |
|
|
|
{#if modelExistsInHierarchy} |
|
|
|
<ActionButton color="primary" on:click={store.newChildRecord}> |
|
|
|
Create Child Model on {record.name} |
|
|
|
</ActionButton> |
|
|
|
{#if modelExistsInHierarchy} |
|
|
|
<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> |
|
|
|
<ActionButton alert on:click={store.deleteCurrentNode}>Delete</ActionButton> |
|
|
|
{/if} |
|
|
|
</div> |
|
|
|
<ActionButton |
|
|
|
color="primary" |
|
|
|
on:click={async () => { |
|
|
|
backendUiStore.actions.modals.show('VIEW') |
|
|
|
await tick() |
|
|
|
store.newChildIndex() |
|
|
|
}}> |
|
|
|
Create Child View on {record.name} |
|
|
|
</ActionButton> |
|
|
|
<ActionButton alert on:click={store.deleteCurrentNode}> |
|
|
|
Delete |
|
|
|
</ActionButton> |
|
|
|
{/if} |
|
|
|
</div> |
|
|
|
{:else} |
|
|
|
<FieldView |
|
|
|
field={fieldToEdit} |
|
|
|
|