diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-08-19 17:13:33 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-09-10 09:01:23 +0200 |
commit | 9f8ccf1036ff18d961949bfb644c9d445caa8a23 (patch) | |
tree | 5f8e4654ddbdce95cf66f0ed6ef602d312fbe5ba /apps/workflowengine/src/components/Check.vue | |
parent | aed630ac0a63771c7a217a3c1d400a354929fafe (diff) | |
download | nextcloud-server-9f8ccf1036ff18d961949bfb644c9d445caa8a23.tar.gz nextcloud-server-9f8ccf1036ff18d961949bfb644c9d445caa8a23.zip |
Use entity/event definitions from backend
Signed-off-by: Julius Härtl <jus@bitgrid.net>
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> |