From 683855a0d4c92e8cea43293186dbee1c5668186b Mon Sep 17 00:00:00 2001 From: elsiosanchez <45974454+elsiosanchez@users.noreply.github.com> Date: Tue, 21 Jan 2020 13:59:29 -0400 Subject: [PATCH] Solve empty menu in relationships (#234) * Solve empty menu in relationships * fixe style of dashboard * Review changes of Fixe style of dashboard * delete console.log --- src/App.vue | 4 ---- .../ADempiere/ContextMenu/contextMenuMixin.js | 18 ++++++------------ .../ADempiere/DataTable/menu/mixinMenu.js | 10 ++-------- 3 files changed, 8 insertions(+), 24 deletions(-) diff --git a/src/App.vue b/src/App.vue index fed2f0fe..117eb414 100644 --- a/src/App.vue +++ b/src/App.vue @@ -26,10 +26,6 @@ export default { }, getWindowHeight(event) { this.$store.dispatch('setHeight', document.documentElement.clientHeight) - }, - theAction(event) { - console.log(event) - alert('ok', event) } } } diff --git a/src/components/ADempiere/ContextMenu/contextMenuMixin.js b/src/components/ADempiere/ContextMenu/contextMenuMixin.js index 5d81d715..87cb7f39 100644 --- a/src/components/ADempiere/ContextMenu/contextMenuMixin.js +++ b/src/components/ADempiere/ContextMenu/contextMenuMixin.js @@ -74,8 +74,13 @@ export const contextMixin = { relations() { if (this.$route.params.menuParentUuid !== undefined) { return this.$store.getters.getRelations(this.$route.params.menuParentUuid) + } else { + return this.$store.getters.getRelations(this.menuParentUuid).filter(relations => { + if (!relations.hidden) { + return relations + } + }) } - return this.$store.getters.getRelations(this.menuParentUuid) }, getterContextMenu() { return this.$store.getters.getContextMenu(this.containerUuid) @@ -195,7 +200,6 @@ export const contextMixin = { methods: { showNotification, actionContextMenu(event) { - console.log(event) switch (event.srcKey) { case 'f2': this.$store.dispatch('resetPanelToNew', { @@ -395,7 +399,6 @@ export const contextMixin = { } }, runAction(action) { - console.log(action) if (action.type === 'action') { // run process or report const fieldNotReady = this.$store.getters.isNotReadyForSubmit(this.$route.meta.uuid) @@ -472,14 +475,6 @@ export const contextMixin = { } }) } else { - console.log('actionaction', action.action) - console.log('parentUuid:', this.parentUuid) - console.log('containerUuid:', this.containerUuid,) - console.log('recordUuid:', this.recordUuid) - console.log('panelType:', this.panelType) - console.log('isNewRecord:', action.action === 'resetPanelToNew') - console.log('tableName:', action.tableName) - console.log('recordId:', action.recordId) this.$store.dispatch(action.action, { parentUuid: this.parentUuid, containerUuid: this.containerUuid, @@ -490,7 +485,6 @@ export const contextMixin = { recordId: action.recordId }) .then(response => { - console.log(response) if (response && response.isPrivateAccess) { this.validatePrivateAccess(response) } diff --git a/src/components/ADempiere/DataTable/menu/mixinMenu.js b/src/components/ADempiere/DataTable/menu/mixinMenu.js index 62cd0fb4..30124393 100644 --- a/src/components/ADempiere/DataTable/menu/mixinMenu.js +++ b/src/components/ADempiere/DataTable/menu/mixinMenu.js @@ -57,6 +57,7 @@ export const menuTableMixin = { }, computed: { isProcessTable() { + console.log(this.$route) if (this.isProcessMenu) { return true } @@ -215,13 +216,6 @@ export const menuTableMixin = { } }, tableProcess(process) { - // if (!this.isOption) { - // if (this.getDataSelection.length <= 1) { - // this.showModal(process) - // } - // } else { - // this.showModal(process) - // } this.showModal(process) }, showTotals() { @@ -313,7 +307,7 @@ export const menuTableMixin = { exportFileZip({ header: Header, data, - filename: '', + title: this.$route.meta.title, exportType: 'zip' }) },