diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-08-31 11:53:15 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-09-10 09:01:24 +0200 |
commit | 28a7721b2b485e2ad842d91001601e5e35f71b70 (patch) | |
tree | db09284d0e331a3b9f22c7f2b1e2b34e1f2fb53d /apps/workflowengine/src/workflowengine.js | |
parent | ae55829989d84c6e3937982479bacb79576333cb (diff) | |
download | nextcloud-server-28a7721b2b485e2ad842d91001601e5e35f71b70.tar.gz nextcloud-server-28a7721b2b485e2ad842d91001601e5e35f71b70.zip |
Handle operator registration properly
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/workflowengine/src/workflowengine.js')
-rw-r--r-- | apps/workflowengine/src/workflowengine.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/workflowengine/src/workflowengine.js b/apps/workflowengine/src/workflowengine.js index 6e22852b829..cae85c3c24a 100644 --- a/apps/workflowengine/src/workflowengine.js +++ b/apps/workflowengine/src/workflowengine.js @@ -4,6 +4,7 @@ import store from './store' import Settings from './components/Workflow' import FileValues from './components/Values/file' +import {Operators} from './services/Operation'; /** * A plugin for displaying a custom value field for checks @@ -21,7 +22,7 @@ import FileValues from './components/Values/file' * A plugin for extending the admin page repesentation of a operator * * @typedef {Object} OperatorPlugin - * @property {string} class - The PHP class name of the check + * @property {string} id - The PHP class name of the check * @property {string} operation - Default value for the operation field * @property {string} color - Custom color code to be applied for the operator selector * @property {Vue} component - A vue component to handle the rendering of options @@ -40,6 +41,8 @@ import FileValues from './components/Values/file' * Public javascript api for apps to register custom plugins */ window.OCA.WorkflowEngine = Object.assign({}, OCA.WorkflowEngine, { + + /** * * @param {CheckPlugin} Plugin @@ -58,6 +61,7 @@ window.OCA.WorkflowEngine = Object.assign({}, OCA.WorkflowEngine, { // Register shipped checks for file entity FileValues.forEach((checkPlugin) => window.OCA.WorkflowEngine.registerCheck(checkPlugin)) +Object.values(Operators).forEach((operatorPlugin) => window.OCA.WorkflowEngine.registerOperator(operatorPlugin)) Vue.use(Vuex) Vue.prototype.t = t |