diff --git a/src/components/ADempiere/FilterFields/index.vue b/src/components/ADempiere/FilterFields/index.vue
new file mode 100644
index 00000000..98ed7a26
--- /dev/null
+++ b/src/components/ADempiere/FilterFields/index.vue
@@ -0,0 +1,180 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/Panel/filterFields.vue b/src/components/ADempiere/Panel/filterFields.vue
deleted file mode 100644
index 881fc062..00000000
--- a/src/components/ADempiere/Panel/filterFields.vue
+++ /dev/null
@@ -1,135 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/src/components/ADempiere/Panel/mainPanelMixin.js b/src/components/ADempiere/Panel/mainPanelMixin.js
index a70b5328..ddc0aa05 100644
--- a/src/components/ADempiere/Panel/mainPanelMixin.js
+++ b/src/components/ADempiere/Panel/mainPanelMixin.js
@@ -1,6 +1,6 @@
// ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
// Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A.
-// Contributor(s): Edwin Betancourt edwinBetanc0urt@hotmail.com www.erpya.com
+// Contributor(s): Edwin Betancourt EdwinBetanc0urt@outlook.com www.erpya.com
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
@@ -15,7 +15,7 @@
// along with this program. If not, see .
import FieldDefinition from '@/components/ADempiere/Field'
-import FilterFields from '@/components/ADempiere/Panel/filterFields'
+import FilterFields from '@/components/ADempiere/FilterFields'
import { fieldIsDisplayed } from '@/utils/ADempiere/dictionaryUtils.js'
import { parsedValueComponent } from '@/utils/ADempiere/valueUtils.js'
import { convertObjectToKeyValue } from '@/utils/ADempiere/valueFormat.js'
diff --git a/src/store/modules/ADempiere/panel/getters.js b/src/store/modules/ADempiere/panel/getters.js
index 9825ffd2..064206f9 100644
--- a/src/store/modules/ADempiere/panel/getters.js
+++ b/src/store/modules/ADempiere/panel/getters.js
@@ -1,3 +1,19 @@
+// ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
+// Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A.
+// Contributor(s): Edwin Betancourt EdwinBetanc0urt@outlook.com www.erpya.com
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+
import {
isEmptyValue,
parsedValueComponent
@@ -113,7 +129,8 @@ const getters = {
},
/**
- * Show all available fields not mandatory to show, used in components panel/filterFields.vue
+ * Show all available fields not mandatory and not button
+ * to show, used in components FilterFields
* @param {string} containerUuid
* @param {boolean} isEvaluateShowed
*/
@@ -122,15 +139,21 @@ const getters = {
isEvaluateShowed = true
}) => {
// all optionals (not mandatory) fields
- return getters.getFieldsListFromPanel(containerUuid).filter(fieldItem => {
- const isMandatory = fieldItem.isMandatory || fieldItem.isMandatoryFromLogic
- if (!isMandatory) {
+ return getters.getFieldsListFromPanel(containerUuid)
+ .filter(fieldItem => {
+ const isMandatory = fieldItem.isMandatory || fieldItem.isMandatoryFromLogic
+ if (isMandatory) {
+ return false
+ }
+ const isButtonField = fieldItem.componentPath === 'FieldButton'
+ if (isButtonField) {
+ return false
+ }
if (isEvaluateShowed) {
return fieldIsDisplayed(fieldItem)
}
- return !isMandatory
- }
- })
+ return true
+ })
},
/**
diff --git a/src/utils/ADempiere/dictionaryUtils.js b/src/utils/ADempiere/dictionaryUtils.js
index f9dc036f..6d5b42d2 100644
--- a/src/utils/ADempiere/dictionaryUtils.js
+++ b/src/utils/ADempiere/dictionaryUtils.js
@@ -1,6 +1,6 @@
// ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
// Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A.
-// Contributor(s): Edwin Betancourt edwinBetanc0urt@hotmail.com www.erpya.com
+// Contributor(s): Edwin Betancourt EdwinBetanc0urt@outlook.com www.erpya.com
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
@@ -61,6 +61,17 @@ export function generateField({
parsedDefaultValue = undefined
parsedDefaultValueTo = undefined
+ // mandatory, read only and displayed is changed to FilterFields component
+ evaluatedLogics = {
+ isDisplayedFromLogic: true,
+ isMandatoryFromLogic: false,
+ isReadOnlyFromLogic: false
+ }
+ fieldToGenerate.isDisplayed = true
+ fieldToGenerate.isReadOnly = false
+ // Is mandatory to showed available filter fields
+ fieldToGenerate.isMandatory = false
+
// set field operators list
isComparisonField = !['FieldBinary', 'FieldButton', 'FieldImage'].includes(componentReference.componentPath)
if (isComparisonField) {
@@ -460,7 +471,7 @@ export function evalutateTypeField(displayTypeId, isAllInfo = true) {
if (isAllInfo) {
return component
}
- return component.type
+ return component.componentPath
}
/**