diff --git a/apps/workflowengine/js/workflowengine.js b/apps/workflowengine/js/workflowengine.js
index e0980ac2aaf97..2cf14e5828adf 100644
--- a/apps/workflowengine/js/workflowengine.js
+++ b/apps/workflowengine/js/workflowengine.js
@@ -1,4 +1,4 @@
-!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/js/",n(n.s=535)}([function(e,t,n){(function(e){e.exports=function(){"use strict";var t,o;function r(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e){return void 0===e}function c(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var n,o=[];for(n=0;n \n\t\t\t\t{{ t('workflowengine', 'When') }}\n\t\t\t\t \n\t\t\t\t{{ t('workflowengine', 'and') }}\n\t\t\t\t \n\t\t\t\t\n\t\t\t\t\n\t\t\t \n\t\t\t\t{{ t('workflowengine', 'For details on how to write your own flow, check out the development documentation.') }}\n\t\t\t \n\t\t\t{{ t('workflowengine', 'Please enter a valid time span') }}\n\t\t \n\t\t\t\t{{ t('workflowengine', 'When') }}\n\t\t\t\t \n\t\t\t\t{{ t('workflowengine', 'and') }}\n\t\t\t\t \n\t\t\t\t\n\t\t\t\t\n\t\t\t \n\t\t\t\t{{ t('workflowengine', 'For details on how to write your own flow, check out the development documentation.') }}\n\t\t\t \n\t\t\t{{ t('workflowengine', 'Please enter a valid time span') }}\n\t\t{{ operation.name }}
\n\t\t\t{{ operation.description }}\n\t\t\t{{ t('workflowengine', 'Available flows') }}
\n\n\t\t\t{{ t('workflowengine', 'More flows') }}
\n\t\t\t\t\t\t{{ t('workflowengine', 'Browse the app store') }}\n\t\t\t\t\t\n\t\t\t\t{{ t('workflowengine', 'Configured flows') }}\n\t\t\t
\n\t\t\t\n\t\t\t\t{{ t('workflowengine', 'Your flows') }}\n\t\t\t
\n\t\t\n\t\t\t\t{{ props.option.label }}\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t{{ props.option.label }}\n\t\t\t\n\t\t
{{ operation.name }}
\n\t\t\t{{ operation.description }}\n\t\t\t{{ t('workflowengine', 'Available flows') }}
\n\n\t\t\t{{ t('workflowengine', 'More flows') }}
\n\t\t\t\t\t\t{{ t('workflowengine', 'Browse the app store') }}\n\t\t\t\t\t\n\t\t\t\t{{ t('workflowengine', 'Configured flows') }}\n\t\t\t
\n\t\t\t\n\t\t\t\t{{ t('workflowengine', 'Your flows') }}\n\t\t\t
\n\t\t\n\t\t\t\t{{ props.option.label }}\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t{{ props.option.label }}\n\t\t\t\n\t\t
@@ -77,7 +78,6 @@ export default { checks: [], error: null, dirty: this.rule.id < 0, - checking: false, originalRule: null, } }, @@ -93,7 +93,7 @@ export default { tooltip: { placement: 'bottom', show: true, content: this.error }, } } - if (!this.dirty || this.checking) { + if (!this.dirty) { return { title: t('workflowengine', 'Active'), class: 'icon icon-checkmark' } } return { title: t('workflowengine', 'Save'), class: 'icon-confirm-white primary' } @@ -112,22 +112,17 @@ export default { this.$set(this.rule, 'operation', operation) await this.updateRule() }, - async updateRule() { - this.checking = true + validate(state) { + this.error = null + this.$store.dispatch('updateRule', this.rule) + }, + updateRule() { if (!this.dirty) { this.dirty = true } - try { - // TODO: add new verify endpoint - // let result = await axios.post(OC.generateUrl(`/apps/workflowengine/operations/test`), this.rule) - this.error = null - this.checking = false - this.$store.dispatch('updateRule', this.rule) - } catch (e) { - console.error('Failed to update operation', e) - this.error = e.response.ocs.meta.message - this.checking = false - } + + this.error = null + this.$store.dispatch('updateRule', this.rule) }, async saveRule() { try { diff --git a/apps/workflowengine/src/store.js b/apps/workflowengine/src/store.js index 7cb1956b6ffa2..c02aa99f63ad4 100644 --- a/apps/workflowengine/src/store.js +++ b/apps/workflowengine/src/store.js @@ -114,7 +114,9 @@ const store = new Vuex.Store({ context.commit('removeRule', rule) }, async pushUpdateRule(context, rule) { - await confirmPassword() + if (context.state.scope === 0) { + await confirmPassword() + } let result if (rule.id < 0) { result = await axios.post(getApiUrl(''), rule) diff --git a/apps/workflowengine/src/workflowengine.js b/apps/workflowengine/src/workflowengine.js index b212e6be844c7..7e5456f5cb2f2 100644 --- a/apps/workflowengine/src/workflowengine.js +++ b/apps/workflowengine/src/workflowengine.js @@ -20,6 +20,8 @@ * */ +import '@babel/polyfill' + import Vue from 'vue' import Vuex from 'vuex' import store from './store'