diff --git a/src/components/ADempiere/DataTable/index.vue b/src/components/ADempiere/DataTable/index.vue
index 94a9c905..13e34ef4 100644
--- a/src/components/ADempiere/DataTable/index.vue
+++ b/src/components/ADempiere/DataTable/index.vue
@@ -49,7 +49,7 @@
/>
-
+
{{ $t('components.filterableItems') }}
diff --git a/src/components/ADempiere/DataTable/menu/mixinMenu.js b/src/components/ADempiere/DataTable/menu/mixinMenu.js
index 897f67ef..7d869de4 100644
--- a/src/components/ADempiere/DataTable/menu/mixinMenu.js
+++ b/src/components/ADempiere/DataTable/menu/mixinMenu.js
@@ -221,7 +221,10 @@ export const menuTableMixin = {
this.showModal(process)
},
showTotals() {
- this.$store.dispatch('showedTotals', this.containerUuid)
+ this.$store.dispatch('changePanelAttributesBoolean', {
+ containerUuid: this.containerUuid,
+ attributeName: 'isShowedTotals'
+ })
},
showOnlyMandatoryColumns() {
this.$store.dispatch('showOnlyMandatoryColumns', {
@@ -261,9 +264,11 @@ export const menuTableMixin = {
})
}
},
- optionalPanel() {
- this.showTableSearch = false
- this.isOptional = !this.isOptional
+ showOptionalColums() {
+ this.$store.dispatch('changePanelAttributesBoolean', {
+ containerUuid: this.containerUuid,
+ attributeName: 'isShowedTableOptionalColumns'
+ })
},
fixedPanel() {
this.showTableSearch = false
diff --git a/src/store/modules/ADempiere/panel.js b/src/store/modules/ADempiere/panel.js
index 02cdbc9b..cb513205 100644
--- a/src/store/modules/ADempiere/panel.js
+++ b/src/store/modules/ADempiere/panel.js
@@ -115,6 +115,8 @@ const panel = {
})
params.recordUuid = null
+ // show/hidden optionals columns to table
+ params.isShowedTableOptionalColumns = false
commit('addPanel', params)
},
@@ -772,10 +774,18 @@ const panel = {
}
})
},
- showedTotals({ commit, getters }, containerUuid) {
+ changePanelAttributesBoolean({ commit, getters }, {
+ containerUuid,
+ attributeName,
+ attributeValue
+ }) {
const panel = getters.getPanel(containerUuid)
const newPanel = panel
- newPanel.isShowedTotals = !panel.isShowedTotals
+ if (isEmptyValue(attributeValue)) {
+ newPanel[attributeName] = !panel[attributeName]
+ } else {
+ newPanel[attributeName] = attributeValue
+ }
commit('changePanel', {
panel: panel,
newPanel: newPanel