forked from tsai/budibase
3 changed files with 31 additions and 3 deletions
@ -1,6 +1,15 @@ |
|||||
<script> |
<script> |
||||
import { store } from "builderStore" |
import { automationStore } from "builderStore" |
||||
import { params } from "@sveltech/routify" |
import { params } from "@sveltech/routify" |
||||
|
|
||||
store.actions.layouts.select($params.layout) |
if ($params.automation) { |
||||
|
const automation = $automationStore.automations.find( |
||||
|
m => m._id === $params.automation |
||||
|
) |
||||
|
if (automation) { |
||||
|
automationStore.actions.select(automation) |
||||
|
} |
||||
|
} |
||||
</script> |
</script> |
||||
|
|
||||
|
<slot /> |
||||
|
|||||
@ -1,5 +1,21 @@ |
|||||
<script> |
<script> |
||||
|
import { onMount } from 'svelte' |
||||
|
import { automationStore } from "builderStore" |
||||
import AutomationBuilder from "components/automation/AutomationBuilder/AutomationBuilder.svelte" |
import AutomationBuilder from "components/automation/AutomationBuilder/AutomationBuilder.svelte" |
||||
|
|
||||
|
onMount(async () => { |
||||
|
console.log('Automation Store: ', $automationStore) |
||||
|
console.log('Automation Store Methods: ', automationStore) |
||||
|
// navigate to first automation in list, if not already selected |
||||
|
// if ( |
||||
|
// !$leftover && |
||||
|
// $backendUiStore.tables.length > 0 && |
||||
|
// (!$backendUiStore.selectedTable || !$backendUiStore.selectedTable._id) |
||||
|
// ) { |
||||
|
// // this file routes as .../tables/index, so, go up one. |
||||
|
// $goto(`../${$backendUiStore.tables[0]._id}`) |
||||
|
// } |
||||
|
}) |
||||
</script> |
</script> |
||||
|
|
||||
<AutomationBuilder /> |
<AutomationBuilder /> |
||||
|
|||||
Loading…
Reference in new issue