diff --git a/src/components/ADempiere/Field/popover/documentStatus.vue b/src/components/ADempiere/Field/FieldOptions/documentStatus/index.vue similarity index 84% rename from src/components/ADempiere/Field/popover/documentStatus.vue rename to src/components/ADempiere/Field/FieldOptions/documentStatus/index.vue index 72f58f05..05f3580f 100644 --- a/src/components/ADempiere/Field/popover/documentStatus.vue +++ b/src/components/ADempiere/Field/FieldOptions/documentStatus/index.vue @@ -1,7 +1,7 @@ - {{ field.displayColumn }} + {{ fieldAttributes.displayColumn }} {{ labelDocumentActions }} - {{ field.description }} + {{ fieldAttributes.description }} {{ descriptionDocumentActions }} export default { name: 'FieldDocumentStatus', + props: { - field: { + fieldAttributes: { type: Object, required: true } }, + data() { return { valueActionDocument: '' @@ -126,8 +128,8 @@ export default { }, documentActionChange(value) { // this.$store.dispatch('notifyFieldChange', { - // parentUuid: this.field.parentUuid, - // containerUuid: this.field.containerUuid, + // parentUuid: this.fieldAttributes.parentUuid, + // containerUuid: this.fieldAttributes.containerUuid, // columnName: 'DocAction', // isSendToServer: true, // newValue: value @@ -144,13 +146,13 @@ export default { recordId: this.$route.params.recordId, recordUuid: this.$route.query.action, parametersList: [{ - columnName: this.field.columnName, + columnName: this.fieldAttributes.columnName, value: this.valueActionDocument }], isActionDocument: true, - parentUuid: this.field.parentUuid, - panelType: this.field.panelType, - containerUuid: this.field.containerUuid // determinate if get table name and record id (window) or selection (browser) + parentUuid: this.fieldAttributes.parentUuid, + panelType: this.fieldAttributes.panelType, + containerUuid: this.fieldAttributes.containerUuid // determinate if get table name and record id (window) or selection (browser) }) this.valueActionDocument = '' } diff --git a/src/components/ADempiere/Field/FieldOptions/fieldOptionsList.js b/src/components/ADempiere/Field/FieldOptions/fieldOptionsList.js new file mode 100644 index 00000000..2eee26ad --- /dev/null +++ b/src/components/ADempiere/Field/FieldOptions/fieldOptionsList.js @@ -0,0 +1,107 @@ +// 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 language from '@/lang' + +export const infoOptionItem = { + name: language.t('field.info'), + enabled: true, + svg: false, + icon: 'el-icon-info', + componentRender: () => import('@/components/ADempiere/Field/contextMenuField/contextInfo') +} + +/** + * For operators in advanced query + */ +export const operatorOptionItem = { + name: language.t('operators.operator'), + enabled: true, + svg: false, + icon: 'el-icon-rank', + componentRender: () => import('@/components/ADempiere/Field/FieldOptions/operatorComparison') +} + +/** + * For lookup fields with context info + */ +export const zoomInOptionItem = { + name: language.t('table.ProcessActivity.zoomIn'), + enabled: true, + svg: false, + icon: 'el-icon-files', + componentRender: () => import('@/components/ADempiere/Field/contextMenuField/contextInfo') +} + +/** + * Only when is translate option + */ +export const translateOptionItem = { + name: language.t('language'), + enabled: true, + svg: true, + icon: 'language', + componentRender: () => import('@/components/ADempiere/Field/contextMenuField/translated') +} + +/** + * Displayed calculator option in numeric field + */ +export const calculatorOptionItem = { + name: language.t('field.calculator'), + enabled: true, + svg: false, + icon: 'el-icon-s-operation', + componentRender: () => import('@/components/ADempiere/Field/contextMenuField/calculator') +} + +export const preferenceOptionItem = { + name: language.t('field.preference'), + enabled: true, + svg: false, + icon: 'el-icon-notebook-2', + componentRender: () => import('@/components/ADempiere/Field/FieldOptions/preference') +} + +export const logsOptionItem = { + name: language.t('field.logsField'), + enabled: true, + svg: true, + icon: 'tree-table', + componentRender: () => import('@/components/ADempiere/Field/contextMenuField/changeLogs') +} + +/** + * For document status field to workflow + */ +export const documentStatusOptionItem = { + name: language.t('window.documentStatus'), + enabled: true, + svg: false, + icon: 'el-icon-set-up', + componentRender: () => import('@/components/ADempiere/Field/FieldOptions/documentStatus') +} + +export const optionsListStandad = [ + infoOptionItem, + preferenceOptionItem, + logsOptionItem +] + +export const optionsListAdvancedQuery = [ + infoOptionItem, + operatorOptionItem +] diff --git a/src/components/ADempiere/Field/FieldOptions/index.vue b/src/components/ADempiere/Field/FieldOptions/index.vue new file mode 100644 index 00000000..a807dfe5 --- /dev/null +++ b/src/components/ADempiere/Field/FieldOptions/index.vue @@ -0,0 +1,516 @@ + + + + + + + + + + {{ metadata.name }} + + + + + + + + + + + + + + + + + {{ option.name }} + + + + + + + + + + + + + + + + + {{ metadata.name }} + + + + + + + + + + + + + + + + + + + {{ option.name }} + + + + + + + + + + + + + {{ metadata.name }} + + + + + + + + diff --git a/src/components/ADempiere/Field/FieldOptions/operatorComparison/index.vue b/src/components/ADempiere/Field/FieldOptions/operatorComparison/index.vue new file mode 100644 index 00000000..b6ea61c0 --- /dev/null +++ b/src/components/ADempiere/Field/FieldOptions/operatorComparison/index.vue @@ -0,0 +1,134 @@ + + + + + {{ $t('operators.compareSearch') }}: + + + + + + + + + + + + diff --git a/src/components/ADempiere/Field/contextMenuField/preference/index.vue b/src/components/ADempiere/Field/FieldOptions/preference/index.vue similarity index 95% rename from src/components/ADempiere/Field/contextMenuField/preference/index.vue rename to src/components/ADempiere/Field/FieldOptions/preference/index.vue index 2ca5170c..d4351f56 100644 --- a/src/components/ADempiere/Field/contextMenuField/preference/index.vue +++ b/src/components/ADempiere/Field/FieldOptions/preference/index.vue @@ -25,10 +25,8 @@ {{ $t('components.preference.title') }} - {{ sourceField.name }} - {{ - fieldValue - }} + {{ fieldAttributes.name }} + {{ fieldValue }} @@ -44,7 +42,7 @@ > - {{ sourceField.name }}: {{ fieldValue }} + {{ fieldAttributes.name }}: {{ fieldValue }} @@ -116,7 +114,7 @@ export default { name: 'Preference', mixins: [formMixin], props: { - sourceField: { + fieldAttributes: { type: [Object], required: true, default: null @@ -194,7 +192,7 @@ export default { this.setFieldsList() } if (!this.isEmptyValue(preferenceValue)) { - if ((typeof preferenceValue !== 'string') && (this.sourceField.componentPath !== 'FieldYesNo')) { + if ((typeof preferenceValue !== 'string') && (this.fieldAttributes.componentPath !== 'FieldYesNo')) { this.code = preferenceValue } else { this.code = preferenceValue @@ -230,8 +228,8 @@ export default { const isForCurrentOrganization = this.metadataList.find(field => field.columnName === 'AD_Org_ID').value const isForCurrentContainer = this.metadataList.find(field => field.columnName === 'AD_Window_ID').value deletePreference({ - parentUuid: this.sourceField.parentUuid, - attribute: this.sourceField.columnName, + parentUuid: this.fieldAttributes.parentUuid, + attribute: this.fieldAttributes.columnName, isForCurrentUser, isForCurrentClient, isForCurrentOrganization, @@ -282,8 +280,8 @@ export default { const isForCurrentContainer = this.metadataList.find(field => field.columnName === 'AD_Window_ID').value // setPreference({ - parentUuid: this.sourceField.parentUuid, - attribute: this.sourceField.columnName, + parentUuid: this.fieldAttributes.parentUuid, + attribute: this.fieldAttributes.columnName, value: this.fieldValue, isForCurrentUser, isForCurrentClient, diff --git a/src/components/ADempiere/Field/contextMenuField/preference/preferenceFields.js b/src/components/ADempiere/Field/FieldOptions/preference/preferenceFields.js similarity index 100% rename from src/components/ADempiere/Field/contextMenuField/preference/preferenceFields.js rename to src/components/ADempiere/Field/FieldOptions/preference/preferenceFields.js diff --git a/src/components/ADempiere/Field/index.vue b/src/components/ADempiere/Field/index.vue index 276d7e39..f0a1f00c 100644 --- a/src/components/ADempiere/Field/index.vue +++ b/src/components/ADempiere/Field/index.vue @@ -33,171 +33,11 @@ > - - - - - {{ field.name }} - - - - - - - - - - - - - - - - - - - - {{ option.name }} - - - - - - - - - - - - - - - - - {{ option.name }} - - - - - - - - - - - - - - - {{ field.name }} - - - - - - - - - - - - - - - - - - - {{ option.name }} - - - - - - - - - - - - - - - - - {{ option.name }} - - - - - - - - - {{ field.name }} - - - - - - + + - - -
{{ field.description }}
{{ fieldAttributes.description }}
{{ descriptionDocumentActions }}
- {{ sourceField.name }}: {{ fieldValue }} + {{ fieldAttributes.name }}: {{ fieldValue }}