1
0
Fork 0
mirror of synced 2024-09-29 08:41:16 +13:00

add relationship selector to automation blocks

This commit is contained in:
Peter Clement 2021-10-12 14:13:33 +01:00
parent 31feef6882
commit b2b1d53c94

View file

@ -5,6 +5,7 @@
import AutomationBindingPanel from "../../common/bindings/ServerBindingPanel.svelte"
import { createEventDispatcher } from "svelte"
import ModalBindableInput from "components/common/bindings/ModalBindableInput.svelte"
import LinkedRowSelector from "components/common/LinkedRowSelector.svelte"
import { automationStore } from "builderStore"
const dispatch = createEventDispatcher()
@ -42,6 +43,8 @@
function schemaHasOptions(schema) {
return !!schema.constraints?.inclusion?.length
}
$: console.log($tables.list)
</script>
<Select
@ -81,6 +84,8 @@
label={field}
options={schema.constraints.inclusion}
/>
{:else if schema.type === "link"}
<LinkedRowSelector bind:linkedRows={value[field]} {schema} />
{:else if schema.type === "string" || schema.type === "number"}
{#if $automationStore.selectedAutomation.automation.testData}
<ModalBindableInput