From 21b28a3de85c8fc4aac0c9f3e042d0b4d979b0de Mon Sep 17 00:00:00 2001 From: Dean Date: Thu, 4 Jul 2024 12:05:56 +0100 Subject: [PATCH] Added new Generate automation button and added it to the table --- .../backend/DataTable/TableDataTable.svelte | 4 + .../grid/GridCreateAutomationButton.svelte | 112 ++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 packages/builder/src/components/backend/DataTable/buttons/grid/GridCreateAutomationButton.svelte diff --git a/packages/builder/src/components/backend/DataTable/TableDataTable.svelte b/packages/builder/src/components/backend/DataTable/TableDataTable.svelte index e8e1008e3c..525421f996 100644 --- a/packages/builder/src/components/backend/DataTable/TableDataTable.svelte +++ b/packages/builder/src/components/backend/DataTable/TableDataTable.svelte @@ -5,6 +5,7 @@ import { TableNames } from "constants" import { Grid } from "@budibase/frontend-core" import { API } from "api" + import GridCreateAutomationButton from "./buttons/grid/GridCreateAutomationButton.svelte" import GridAddColumnModal from "components/backend/DataTable/modals/grid/GridCreateColumnModal.svelte" import GridCreateEditRowModal from "components/backend/DataTable/modals/grid/GridCreateEditRowModal.svelte" import GridEditUserModal from "components/backend/DataTable/modals/grid/GridEditUserModal.svelte" @@ -81,6 +82,9 @@ {/if} + {#if !isUsersTable} + + {/if} {#if relationshipsEnabled} {/if} diff --git a/packages/builder/src/components/backend/DataTable/buttons/grid/GridCreateAutomationButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/grid/GridCreateAutomationButton.svelte new file mode 100644 index 0000000000..60aae9e195 --- /dev/null +++ b/packages/builder/src/components/backend/DataTable/buttons/grid/GridCreateAutomationButton.svelte @@ -0,0 +1,112 @@ + + +
+ (open = !open)} + selected={open} + > + Generate + +
+ + + + { + open = false + createAutomation(TriggerStepID.ROW_SAVED) + console.log("create") + }} + > + Automation: when row is created + + { + open = false + createAutomation(TriggerStepID.ROW_UPDATED) + console.log("update") + }} + > + Automation: when row is updated + + + + +