diff options
Diffstat (limited to 'apps/workflowengine/src/components/Check.vue')
-rw-r--r-- | apps/workflowengine/src/components/Check.vue | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/apps/workflowengine/src/components/Check.vue b/apps/workflowengine/src/components/Check.vue index c8c7c46aa87..8cfe5a89020 100644 --- a/apps/workflowengine/src/components/Check.vue +++ b/apps/workflowengine/src/components/Check.vue @@ -15,6 +15,7 @@ </template> <script> + import { Checks } from '../services/Operation'; import { Multiselect, Actions, ActionButton } from 'nextcloud-vue' import ClickOutside from 'vue-click-outside'; @@ -43,13 +44,8 @@ } }, mounted() { - this.options = Object.values(OCA.WorkflowEngine.Plugins).map((plugin) => { - if (plugin.component) { - return {...plugin.getCheck(), component: plugin.component} - } - return plugin.getCheck() - }) - this.currentOption = this.options.find((option) => option.class === this.check.class) + this.options = Object.values(Checks) + this.currentOption = Checks[this.check.class] this.currentOperator = this.operators.find((operator) => operator.operator === this.check.operator) this.$nextTick(() => { this.$refs.checkSelector.$el.focus() @@ -59,12 +55,12 @@ operators() { if (!this.currentOption) return [] - return this.options.find((item) => item.class === this.currentOption.class).operators + return Checks[this.currentOption.class].operators }, currentComponent() { if (!this.currentOption) return [] - let currentComponent = this.options.find((item) => item.class === this.currentOption.class).component + let currentComponent = Checks[this.currentOption.class].component return currentComponent && currentComponent() } }, @@ -101,4 +97,4 @@ ::placeholder { font-size: 10px; } -</style>
\ No newline at end of file +</style> |