* fix: Add item to notify when window references is empty. * fix: Display of Window references when they have many items in the list.pull/3759/head
parent
29ced53bcb
commit
2dbc02403a
|
@ -12,7 +12,7 @@
|
||||||
@shortkey.native="actionContextMenu"
|
@shortkey.native="actionContextMenu"
|
||||||
>
|
>
|
||||||
<template>
|
<template>
|
||||||
<el-submenu v-if="relationsList !== undefined && relationsList.length" class="el-menu-item" index="1">
|
<el-submenu v-if="!isEmptyValue(relationsList)" class="el-menu-item" index="1">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
{{ $t('components.contextMenuRelations') }}
|
{{ $t('components.contextMenuRelations') }}
|
||||||
</template>
|
</template>
|
||||||
|
@ -33,12 +33,24 @@
|
||||||
{{ action.name }}
|
{{ action.name }}
|
||||||
</template>
|
</template>
|
||||||
<el-scrollbar wrap-class="scroll-child">
|
<el-scrollbar wrap-class="scroll-child">
|
||||||
<el-menu-item v-for="(child, key) in action.childs" :key="key" :index="child.uuid" @click="runAction(child)">
|
<el-menu-item
|
||||||
|
v-for="(child, key) in action.childs"
|
||||||
|
:key="key"
|
||||||
|
:index="child.uuid"
|
||||||
|
@click="runAction(child)"
|
||||||
|
>
|
||||||
{{ child.name }}
|
{{ child.name }}
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
<el-menu-item v-else v-show="!action.hidden" :key="index" :index="action.name" :disabled="action.disabled" @click="runAction(action)">
|
<el-menu-item
|
||||||
|
v-else
|
||||||
|
v-show="!action.hidden"
|
||||||
|
:key="index"
|
||||||
|
:index="action.name"
|
||||||
|
:disabled="action.disabled"
|
||||||
|
@click="runAction(action)"
|
||||||
|
>
|
||||||
{{ action.name }}
|
{{ action.name }}
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</template>
|
</template>
|
||||||
|
@ -53,7 +65,9 @@
|
||||||
index="xlsx"
|
index="xlsx"
|
||||||
@click.native="exporBrowser('xlsx')"
|
@click.native="exporBrowser('xlsx')"
|
||||||
>
|
>
|
||||||
<template slot="title">{{ $t('components.contextMennuWindowReport') }}</template>
|
<template slot="title">
|
||||||
|
{{ $t('components.contextMennuWindowReport') }}
|
||||||
|
</template>
|
||||||
<template v-for="(format, index) in option">
|
<template v-for="(format, index) in option">
|
||||||
<el-menu-item :key="index" :index="index">
|
<el-menu-item :key="index" :index="index">
|
||||||
{{ format }}
|
{{ format }}
|
||||||
|
@ -87,17 +101,25 @@
|
||||||
<el-menu-item v-else disabled index="2">
|
<el-menu-item v-else disabled index="2">
|
||||||
{{ $t('components.contextMenuActions') }}
|
{{ $t('components.contextMenuActions') }}
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
<el-submenu :disabled="!isReferencesLoaded" class="el-menu-item" index="3">
|
<el-submenu :disabled="!(isReferecesContent && isLoadedReferences)" class="el-menu-item" index="3">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
{{ $t('components.contextMenuReferences') }}
|
{{ $t('components.contextMenuReferences') }}
|
||||||
</template>
|
</template>
|
||||||
<template v-if="references && references.referencesList">
|
<template v-if="references && !isEmptyValue(references.referencesList)">
|
||||||
<template v-for="(reference, index) in references.referencesList">
|
<el-scrollbar wrap-class="scroll-child">
|
||||||
<el-menu-item :key="index" :index="reference.displayName" @click="runAction(reference)">
|
<el-menu-item
|
||||||
|
v-for="(reference, index) in references.referencesList"
|
||||||
|
:key="index"
|
||||||
|
:index="reference.displayName"
|
||||||
|
@click="runAction(reference)"
|
||||||
|
>
|
||||||
{{ reference.displayName }}
|
{{ reference.displayName }}
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</template>
|
</el-scrollbar>
|
||||||
</template>
|
</template>
|
||||||
|
<el-menu-item v-else index="not-references" disabled>
|
||||||
|
{{ $t('components.withOutReferences') }}
|
||||||
|
</el-menu-item>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
</template>
|
</template>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
|
|
|
@ -54,7 +54,7 @@ export const contextMixin = {
|
||||||
downloads: this.$store.getters.getProcessResult.url,
|
downloads: this.$store.getters.getProcessResult.url,
|
||||||
metadataMenu: {},
|
metadataMenu: {},
|
||||||
recordUuid: this.$route.query.action,
|
recordUuid: this.$route.query.action,
|
||||||
isReferencesLoaded: false,
|
isLoadedReferences: false,
|
||||||
exportDefault: 'xls',
|
exportDefault: 'xls',
|
||||||
ROUTES
|
ROUTES
|
||||||
}
|
}
|
||||||
|
@ -264,31 +264,30 @@ export const contextMixin = {
|
||||||
},
|
},
|
||||||
getReferences() {
|
getReferences() {
|
||||||
if (this.isReferecesContent) {
|
if (this.isReferecesContent) {
|
||||||
var references = this.getterReferences
|
const references = this.getterReferences
|
||||||
if (references && references.length) {
|
if (references && references.length) {
|
||||||
this.references = references
|
this.references = references
|
||||||
this.isReferencesLoaded = true
|
this.isLoadedReferences = true
|
||||||
} else {
|
} else {
|
||||||
|
this.isLoadedReferences = false
|
||||||
this.$store.dispatch('getReferencesListFromServer', {
|
this.$store.dispatch('getReferencesListFromServer', {
|
||||||
parentUuid: this.parentUuid,
|
parentUuid: this.parentUuid,
|
||||||
containerUuid: this.containerUuid,
|
containerUuid: this.containerUuid,
|
||||||
recordUuid: this.recordUuid
|
recordUuid: this.recordUuid
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.references = this.$store.getters.getReferencesList(this.parentUuid, this.recordUuid)
|
this.references = this.getterReferences
|
||||||
if (this.references.referencesList.length) {
|
|
||||||
this.isReferencesLoaded = true
|
|
||||||
} else {
|
|
||||||
this.isReferencesLoaded = false
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.warn('References Load Error ' + error.code + ': ' + error.message)
|
console.warn(`References Load Error ${error.code}: ${error.message}.`)
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.isLoadedReferences = true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.references = []
|
this.references = []
|
||||||
this.isReferencesLoaded = false
|
this.isLoadedReferences = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
typeFormat(key) {
|
typeFormat(key) {
|
||||||
|
|
|
@ -30,15 +30,31 @@
|
||||||
<el-menu-item-group>
|
<el-menu-item-group>
|
||||||
<el-scrollbar wrap-class="scroll">
|
<el-scrollbar wrap-class="scroll">
|
||||||
<template v-for="(action, index) in actions">
|
<template v-for="(action, index) in actions">
|
||||||
<el-submenu v-if="action.childs" :key="index" :index="action.name" :disabled="action.disabled">
|
<el-submenu
|
||||||
|
v-if="action.childs"
|
||||||
|
:key="index"
|
||||||
|
:index="action.name"
|
||||||
|
:disabled="action.disabled"
|
||||||
|
>
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
{{ action.name }}
|
{{ action.name }}
|
||||||
</template>
|
</template>
|
||||||
<el-menu-item v-for="(child, key) in action.childs" :key="key" :index="child.uuid" @click="runAction(child)">
|
<el-menu-item
|
||||||
|
v-for="(child, key) in action.childs"
|
||||||
|
:key="key"
|
||||||
|
:index="child.uuid"
|
||||||
|
@click="runAction(child)"
|
||||||
|
>
|
||||||
{{ child.name }}
|
{{ child.name }}
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
<el-menu-item v-else :key="index" :index="action.name" :disabled="action.disabled" @click="runAction(action)">
|
<el-menu-item
|
||||||
|
v-else
|
||||||
|
:key="index"
|
||||||
|
:index="action.name"
|
||||||
|
:disabled="action.disabled"
|
||||||
|
@click="runAction(action)"
|
||||||
|
>
|
||||||
<svg-icon v-if="action.type === 'process'" icon-class="component" />
|
<svg-icon v-if="action.type === 'process'" icon-class="component" />
|
||||||
{{ action.name }}
|
{{ action.name }}
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
|
@ -57,17 +73,25 @@
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</el-menu-item-group>
|
</el-menu-item-group>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
<el-submenu :disabled="!isReferecesContent && !isReferencesLoaded" class="el-menu-item" index="3">
|
<el-submenu :disabled="!(isReferecesContent && isLoadedReferences)" class="el-menu-item" index="3">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
{{ $t('components.contextMenuReferences') }}
|
{{ $t('components.contextMenuReferences') }}
|
||||||
</template>
|
</template>
|
||||||
<template v-if="references && references.referencesList">
|
<template v-if="references && isEmptyValue(references.referencesList)">
|
||||||
<template v-for="(reference, index) in references.referencesList">
|
<el-scrollbar wrap-class="scroll-child">
|
||||||
<el-menu-item :key="index" :index="reference.displayName" @click="runAction(reference)">
|
<el-menu-item
|
||||||
|
v-for="(reference, index) in references.referencesList"
|
||||||
|
:key="index"
|
||||||
|
:index="reference.displayName"
|
||||||
|
@click="runAction(reference)"
|
||||||
|
>
|
||||||
{{ reference.displayName }}
|
{{ reference.displayName }}
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</template>
|
</el-scrollbar>
|
||||||
</template>
|
</template>
|
||||||
|
<el-menu-item v-else index="not-references" disabled>
|
||||||
|
{{ $t('components.withOutReferences') }}
|
||||||
|
</el-menu-item>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
</right-menu>
|
</right-menu>
|
||||||
|
|
|
@ -122,6 +122,7 @@ export default {
|
||||||
contextMenuRelations: 'Relations',
|
contextMenuRelations: 'Relations',
|
||||||
contextMenuActions: 'Actions',
|
contextMenuActions: 'Actions',
|
||||||
contextMenuReferences: 'References',
|
contextMenuReferences: 'References',
|
||||||
|
withOutReferences: 'Without references for record',
|
||||||
RunProcess: 'Run',
|
RunProcess: 'Run',
|
||||||
ChangeParameters: 'Change Parameters',
|
ChangeParameters: 'Change Parameters',
|
||||||
RunProcessAs: 'Run As',
|
RunProcessAs: 'Run As',
|
||||||
|
|
|
@ -122,6 +122,7 @@ export default {
|
||||||
contextMenuRelations: 'Relaciones',
|
contextMenuRelations: 'Relaciones',
|
||||||
contextMenuActions: 'Acciones',
|
contextMenuActions: 'Acciones',
|
||||||
contextMenuReferences: 'Referencias',
|
contextMenuReferences: 'Referencias',
|
||||||
|
withOutReferences: 'Sin referencias para el registro',
|
||||||
contextMenuDownload: 'Descargar',
|
contextMenuDownload: 'Descargar',
|
||||||
contextMenuShareLink: 'Compartir Link',
|
contextMenuShareLink: 'Compartir Link',
|
||||||
contextMenuRefresh: 'Actualizar',
|
contextMenuRefresh: 'Actualizar',
|
||||||
|
|
Loading…
Reference in New Issue