From 828edc58a2e5229f9d5c0da8015c3a911d1f7ebd Mon Sep 17 00:00:00 2001 From: Leonel Matos Date: Wed, 22 Jan 2020 17:34:28 -0400 Subject: [PATCH] Change desing for zoom references (#252) * bugfix advanced search when field value no change * update styles --- src/components/ADempiere/Field/index.vue | 48 +++++++++++++++--------- src/lang/ADempiere/en.js | 3 +- src/lang/ADempiere/es.js | 3 +- src/store/modules/ADempiere/panel.js | 2 +- 4 files changed, 36 insertions(+), 20 deletions(-) diff --git a/src/components/ADempiere/Field/index.vue b/src/components/ADempiere/Field/index.vue index a1b9d49b..1bf22fd0 100644 --- a/src/components/ADempiere/Field/index.vue +++ b/src/components/ADempiere/Field/index.vue @@ -20,7 +20,6 @@ v-if="(field.contextInfo && field.contextInfo.isActive) || field.reference.zoomWindowList.length" ref="contextOptions" placement="top" - :title="isFieldOnly()" width="300" trigger="click" > @@ -28,8 +27,13 @@ class="pre-formatted" v-html="field.contextInfo.messageText.msgText" /> -
- {{ $t('table.ProcessActivity.zoomIn') }} +
+ + {{ field.name }} + +
@@ -99,6 +103,7 @@ import FieldTranslated from '@/components/ADempiere/Field/fieldTranslated' import { FIELD_ONLY } from '@/components/ADempiere/Field/references' import { DEFAULT_SIZE } from '@/components/ADempiere/Field/fieldSize' import { fieldIsDisplayed } from '@/utils/ADempiere' +import { showMessage } from '@/utils/ADempiere/notification' /** * This is the base component for linking the components according to the @@ -260,6 +265,7 @@ export default { this.field = this.metadataField }, methods: { + showMessage, isDisplayed() { if (this.isAdvancedQuery) { return this.field.isShowedFromUser @@ -334,25 +340,33 @@ export default { } }, redirect({ window, columnName, value }) { - this.$store.dispatch('getWindowByUuid', { - routes: this.permissionRoutes, - windowUuid: window.uuid - }) - const windowRoute = this.$store.getters.getWindowRoute(window.uuid) - this.$router.push({ - name: windowRoute.name, - query: { - action: 'advancedQuery', - tabParent: 0, - [columnName]: value - } - }) + this.$store.dispatch('getWindowByUuid', { routes: this.permissionRoutes, windowUuid: window.uuid }) + var windowRoute = this.$store.getters.getWindowRoute(window.uuid) + if (windowRoute) { + this.$router.push({ + name: windowRoute.name, + query: { + action: 'advancedQuery', + tabParent: 0, + [columnName]: value + } + }) + } else { + this.showMessage({ + type: 'error', + message: this.$t('notifications.noRoleAccess') + }) + } } } }