summaryrefslogtreecommitdiffstats
path: root/apps/workflowengine/src/store.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/workflowengine/src/store.js')
-rw-r--r--apps/workflowengine/src/store.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/workflowengine/src/store.js b/apps/workflowengine/src/store.js
index b38bef0e6ea..a6af51b65d8 100644
--- a/apps/workflowengine/src/store.js
+++ b/apps/workflowengine/src/store.js
@@ -58,7 +58,7 @@ const store = new Vuex.Store({
},
mutations: {
addRule(state, rule) {
- state.rules.push(rule)
+ state.rules.push({ ...rule, valid: true })
},
updateRule(state, rule) {
const index = state.rules.findIndex((item) => rule.id === item.id)
@@ -129,6 +129,10 @@ const store = new Vuex.Store({
await confirmPassword()
await axios.delete(getApiUrl(`/${rule.id}`))
context.commit('removeRule', rule)
+ },
+ setValid (context, { rule, valid }) {
+ rule.valid = valid
+ context.commit('updateRule', rule)
}
},
getters: {