1
0
Fork 0
mirror of synced 2024-09-11 23:16:00 +12:00
This commit is contained in:
Peter Clement 2022-02-11 14:38:34 +00:00
parent d4b98095c2
commit f44471d9d0
5 changed files with 6 additions and 37 deletions

View file

@ -1,25 +0,0 @@
<script>
import { automationStore } from "builderStore"
import { ModalContent, Toggle } from "@budibase/bbui"
$: rowControl = $automationStore.selectedAutomation.automation.rowControl
async function toggleFieldControl(evt) {
await automationStore.actions.toggleFieldControl(evt.detail)
await automationStore.actions.save(
$automationStore.selectedAutomation?.automation
)
}
</script>
<ModalContent
title="Automation Configuration"
showConfirmButton={false}
showCancelButton={false}
>
<Toggle
bind:value={rowControl}
on:change={toggleFieldControl}
text="Row Control"
/>
</ModalContent>

View file

@ -14,12 +14,10 @@
Toggle, Toggle,
Tooltip, Tooltip,
} from "@budibase/bbui" } from "@budibase/bbui"
import ConfigModal from "./ConfigModal.svelte"
export let automation export let automation
export let onSelect export let onSelect
let configModal
let testDataModal let testDataModal
let blocks let blocks
let confirmDeleteDialog let confirmDeleteDialog
@ -121,10 +119,6 @@
<Modal bind:this={testDataModal} width="30%"> <Modal bind:this={testDataModal} width="30%">
<TestDataModal {testAutomation} /> <TestDataModal {testAutomation} />
</Modal> </Modal>
<Modal bind:this={configModal}>
<ConfigModal />
</Modal>
</div> </div>
<style> <style>

View file

@ -98,7 +98,7 @@
{#if !schema.autocolumn} {#if !schema.autocolumn}
{#if schema.type !== "attachment"} {#if schema.type !== "attachment"}
{#if $automationStore.selectedAutomation.automation.testData} {#if $automationStore.selectedAutomation.automation.testData}
{#if $automationStore.selectedAutomation.automation.rowControl} {#if !$automationStore.selectedAutomation.automation.rowControl}
<RowSelectorTypes <RowSelectorTypes
{field} {field}
{schema} {schema}
@ -115,10 +115,10 @@
type={value.customType} type={value.customType}
on:change={e => onChange(e, field, schema.type)} on:change={e => onChange(e, field, schema.type)}
{bindings} {bindings}
allowJS={true} allowJS={false}
/> />
{/if} {/if}
{:else if $automationStore.selectedAutomation.automation.rowControl} {:else if !$automationStore.selectedAutomation.automation.rowControl}
<RowSelectorTypes {field} {schema} {bindings} {value} {onChange} /> <RowSelectorTypes {field} {schema} {bindings} {value} {onChange} />
{:else} {:else}
<DrawerBindableInput <DrawerBindableInput
@ -130,7 +130,7 @@
type="string" type="string"
{bindings} {bindings}
fillWidth={true} fillWidth={true}
allowJS={true} allowJS={false}
/> />
{/if} {/if}
{/if} {/if}

View file

@ -59,6 +59,6 @@
type="string" type="string"
{bindings} {bindings}
fillWidth={true} fillWidth={true}
allowJS={true} allowJS={false}
/> />
{/if} {/if}

View file

@ -26,7 +26,7 @@
export let value = "" export let value = ""
export let valid export let valid
export let allowJS = false export let allowJS = false
$: console.log(value)
let helpers = handlebarsCompletions() let helpers = handlebarsCompletions()
let getCaretPosition let getCaretPosition
let search = "" let search = ""