From daba84abbec93f60974a9622dd72b37194f9c640 Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Wed, 9 Sep 2020 22:15:31 +0100 Subject: [PATCH] Create record added --- .../EventsEditor/EventEditorModal.svelte | 2 +- .../EventsEditor/actions/CreateRecord.svelte | 69 ++++++++++- .../EventsEditor/actions/SaveFields.svelte | 115 ++++++++++++++++++ .../EventsEditor/actions/UpdateRecord.svelte | 115 +++--------------- 4 files changed, 200 insertions(+), 101 deletions(-) create mode 100644 packages/builder/src/components/userInterface/EventsEditor/actions/SaveFields.svelte diff --git a/packages/builder/src/components/userInterface/EventsEditor/EventEditorModal.svelte b/packages/builder/src/components/userInterface/EventsEditor/EventEditorModal.svelte index c1611d0c22..1aecd84314 100644 --- a/packages/builder/src/components/userInterface/EventsEditor/EventEditorModal.svelte +++ b/packages/builder/src/components/userInterface/EventsEditor/EventEditorModal.svelte @@ -4,7 +4,7 @@ import { AddIcon, ArrowDownIcon } from "components/common/Icons/" import { EVENT_TYPE_MEMBER_NAME } from "../../common/eventHandlers" import actionTypes from "./actions" - import { createEventDispatcher, onMount } from "svelte" + import { createEventDispatcher } from "svelte" const dispatch = createEventDispatcher() diff --git a/packages/builder/src/components/userInterface/EventsEditor/actions/CreateRecord.svelte b/packages/builder/src/components/userInterface/EventsEditor/actions/CreateRecord.svelte index 777b3a380c..945a30c45c 100644 --- a/packages/builder/src/components/userInterface/EventsEditor/actions/CreateRecord.svelte +++ b/packages/builder/src/components/userInterface/EventsEditor/actions/CreateRecord.svelte @@ -1,5 +1,72 @@ -
Create Record
+
+ + + + {#if parameters.modelId} + + {/if} + +
+ + diff --git a/packages/builder/src/components/userInterface/EventsEditor/actions/SaveFields.svelte b/packages/builder/src/components/userInterface/EventsEditor/actions/SaveFields.svelte new file mode 100644 index 0000000000..d8870e6f18 --- /dev/null +++ b/packages/builder/src/components/userInterface/EventsEditor/actions/SaveFields.svelte @@ -0,0 +1,115 @@ + + +{#if fields} + {#each fields as field} + + + + +
+ + + +
+ {/each} + +
+ + + + Add Field +
+ +
+
+
+{/if} + + diff --git a/packages/builder/src/components/userInterface/EventsEditor/actions/UpdateRecord.svelte b/packages/builder/src/components/userInterface/EventsEditor/actions/UpdateRecord.svelte index 41f785074c..9e0236c547 100644 --- a/packages/builder/src/components/userInterface/EventsEditor/actions/UpdateRecord.svelte +++ b/packages/builder/src/components/userInterface/EventsEditor/actions/UpdateRecord.svelte @@ -1,32 +1,11 @@
@@ -128,45 +83,11 @@ {/if} - {#if parameters.recordId && fields} - {#each fields as field} - - - - -
- - - -
- {/each} - -
- - - - Add Field -
- -
-
-
+ {#if parameters.recordId} + {/if}
@@ -185,10 +106,6 @@ grid-column-end: 6; } - .remove-field-container :global(button) { - vertical-align: bottom; - } - .cannot-use { color: var(--red); font-size: var(--font-size-s);