Merge pull request #2960 from Budibase/bug/fix-automation-ordering
fix issue where automation was not being added in the correct order
This commit is contained in:
commit
b2961b5764
|
@ -5,7 +5,7 @@
|
||||||
// ***********************************************
|
// ***********************************************
|
||||||
//
|
//
|
||||||
|
|
||||||
Cypress.on('uncaught:exception', (err, runnable) => {
|
Cypress.on("uncaught:exception", () => {
|
||||||
return false
|
return false
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -4,10 +4,11 @@
|
||||||
import { externalActions } from "./ExternalActions"
|
import { externalActions } from "./ExternalActions"
|
||||||
|
|
||||||
export let blockIdx
|
export let blockIdx
|
||||||
|
export let blockComplete
|
||||||
|
|
||||||
let selectedAction
|
let selectedAction
|
||||||
let actionVal
|
let actionVal
|
||||||
let actions = Object.entries($automationStore.blockDefinitions.ACTION)
|
let actions = Object.entries($automationStore.blockDefinitions.ACTION)
|
||||||
export let blockComplete
|
|
||||||
|
|
||||||
const external = actions.reduce((acc, elm) => {
|
const external = actions.reduce((acc, elm) => {
|
||||||
const [k, v] = elm
|
const [k, v] = elm
|
||||||
|
@ -36,10 +37,9 @@
|
||||||
actionVal.stepId,
|
actionVal.stepId,
|
||||||
actionVal
|
actionVal
|
||||||
)
|
)
|
||||||
automationStore.actions.addBlockToAutomation(newBlock)
|
automationStore.actions.addBlockToAutomation(newBlock, blockIdx + 1)
|
||||||
await automationStore.actions.save(
|
await automationStore.actions.save(
|
||||||
$automationStore.selectedAutomation?.automation,
|
$automationStore.selectedAutomation?.automation
|
||||||
blockIdx
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -151,7 +151,7 @@
|
||||||
>
|
>
|
||||||
{/if}
|
{/if}
|
||||||
<Button
|
<Button
|
||||||
disabled={disableAddButton ? true : !hasCompletedInputs}
|
disabled={!hasCompletedInputs}
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
setupToggled = false
|
setupToggled = false
|
||||||
actionModal.show()
|
actionModal.show()
|
||||||
|
|
Loading…
Reference in New Issue