Merge pull request #18766 from nextcloud/bugfix/workflow-filter-store
Filter disabled operations out of the rule list
This commit is contained in:
commit
31c74e87c8
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -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 @@
|
||||||
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({
|
||||||
},
|
},
|
||||||
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
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue