Merge pull request #14842 from Budibase/BUDI-8723/new-automation-not-selected-upon-creation
Navigate to automation on creation
This commit is contained in:
commit
b7e34f7f83
|
@ -1,4 +1,5 @@
|
||||||
<script>
|
<script>
|
||||||
|
import { goto } from "@roxi/routify"
|
||||||
import { automationStore } from "stores/builder"
|
import { automationStore } from "stores/builder"
|
||||||
import {
|
import {
|
||||||
notifications,
|
notifications,
|
||||||
|
@ -32,11 +33,12 @@
|
||||||
triggerVal.stepId,
|
triggerVal.stepId,
|
||||||
triggerVal
|
triggerVal
|
||||||
)
|
)
|
||||||
await automationStore.actions.create(name, trigger)
|
const automation = await automationStore.actions.create(name, trigger)
|
||||||
if (triggerVal.stepId === TriggerStepID.WEBHOOK) {
|
if (triggerVal.stepId === TriggerStepID.WEBHOOK) {
|
||||||
webhookModal.show()
|
webhookModal.show()
|
||||||
}
|
}
|
||||||
notifications.success(`Automation ${name} created`)
|
notifications.success(`Automation ${name} created`)
|
||||||
|
$goto(`../automation/${automation._id}`)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
notifications.error("Error creating automation")
|
notifications.error("Error creating automation")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue