Tidying up debugging console statements and comments

This commit is contained in:
Dean 2024-07-04 14:30:51 +01:00
parent b1496be3d3
commit a764bfb6a5
1 changed files with 1 additions and 16 deletions

View File

@ -7,22 +7,15 @@
notifications,
} from "@budibase/bbui"
import { getContext } from "svelte"
import { automationStore } from "stores/builder"
import { automationStore, tables } from "stores/builder"
import { TriggerStepID } from "constants/backend/automations"
import { tables } from "stores/builder"
import { goto } from "@roxi/routify"
const { datasource } = getContext("grid")
// ROW_SAVED
// ROW_UPDATED
$: console.log($datasource)
$: triggers = $automationStore.blockDefinitions.TRIGGER
$: table = $tables.list.find(table => table._id === $datasource.tableId)
$: console.log("table", table)
// $: rowCreateTrigger = triggers[TriggerStepID.ROW_SAVED]
// $: rowUpdateTrigger = triggers[TriggerStepID.ROW_UPDATED]
async function createAutomation(type) {
const triggerType = triggers[type]
@ -48,13 +41,7 @@
triggerBlock.inputs = { tableId: $datasource.tableId }
// need to set inputs to { "tableId": "ta_bb_employee" },
try {
console.log("REQ", {
automationName,
triggerBlock,
})
const response = await automationStore.actions.create(
automationName,
triggerBlock
@ -90,7 +77,6 @@
on:click={() => {
open = false
createAutomation(TriggerStepID.ROW_SAVED)
console.log("create")
}}
>
Automation: when row is created
@ -100,7 +86,6 @@
on:click={() => {
open = false
createAutomation(TriggerStepID.ROW_UPDATED)
console.log("update")
}}
>
Automation: when row is updated