summaryrefslogtreecommitdiffstats
path: root/apps/workflowengine
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-10-15 20:19:38 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2019-10-29 18:03:56 +0100
commit928cf4bfcc2da4d12b2be915f6b77c1ea132cd2d (patch)
tree86a2c430e6c3e299e6cf7394a4e4be8ff1fab914 /apps/workflowengine
parent2adcc754137e0b31518693c3e823eb40548403d7 (diff)
downloadnextcloud-server-928cf4bfcc2da4d12b2be915f6b77c1ea132cd2d.tar.gz
nextcloud-server-928cf4bfcc2da4d12b2be915f6b77c1ea132cd2d.zip
Fix issue with unavailable operations
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/workflowengine')
-rw-r--r--apps/workflowengine/src/components/Rule.vue2
-rw-r--r--apps/workflowengine/src/helpers/api.js3
2 files changed, 3 insertions, 2 deletions
diff --git a/apps/workflowengine/src/components/Rule.vue b/apps/workflowengine/src/components/Rule.vue
index 2d3d5c8491a..fb04112b178 100644
--- a/apps/workflowengine/src/components/Rule.vue
+++ b/apps/workflowengine/src/components/Rule.vue
@@ -1,5 +1,5 @@
<template>
- <div class="section rule" :style="{ borderLeftColor: operation.color || '' }">
+ <div v-if="operation" class="section rule" :style="{ borderLeftColor: operation.color || '' }">
<div class="trigger">
<p>
<span>{{ t('workflowengine', 'When') }}</span>
diff --git a/apps/workflowengine/src/helpers/api.js b/apps/workflowengine/src/helpers/api.js
index ee4e8c7a520..76861d3bb35 100644
--- a/apps/workflowengine/src/helpers/api.js
+++ b/apps/workflowengine/src/helpers/api.js
@@ -19,10 +19,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-const scopeValue = OCP.InitialState.loadState('workflowengine', 'scope') === 0 ? 'global' : 'user'
import { loadState } from '@nextcloud/initial-state'
+const scopeValue = loadState('workflowengine', 'scope') === 0 ? 'global' : 'user'
+
const getApiUrl = (url) => {
return OC.linkToOCS('apps/workflowengine/api/v1/workflows', 2) + scopeValue + url + '?format=json'
}