Skip to content
Snippets Groups Projects
Unverified Commit 31c74e87 authored by blizzz's avatar blizzz Committed by GitHub
Browse files

Merge pull request #18766 from nextcloud/bugfix/workflow-filter-store

Filter disabled operations out of the rule list
parents 1437c21d 302fd1ae
No related branches found
No related tags found
No related merge requests found
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
...@@ -121,6 +121,7 @@ export default { ...@@ -121,6 +121,7 @@ export default {
this.deleteVisible = false this.deleteVisible = false
}, },
validate() { validate() {
this.valid = true
if (this.currentOption && this.currentOption.validate) { if (this.currentOption && this.currentOption.validate) {
this.valid = !!this.currentOption.validate(this.check) this.valid = !!this.currentOption.validate(this.check)
} }
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
type="button" type="button"
class="check--add" class="check--add"
value="Add a new filter" value="Add a new filter"
@click="rule.checks.push({class: null, operator: null, value: null})"> @click="rule.checks.push({class: null, operator: null, value: ''})">
</p> </p>
</div> </div>
<div class="flow-icon icon-confirm" /> <div class="flow-icon icon-confirm" />
......
...@@ -138,7 +138,7 @@ const store = new Vuex.Store({ ...@@ -138,7 +138,7 @@ const store = new Vuex.Store({
}, },
getters: { getters: {
getRules(state) { getRules(state) {
return state.rules.sort((rule1, rule2) => { return state.rules.filter((rule) => typeof state.operations[rule.class] !== 'undefined').sort((rule1, rule2) => {
return rule1.id - rule2.id || rule2.class - rule1.class return rule1.id - rule2.id || rule2.class - rule1.class
}) })
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment