Fix issue with unavailable operations

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2019-10-15 20:19:38 +02:00 committed by Arthur Schiwon
parent 2adcc75413
commit 928cf4bfcc
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
2 changed files with 3 additions and 2 deletions

View File

@ -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>

View File

@ -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'
}