summaryrefslogtreecommitdiffstats
path: root/apps/workflowengine/src/store.js
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-09-02 11:35:33 +0200
committerJulius Härtl <jus@bitgrid.net>2019-09-10 09:01:24 +0200
commit1742f97acf62df08d2527120200f6e70736f33ec (patch)
tree3efbdde4e2a167004a70f65910c8e72ad8f2b4aa /apps/workflowengine/src/store.js
parent69ac169fd9ff3b798e6744a685d2292a1a8a565b (diff)
downloadnextcloud-server-1742f97acf62df08d2527120200f6e70736f33ec.tar.gz
nextcloud-server-1742f97acf62df08d2527120200f6e70736f33ec.zip
Allow placeholder and validation without custom vue component
Signed-off-by: Julius Härtl <jus@bitgrid.net>
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: {