diff --git a/src/components/ADempiere/Field/contextMenuField/calculator/index.vue b/src/components/ADempiere/Field/contextMenuField/calculator/index.vue index c53fd399..4d2b7d5a 100644 --- a/src/components/ADempiere/Field/contextMenuField/calculator/index.vue +++ b/src/components/ADempiere/Field/contextMenuField/calculator/index.vue @@ -217,6 +217,16 @@ export default { this.clearVariables() this.$children[0].visible = false this.$store.commit('changeShowRigthPanel', false) + if (!this.isEmptyValue(this.$route.query.fieldColumnName)) { + this.$router.push({ + name: this.$route.name, + query: { + ...this.$route.query, + typeAction: '', + fieldColumnName: '' + } + }, () => {}) + } }) }, spanMethod({ row, column }) { diff --git a/src/components/ADempiere/Field/contextMenuField/contextInfo/index.vue b/src/components/ADempiere/Field/contextMenuField/contextInfo/index.vue index 5cd27dca..e606f7ef 100644 --- a/src/components/ADempiere/Field/contextMenuField/contextInfo/index.vue +++ b/src/components/ADempiere/Field/contextMenuField/contextInfo/index.vue @@ -109,6 +109,16 @@ export default { }) } this.$store.commit('changeShowRigthPanel', false) + if (!this.isEmptyValue(this.$route.query.fieldColumnName)) { + this.$router.push({ + name: this.$route.name, + query: { + ...this.$route.query, + typeAction: '', + fieldColumnName: '' + } + }, () => {}) + } } } } diff --git a/src/components/ADempiere/Field/contextMenuField/preference/index.vue b/src/components/ADempiere/Field/contextMenuField/preference/index.vue index f0304cd0..a83da9ee 100644 --- a/src/components/ADempiere/Field/contextMenuField/preference/index.vue +++ b/src/components/ADempiere/Field/contextMenuField/preference/index.vue @@ -211,6 +211,16 @@ export default { close() { this.$children[0].visible = false this.$store.commit('changeShowRigthPanel', false) + if (!this.isEmptyValue(this.$route.query.fieldColumnName)) { + this.$router.push({ + name: this.$route.name, + query: { + ...this.$route.query, + typeAction: '', + fieldColumnName: '' + } + }, () => {}) + } }, remove() { const isForCurrentUser = this.metadataList.find(field => field.columnName === 'AD_User_ID').value diff --git a/src/components/ADempiere/Field/index.vue b/src/components/ADempiere/Field/index.vue index 89190c14..0d90e4f8 100644 --- a/src/components/ADempiere/Field/index.vue +++ b/src/components/ADempiere/Field/index.vue @@ -64,7 +64,6 @@ placement="top" trigger="click" style="padding: 0px;" - :hide="visibleForDesktop" > + + + + this.$route.query.typeAction === option.name) + const nameComponent = this.isEmptyValue(option) ? this.contextMenuField.name : this.$route.query.typeAction + switch (nameComponent) { case this.$t('field.info'): component = () => import('@/components/ADempiere/Field/contextMenuField/contextInfo') break @@ -579,6 +597,28 @@ export default { containerUuid: this.fieldAttributes.containerUuid, columnName: this.fieldAttributes.columnName }) + }, + openOptionField: { + get() { + const option = this.optionField.find(option => this.$route.query.typeAction === option.name) + if (!this.isEmptyValue(this.$route.query) && option) { + return true + } + return false + }, + set(value) { + if (!value) { + this.showPopoverPath = false + this.$router.push({ + name: this.$route.name, + query: { + ...this.$route.query, + typeAction: '', + fieldColumnName: '' + } + }, () => {}) + } + } } }, watch: { @@ -587,9 +627,17 @@ export default { }, metadataField(value) { this.field = value + }, + openOptionField(value) { + if (!value) { + this.showPopoverPath = false + } } }, created() { + this.timeOut = setTimeout(() => { + this.showPopoverPath = true + }, 2000) // assined field with prop this.field = this.metadataField if (this.field.isCustomField && !this.field.componentPath) { @@ -628,6 +676,14 @@ export default { this.$store.commit('changeShowRigthPanel', true) } else { this.visibleForDesktop = true + this.$router.push({ + name: this.$route.name, + query: { + ...this.$route.query, + typeAction: key, + fieldColumnName: this.field.columnName + } + }, () => {}) } this.$store.commit('changeShowPopoverField', true) this.$store.dispatch('setOptionField', option) @@ -766,6 +822,9 @@ export default {