-
+
{{ list.displayColumnName }} :
-
- {{ list.oldDisplayValue }}
-
+
-
- {{ list.newDisplayValue }}
-
+
{{ list.displayColumnName }} :
@@ -78,19 +80,32 @@
diff --git a/src/components/ADempiere/ContainerOptions/LockRecord/index.vue b/src/components/ADempiere/ContainerOptions/LockRecord/index.vue
index 550f207fc0b..f8c2641f424 100644
--- a/src/components/ADempiere/ContainerOptions/LockRecord/index.vue
+++ b/src/components/ADempiere/ContainerOptions/LockRecord/index.vue
@@ -17,32 +17,26 @@
-->
-
+
+
+ {{ tabName }}
+
+
-
-
+
+
-
-
-
-
-
- {{ tabName }}
-
-
+
+
+
+
-
-
-
+
{{ tabName }}
@@ -56,13 +50,13 @@ export default defineComponent({
name: 'LockRecord',
props: {
- tabUuid: {
+ parentUuid: {
type: String,
required: true
},
- tabPosition: {
- type: Number,
- default: 0
+ containerUuid: {
+ type: String,
+ required: true
},
tabName: {
type: String,
@@ -71,17 +65,16 @@ export default defineComponent({
tableName: {
type: String,
required: true
+ },
+ isActiveTab: {
+ type: Boolean,
+ required: true
}
},
setup(props, { root }) {
- const containerUuid = props.tabUuid
const tableName = props.tableName
- const isFirstTab = computed(() => {
- return props.tabPosition === 0
- })
-
const isLocked = ref(false)
const isValidUuid = (recordUuid) => {
@@ -95,49 +88,50 @@ export default defineComponent({
return root.$t('data.lockRecord')
})
+ const storedPrivateAccess = computed(() => {
+ const { recordUuid } = getRecordKeys()
+
+ return root.$store.getters.getStoredPrivateAccess({
+ tableName,
+ recordUuid
+ })
+ })
+
const lockRecord = () => {
- const action = isLocked.value ? 'unlockRecord' : 'lockRecord'
- const { recordId, recordUuid } = getRecordId()
+ const { recordId, recordUuid } = getRecordKeys()
- root.$store.dispatch(action, {
+ root.$store.dispatch('lockRecordFromServer', {
tableName,
recordId,
recordUuid
})
- .then(() => {
- root.$message({
- type: 'success',
- message: root.$t('data.notification.' + action),
- showClose: true
- })
- })
- .catch(() => {
- root.$message({
- type: 'error',
- message: root.$t('data.isError') + root.$t('data.' + action),
- showClose: true
- })
+ .then(isLockedResponse => {
+ isLocked.value = isLockedResponse
})
- .finally(() => {
- getPrivateAccess()
+ }
+
+ const unLockRecord = () => {
+ const { recordId, recordUuid } = getRecordKeys()
+
+ root.$store.dispatch('unlockRecordFromServer', {
+ tableName,
+ recordId,
+ recordUuid
+ })
+ .then(isUnLockedResponse => {
+ isLocked.value = isUnLockedResponse
})
}
const record = computed(() => {
- if (isFirstTab) {
- const recordUuid = root.$route.query.action
- if (isValidUuid(recordUuid)) {
- return root.$store.getters.getRowData({
- containerUuid,
- recordUuid
- })
- }
- }
-
- return undefined
+ return root.$store.getters.getValuesView({
+ parentUuid: props.parentUuid,
+ containerUuid: props.containerUuid,
+ format: 'object'
+ })
})
- const getRecordId = () => {
+ const getRecordKeys = () => {
let recordId
let recordUuid
const recordRow = record.value
@@ -156,43 +150,72 @@ export default defineComponent({
}
}
+ const isGettingRecordAccess = ref(false)
+
const getPrivateAccess = () => {
- const { recordId, recordUuid } = getRecordId()
+ const { recordId, recordUuid } = getRecordKeys()
+ if (root.isEmptyValue(recordId) && root.isEmptyValue(recordUuid)) {
+ return
+ }
+
+ // get from vuex stored
+ if (!root.isEmptyValue(storedPrivateAccess.value)) {
+ isLocked.value = storedPrivateAccess.value.isLocked
+ return
+ }
+
+ isGettingRecordAccess.value = true
+
+ // get from server
root.$store.dispatch('getPrivateAccessFromServer', {
tableName,
recordId,
recordUuid
})
.then(privateAccessResponse => {
- if (!root.isEmptyValue(privateAccessResponse)) {
- isLocked.value = privateAccessResponse.isLocked
- } else {
- isLocked.value = false
- }
+ isLocked.value = privateAccessResponse
+ })
+ .finally(() => {
+ isGettingRecordAccess.value = false
})
}
- watch(() => root.$route.query.action, (newValue) => {
- if (isValidUuid(newValue)) {
- getPrivateAccess()
+ // timer to execute the request between times
+ const timeOut = ref(() => {})
+
+ watch(() => root.$route.query.action, (newValue, oldValue) => {
+ if (props.isActiveTab && isValidUuid(newValue) && !isGettingRecordAccess.value) {
+ clearTimeout(timeOut.value)
+
+ timeOut.value = setTimeout(() => {
+ // get records
+ getPrivateAccess()
+ }, 1000)
}
})
return {
isLocked,
// computed
- isFirstTab,
tooltipText,
// methods
- lockRecord
+ lockRecord,
+ unLockRecord
}
}
})
diff --git a/src/components/ADempiere/ContextMenu/contextMenuDesktop.vue b/src/components/ADempiere/ContextMenu/contextMenuDesktop.vue
deleted file mode 100644
index e95d380e049..00000000000
--- a/src/components/ADempiere/ContextMenu/contextMenuDesktop.vue
+++ /dev/null
@@ -1,411 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/src/components/ADempiere/ContextMenu/contextMenuMixin.js b/src/components/ADempiere/ContextMenu/contextMenuMixin.js
deleted file mode 100644
index 489aa629cfe..00000000000
--- a/src/components/ADempiere/ContextMenu/contextMenuMixin.js
+++ /dev/null
@@ -1,775 +0,0 @@
-// ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
-// Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A.
-// Contributor(s): Yamel Senih ysenih@erpya.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 { showNotification } from '@/utils/ADempiere/notification.js'
-import ItemsRelations from './itemsRelations'
-import { clientDateTime, convertFieldsListToShareLink, recursiveTreeSearch } from '@/utils/ADempiere/valueUtils.js'
-import { supportedTypes, exportFileFromJson } from '@/utils/ADempiere/exportUtil.js'
-import ROUTES from '@/utils/ADempiere/constants/zoomWindow'
-import relationsMixin from './relationsMixin.js'
-
-export default {
- name: 'MixinContextMenu',
- mixins: [
- relationsMixin
- ],
- components: {
- ItemsRelations
- },
- props: {
- menuParentUuid: {
- type: String,
- default: undefined
- },
- // uuid of the component where it is called
- parentUuid: {
- type: String,
- default: undefined
- },
- // uuid of the component where it is called
- containerUuid: {
- type: String,
- required: true
- },
- panelType: {
- type: String,
- default: undefined
- },
- tableName: {
- type: String,
- default: undefined
- },
- isReport: {
- type: Boolean,
- default: false
- },
- lastParameter: {
- type: String,
- default: undefined
- },
- reportFormat: {
- type: String,
- default: undefined
- },
- // used only window
- isInsertRecord: {
- type: Boolean,
- default: undefined
- },
- defaultFromatExport: {
- type: String,
- default: 'xlsx'
- },
- isDisplayed: {
- type: Boolean,
- default: false
- },
- isListRecord: {
- type: Boolean,
- default: false
- }
- },
- data() {
- return {
- actions: [],
- supportedTypes,
- references: [],
- file: this.$store.getters.getProcessResult.download,
- downloads: this.$store.getters.getProcessResult.url,
- metadataMenu: {},
- recordUuid: this.$route.query.action,
- isLoadedReferences: false
- }
- },
- computed: {
- getterContextMenu() {
- return this.$store.getters.getContextMenu(this.containerUuid)
- },
- isWindow() {
- return this.panelType === 'window'
- },
- isWithRecord() {
- return !this.isEmptyValue(this.recordUuid) && this.recordUuid !== 'create-new'
- },
- isReferecesContent() {
- if (this.isWindow && this.isWithRecord) {
- return true
- }
- return false
- },
- getterReferences() {
- if (this.isReferecesContent) {
- return this.$store.getters.getReferencesList(this.parentUuid, this.recordUuid)
- }
- return []
- },
- permissionRoutes() {
- return this.$store.getters.permission_routes
- },
- valuesPanelToShare() {
- let containerUuid = this.containerUuid
- if (this.$route.query.action === 'advancedQuery') {
- containerUuid = 'table_' + containerUuid
- }
-
- return this.$store.getters.getParametersToShare({
- containerUuid,
- isOnlyDisplayed: true
- })
- },
- getterFieldsList() {
- return this.$store.getters.getFieldsListFromPanel(this.containerUuid)
- },
- getterFieldsListHeader() {
- const header = this.getterFieldsList.filter(fieldItem => {
- const isDisplayed = fieldItem.isDisplayed || fieldItem.isDisplayedFromLogic
- if (fieldItem.isActive && isDisplayed && !fieldItem.isKey) {
- return fieldItem.name
- }
- })
- return header.map(fieldItem => {
- return fieldItem.name
- })
- },
- getterFieldsListValue() {
- const value = this.getterFieldsList.filter(fieldItem => {
- const isDisplayed = fieldItem.isDisplayed || fieldItem.isDisplayedFromLogic
- if (fieldItem.isActive && isDisplayed && !fieldItem.isKey) {
- return fieldItem
- }
- })
- return value.map(fieldItem => {
- if (fieldItem.componentPath === 'FieldSelect') {
- return fieldItem.displayColumnName
- }
- return fieldItem.columnName
- })
- },
- isDisabledExportRecord() {
- if (this.panelType === 'browser') {
- return this.getDataSelection.length < 1
- }
- return false
- },
- getAllDataRecords() {
- return this.$store.getters.getDataRecordAndSelection(this.containerUuid)
- },
- getDataSelection() {
- return this.getAllDataRecords.selection
- },
- getDataRecord() {
- return this.getAllDataRecords.record.filter(fieldItem => {
- if (this.recordUuid === fieldItem.UUID) {
- return fieldItem
- }
- })
- },
- getDataLog() {
- if (this.isWindow) {
- return this.$store.getters.getDataLog(this.containerUuid, this.recordUuid)
- }
- return undefined
- },
- processParametersExecuted() {
- return this.$store.getters.getCachedReport(this.$route.params.instanceUuid).parameters
- },
- getOldRouteOfWindow() {
- if (this.isWindow) {
- const oldRoute = this.$store.state['windowControl/index'].windowOldRoute
- if (!this.isEmptyValue(oldRoute.query.action) && oldRoute.query.action !== 'create-new' && this.$route.query.action === 'create-new') {
- return oldRoute
- }
- }
- return false
- },
- getReportDefinition() {
- return this.$store.getters.getCachedReport(this.$route.params.instanceUuid)
- },
- isPersonalLock() {
- return this.$store.getters['user/getIsPersonalLock']
- },
- listDocumentActions() {
- return this.$store.getters.getListDocumentActions.documentActionsList
- },
- isManageDataRecords() {
- return ['browser', 'window'].includes(this.panelType)
- },
- shorcutKey() {
- return {
- defaultValues: ['f2'],
- deleteRecord: ['f3'],
- deleteRecord2: ['ctrl', 'd'],
- refreshData: ['f5']
- }
- },
- getCurrentRecord() {
- const record = this.getAllDataRecords.record.find(fieldItem => {
- if (this.recordUuid === fieldItem.UUID) {
- return fieldItem
- }
- })
- if (!this.isEmptyValue(record)) {
- return record
- }
- return {}
- },
- tableNameCurrentTab() {
- const current = this.$store.getters.getWindow(this.getterContextMenu.actions[0].uuidParent).tabs[0]
- if (!this.isEmptyValue(current)) {
- return current.tableName
- }
- return ''
- },
- isLockRecord() {
- return this.$store.getters['user/getRole'].isPersonalLock
- },
- recordAccess() {
- return {
- action: 'recordAccess',
- disabled: false,
- hidden: false,
- isSortTab: true,
- name: this.$t('data.recordAccess.actions'),
- type: 'dataAction',
- tableName: this.tableNameCurrentTab
- }
- }
- },
- watch: {
- '$route.query.action'(actionValue) {
- this.recordUuid = actionValue
- // only requires updating the context menu if it is Window
- if (this.isWindow) {
- this.generateContextMenu()
- this.getReferences()
- }
- },
- isInsertRecord(newValue, oldValue) {
- if (this.isWindow && newValue !== oldValue) {
- this.generateContextMenu()
- }
- },
- getDataLog(newValue, oldValue) {
- if (this.isWindow && newValue !== oldValue) {
- this.generateContextMenu()
- }
- },
- isDisabledExportRecord(isDisabled) {
- if (isDisabled) {
- this.$nextTick(() => {
- // close childs items in exportRecord menu
- this.$refs.contextMenu.close('exportRecord')
- })
- }
- }
- },
- methods: {
- showNotification,
- actionContextMenu(event) {
- switch (event.srcKey) {
- case 'defaultValues':
- this.$store.dispatch('setDefaultValues', {
- parentUuid: this.parentUuid,
- containerUuid: this.containerUuid,
- recordUuid: this.recordUuid,
- panelType: 'window',
- isNewRecord: true
- })
- break
- case 'deleteRecord':
- case 'deleteRecord2':
- this.$store.dispatch('deleteEntity', {
- parentUuid: this.parentUuid,
- containerUuid: this.containerUuid,
- recordUuid: this.recordUuid
- })
- break
- case 'refreshData':
- this.refreshData()
- break
- }
- },
- refreshData() {
- if (this.isWindow) {
- this.$store.dispatch('getDataListTab', {
- parentUuid: this.parentUuid,
- containerUuid: this.containerUuid,
- isRefreshPanel: true,
- recordUuid: this.recordUuid
- })
- .catch(error => {
- console.warn(`Error getting data list tab. Message: ${error.message}, code ${error.code}.`)
- })
- } else if (this.panelType === 'browser') {
- const fieldsEmpty = this.$store.getters.getFieldsListEmptyMandatory({
- containerUuid: this.containerUuid,
- fieldsList: this.getterFieldsList
- })
- if (fieldsEmpty.length) {
- this.$message({
- message: this.$t('notifications.mandatoryFieldMissing') + fieldsEmpty,
- type: 'info',
- showClose: true
- })
- } else {
- this.$store.dispatch('getBrowserSearch', {
- containerUuid: this.containerUuid,
- isClearSelection: true
- })
- }
- }
- },
- getReferences() {
- if (this.isReferecesContent) {
- const references = this.getterReferences
- if (references && references.length) {
- this.references = references
- this.isLoadedReferences = true
- } else {
- this.isLoadedReferences = false
- this.$store.dispatch('getReferencesListFromServer', {
- parentUuid: this.parentUuid,
- containerUuid: this.containerUuid,
- tableName: this.tableName,
- recordUuid: this.recordUuid
- })
- .then(() => {
- this.references = this.getterReferences
- })
- .finally(() => {
- this.isLoadedReferences = true
- })
- }
- } else {
- this.references = []
- this.isLoadedReferences = false
- }
- },
- exportRecord(fotmatToExport) {
- const tHeader = this.getterFieldsListHeader
- const filterVal = this.getterFieldsListValue
- let list = []
- if (this.isWindow) {
- list = this.getDataRecord
- } else if (this.panelType === 'browser') {
- // TODO: Check usage as the selection is exported with the table menu
- list = this.getDataSelection
- }
-
- let title = this.metadataMenu.name
- if (this.isEmptyValue(title)) {
- title = this.$route.meta.title
- }
-
- const data = this.formatJson(filterVal, list)
- exportFileFromJson({
- header: tHeader,
- data,
- fileName: `${title} ${clientDateTime()}`,
- exportType: fotmatToExport
- })
- },
- formatJson(filterVal, jsonData) {
- return jsonData.map(row => {
- return filterVal.map(column => {
- return row[column]
- })
- })
- },
- generateContextMenu() {
- this.metadataMenu = this.getterContextMenu
-
- // the function is broken avoiding that an error is generated when closing
- // session being in a window, since the store of vuex is cleaned, being
- // this.metadataMenu with value undefined
- if (this.isEmptyValue(this.metadataMenu)) {
- return
- }
- this.actions = this.metadataMenu.actions
-
- // TODO: Add store attribute to avoid making repeated requests
- let isChangePrivateAccess = true
- if (this.isReferecesContent) {
- if ((!this.isEmptyValue(this.getCurrentRecord) && !this.isEmptyValue(this.tableNameCurrentTab))) {
- this.$store.dispatch('getPrivateAccessFromServer', {
- tableName: this.tableNameCurrentTab,
- recordId: this.getCurrentRecord[this.tableNameCurrentTab + '_ID'],
- recordUuid: this.$route.query.action
- })
- .then(privateAccessResponse => {
- isChangePrivateAccess = false
- this.validatePrivateAccess(privateAccessResponse)
- })
- }
-
- const processAction = this.actions.find(item => {
- // TODO: Compare with 'action' attribute and not with 'name' (this change with language)
- if (item.name === 'Procesar Orden' || (item.name === 'Process Order')) {
- return item
- }
- })
- if (processAction) {
- this.$store.dispatch('setOrder', processAction)
- }
- }
- if (this.isWindow && this.isEmptyValue(this.actions.find(element => element.action === 'recordAccess'))) {
- this.actions.push(this.recordAccess)
- }
-
- if (this.actions && this.actions.length) {
- this.actions.forEach(itemAction => {
- const { action } = itemAction
- if (this.$route.meta.type === 'report' && action === 'startProcess') {
- itemAction.reportExportType = 'html'
- }
-
- // if no exists set prop with value
- itemAction.disabled = false
- if ((this.$route.name !== 'Report Viewer' && action === 'changeParameters') ||
- (this.$route.meta.type === 'process' && itemAction.type === 'summary')) {
- itemAction.disabled = true
- }
-
- if (this.$route.meta.type === 'window') {
- if (this.isLockRecord) {
- if (action === 'lockRecord') {
- itemAction.hidden = isChangePrivateAccess
- } else if (action === 'unlockRecord') {
- itemAction.hidden = !isChangePrivateAccess
- }
- }
-
- // rollback
- if (itemAction.action === 'undoModifyData') {
- itemAction.disabled = Boolean(!this.getDataLog && !this.getOldRouteOfWindow)
- } else if (!this.isWithRecord || !this.isInsertRecord) {
- itemAction.disabled = true
- }
- }
- })
- }
- },
- showModal(action) {
- // TODO: Refactor and remove redundant dispatchs
- if (['process'].includes(action.type)) {
- // Add context from view open in process to opening
- if (action.parentUuidAssociated || action.containerUuidAssociated) {
- const attributes = this.$store.getters.getValuesView({
- parentUuid: action.parentUuidAssociated,
- containerUuid: action.containerUuidAssociated
- })
-
- if (!this.isEmptyValue(attributes)) {
- this.$store.dispatch('updateValuesOfContainer', {
- containerUuid: action.uuid,
- attributes
- })
- }
- }
-
- // open modal dialog with metadata
- this.$store.dispatch('setShowDialog', {
- type: action.type,
- action: {
- ...action,
- containerUuid: action.uuid
- }
- })
- }
- },
- runAction(action) {
- if (action.type === 'action') {
- this.executeAction(action)
- } else if (action.type === 'process') {
- // run process associate with view (window or browser)
- this.showModal(action)
- } else if (action.type === 'dataAction') {
- if (action.action === 'undoModifyData' && Boolean(!this.getDataLog) && this.getOldRouteOfWindow) {
- this.$router.push({
- path: this.getOldRouteOfWindow.path,
- query: {
- ...this.getOldRouteOfWindow.query
- }
- }, () => {})
- } else if (action.action === 'recordAccess') {
- this.$store.dispatch('setShowDialog', {
- type: this.panelType,
- action: action
- })
- } else if (action.action !== 'undoModifyData') {
- if (action.action === 'setDefaultValues' && this.$route.query.action === 'create-new') {
- return
- }
-
- this.$store.dispatch(action.action, {
- parentUuid: this.parentUuid,
- containerUuid: this.containerUuid,
- recordUuid: this.recordUuid,
- panelType: this.panelType,
- isNewRecord: action.action === 'setDefaultValues',
- tableName: this.tableName,
- recordId: this.getCurrentRecord[this.tableNameCurrentTab + '_ID']
- })
- .then(response => {
- this.$message({
- type: 'success',
- message: this.$t('data.lockRecord'),
- showClose: true
- })
- if (response && response.isPrivateAccess) {
- this.validatePrivateAccess(response)
- }
- })
- .catch(error => {
- this.$message({
- type: 'error',
- message: this.$t('notifications.error') + error.message,
- showClose: true
- })
- })
- }
- } else if (action.type === 'updateReport') {
- this.updateReport(action)
- }
- },
- executeAction(action) {
- let containerParams = this.$route.meta.uuid
- if (this.lastParameter !== undefined) {
- containerParams = this.lastParameter
- }
- const fieldsNotReady = this.$store.getters.getFieldsListEmptyMandatory({
- containerUuid: containerParams
- })
-
- // run process or report
- if (this.isEmptyValue(fieldsNotReady)) {
- let menuParentUuid = this.menuParentUuid
- if (this.isEmptyValue(menuParentUuid) && this.$route.params) {
- if (!this.isEmptyValue(this.$route.params.menuParentUuid)) {
- menuParentUuid = this.$route.params.menuParentUuid
- }
- }
-
- if (this.panelType === 'process') {
- this.$store.dispatch('setTempShareLink', {
- processId: this.$route.params.processId,
- href: window.location.href
- })
- }
-
- let reportFormat = action.reportExportType
- if (this.isEmptyValue(reportFormat)) {
- reportFormat = this.$route.query.reportType
- if (this.isEmptyValue(reportFormat)) {
- reportFormat = this.$route.meta.reportFormat
- if (this.isEmptyValue(reportFormat)) {
- reportFormat = 'html'
- }
- }
- }
-
- this.$store.dispatch(action.action, {
- action,
- parentUuid: this.containerUuid,
- containerUuid: containerParams, // EVALUATE IF IS action.uuid
- panelType: this.panelType, // determinate if get table name and record id (window) or selection (browser)
- reportFormat, // this.$route.query.reportType ? this.$route.query.reportType : action.reportExportType,
- menuParentUuid, // to load relationsList in context menu (report view)
- routeToDelete: this.$route
- })
- .catch(error => {
- console.warn(error)
- })
- } else {
- this.showNotification({
- type: 'warning',
- title: this.$t('notifications.emptyValues'),
- name: '' + fieldsNotReady + '. ',
- message: this.$t('notifications.fieldMandatory'),
- isRedirect: false
- })
- }
- },
- updateReport(action) {
- let instanceUuid = action.instanceUuid
- if (this.isEmptyValue(instanceUuid)) {
- instanceUuid = this.$route.params.instanceUuid
- }
- let processId = action.processId
- if (this.isEmptyValue(processId)) {
- processId = this.$route.params.processId
- }
- this.$store.dispatch('getReportOutputFromServer', {
- instanceUuid,
- processUuid: action.processUuid,
- tableName: action.tableName,
- processId,
- printFormatUuid: action.printFormatUuid,
- reportViewUuid: action.reportViewUuid,
- isSummary: false,
- reportName: this.$store.getters.getProcessResult.name,
- reportType: this.$store.getters.getReportType,
- option: action.option
- })
- .then(reportOutputResponse => {
- if (!reportOutputResponse.isError) {
- let link = {
- href: undefined,
- download: undefined
- }
-
- const blob = new Blob(
- [reportOutputResponse.outputStream],
- { type: reportOutputResponse.mimeType }
- )
- link = document.createElement('a')
- link.href = window.URL.createObjectURL(blob)
- link.download = reportOutputResponse.fileName
- if (reportOutputResponse.reportType !== 'pdf' && reportOutputResponse.reportType !== 'html') {
- link.click()
- }
- reportOutputResponse.url = link.href
- }
- this.$store.dispatch('finishProcess', {
- processOutput: reportOutputResponse,
- routeToDelete: this.$route
- })
- })
- },
- openReference(referenceElement) {
- if (referenceElement.windowUuid && referenceElement.recordUuid) {
- const viewSearch = recursiveTreeSearch({
- treeData: this.permissionRoutes,
- attributeValue: referenceElement.windowUuid,
- attributeName: 'meta',
- secondAttribute: 'uuid',
- attributeChilds: 'children'
- })
- if (viewSearch) {
- this.$router.push({
- name: viewSearch.name,
- query: {
- action: referenceElement.type,
- referenceUuid: referenceElement.uuid,
- recordUuid: referenceElement.recordUuid,
- // windowUuid: this.parentUuid,
- tabParent: 0
- }
- }, () => {})
- } else {
- this.$message({
- type: 'error',
- message: this.$t('notifications.noRoleAccess'),
- showClose: true
- })
- }
- }
- },
- setShareLink() {
- let shareLink = this.isWindow || window.location.href.includes('?') ? `${window.location.href}&` : `${window.location.href}?`
- if (this.$route.name === 'Report Viewer') {
- const processParameters = convertFieldsListToShareLink(this.processParametersExecuted)
- const reportFormat = this.$store.getters.getReportType
- shareLink = this.$store.getters.getTempShareLink
- if (String(processParameters).length) {
- shareLink += '?' + processParameters
- shareLink += `&reportType=${reportFormat}`
- }
- } else {
- if (String(this.valuesPanelToShare).length) {
- shareLink += this.valuesPanelToShare
- }
- if (this.$route.query.action && this.$route.query.action !== 'create-new' && this.$route.query.action !== 'reference' && this.$route.query.action !== 'advancedQuery' && this.$route.query.action !== 'criteria') {
- shareLink = window.location.href
- }
- }
- if (shareLink !== this.$route.fullPath) {
- this.activeClipboard(shareLink)
- }
- },
- fallbackCopyTextToClipboard(text) {
- const textArea = document.createElement('textarea')
- textArea.value = text
- document.body.appendChild(textArea)
- textArea.focus()
- textArea.select()
- try {
- if (document.execCommand('copy')) {
- this.clipboardMessage(this.$t('notifications.copySuccessful'))
- }
- } catch (err) {
- this.clipboardMessage(this.$t('notifications.copyUnsuccessful'))
- }
- document.body.removeChild(textArea)
- },
- activeClipboard(text) {
- if (!navigator.clipboard) {
- this.fallbackCopyTextToClipboard(text)
- return
- }
- navigator.clipboard.writeText(text)
- .then(() => {
- this.clipboardMessage(this.$t('notifications.copySuccessful'))
- })
- .catch(() => {
- this.clipboardMessage(this.$t('notifications.copyUnsuccessful'))
- })
- navigator.clipboard.writeText(text)
- },
- clipboardMessage(message) {
- this.$message({
- message: message,
- type: 'success',
- showClose: true,
- duration: 1500
- })
- },
- redirect() {
- const { uuid: name, tabParent } = ROUTES.PRINT_FORMAT_SETUP_WINDOW
- this.$router.push({
- name,
- query: {
- action: this.getReportDefinition.output.printFormatUuid,
- tabParent
- }
- }, () => {})
- },
- validatePrivateAccess({ isLocked, tableName, recordId }) {
- if (!this.isPersonalLock) {
- let isHiddenLock = false
- if (isLocked) {
- isHiddenLock = true
- }
- this.actions = this.actions.map(actionItem => {
- if (actionItem.action === 'lockRecord') {
- return {
- ...actionItem,
- hidden: isHiddenLock,
- tableName,
- recordId
- }
- } else if (actionItem.action === 'unlockRecord') {
- return {
- ...actionItem,
- hidden: !isHiddenLock
- }
- }
- return actionItem
- })
- }
- }
- }
-}
diff --git a/src/components/ADempiere/ContextMenu/contextMenuMobile.vue b/src/components/ADempiere/ContextMenu/contextMenuMobile.vue
deleted file mode 100644
index 76e34e65c15..00000000000
--- a/src/components/ADempiere/ContextMenu/contextMenuMobile.vue
+++ /dev/null
@@ -1,344 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/src/components/ADempiere/ContextMenu/contextMenuStyleScoped.scss b/src/components/ADempiere/ContextMenu/contextMenuStyleScoped.scss
deleted file mode 100644
index 109d4404933..00000000000
--- a/src/components/ADempiere/ContextMenu/contextMenuStyleScoped.scss
+++ /dev/null
@@ -1,75 +0,0 @@
-// 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 .
-
-.el-dropdown-menu {
- position: absolute;
- top: 0;
- left: 0;
- z-index: 10;
- padding: 10px 0;
- margin: 0px 0;
- background-color: #FFFFFF;
- border: 1px solid #e6ebf5;
- border-radius: 4px;
- -webkit-box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
- max-width: 220px;
-}
-
-.el-tree-node__children {
- overflow: hidden;
- background-color: transparent;
- max-width: 99%;
- overflow: auto;
-}
-.el-dropdown .el-button-group {
- display: flex;
-}
-
-
-
-.el-dropdown-menu--mini .el-dropdown-menu__item {
- line-height: 14px;
- padding: 0px 15px;
- font-size: 10px;
-}
-.el-dropdown-menu__item--divided {
- position: relative;
- /* margin-top: 6px; */
- border-top: 1px solid #e6ebf5;
-}
-
-.svg-icon {
- width: 1em;
- height: 2em;
- vertical-align: -0.15em;
- fill: currentColor;
- overflow: hidden;
-}
-.label {
- font-size: 14px;
- margin-top: 0% !important;
- margin-left: 0px;
- text-align: initial;
-}
-.description {
- margin: 0px;
- font-size: 12px;
- text-align: initial;
-}
-.contents {
- display: inline-flex;
-}
diff --git a/src/components/ADempiere/ContextMenu/index.vue b/src/components/ADempiere/ContextMenu/index.vue
deleted file mode 100644
index a65b0dccf97..00000000000
--- a/src/components/ADempiere/ContextMenu/index.vue
+++ /dev/null
@@ -1,197 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/src/components/ADempiere/ContextMenu/itemsRelations.vue b/src/components/ADempiere/ContextMenu/itemsRelations.vue
deleted file mode 100644
index 8d3b9f4eef8..00000000000
--- a/src/components/ADempiere/ContextMenu/itemsRelations.vue
+++ /dev/null
@@ -1,102 +0,0 @@
-
-
-
-
-
-
- {{ item.meta.title }}
-
-
-
- {{ child.meta.title }}
-
-
-
-
-
-
-
- {{ item.meta.title }}
-
-
-
-
-
-
diff --git a/src/components/ADempiere/ContextMenu/relationsMixin.js b/src/components/ADempiere/ContextMenu/relationsMixin.js
deleted file mode 100644
index 65e241ab87d..00000000000
--- a/src/components/ADempiere/ContextMenu/relationsMixin.js
+++ /dev/null
@@ -1,60 +0,0 @@
-// 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
-// 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 .
-
-export default {
- name: 'RelationsMixin',
- computed: {
- relationsList() {
- let menuUuid = this.$route.params.menuParentUuid
- if (this.isEmptyValue(menuUuid)) {
- menuUuid = this.menuParentUuid
- }
- const relations = this.$store.getters.getRelations(menuUuid)
- if (!this.isEmptyValue(relations)) {
- if (!this.isEmptyValue(relations.children)) {
- return relations.children
- }
- if (relations.meta && !this.isEmptyValue(relations.meta.childs)) {
- return relations.meta.childs
- }
- }
- return []
- },
- isEmptyChilds() {
- const childs = this.relationsList
- const len = childs.length
- if (len < 1) {
- return true
- }
- if (len === 1) {
- // diferent to current view
- return childs[0].meta.uuid === this.$route.meta.uuid
- }
- return false
- }
- },
- methods: {
- getChilds(item) {
- if (!this.isEmptyValue(item.children)) {
- return item.children
- }
- if (item.meta && !this.isEmptyValue(item.meta.childs)) {
- return item.meta.childs
- }
- return []
- }
- }
-}
diff --git a/src/components/ADempiere/Dashboard/docstatus/index.vue b/src/components/ADempiere/Dashboard/docstatus/index.vue
index e6691f98f27..cd700655ac9 100644
--- a/src/components/ADempiere/Dashboard/docstatus/index.vue
+++ b/src/components/ADempiere/Dashboard/docstatus/index.vue
@@ -45,6 +45,7 @@
diff --git a/src/components/ADempiere/DataTable/index.vue b/src/components/ADempiere/DataTable/index.vue
deleted file mode 100644
index 50f2198ebfc..00000000000
--- a/src/components/ADempiere/DataTable/index.vue
+++ /dev/null
@@ -1,250 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ displayedValue(scope.row, fieldAttributes) }}
-
-
- {{ displayedValue(scope.row, fieldAttributes) }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/components/ADempiere/DataTable/menu/index.vue b/src/components/ADempiere/DataTable/menu/index.vue
deleted file mode 100644
index 24cdf103068..00000000000
--- a/src/components/ADempiere/DataTable/menu/index.vue
+++ /dev/null
@@ -1,145 +0,0 @@
-
-
-
-
-
-
-
-
- {{ $t('window.newRecord') }}
-
-
- {{ $t('table.dataTable.deleteSelection') }}
-
-
-
- {{ process.name }}
-
-
-
- {{ $t('table.dataTable.exportZip') }}
-
-
-
- {{ $t('table.dataTable.exportRecordTable') }}
-
-
- {{ format }}
-
-
-
- {{ $t('components.filterableItems') }}
-
-
- {{ $t('table.dataTable.showOnlyMandatoryColumns') }}
-
-
- {{ $t('table.dataTable.showAllAvailableColumns') }}
-
-
- {{ panelMetadata.isShowedTotals ? $t('table.dataTable.hiddenTotal') : $t('table.dataTable.showTotal') }}
-
-
- {{ $t('table.ProcessActivity.zoomIn') }}
-
-
-
-
-
-
-
-
diff --git a/src/components/ADempiere/DataTable/menu/menuTableMixin.js b/src/components/ADempiere/DataTable/menu/menuTableMixin.js
deleted file mode 100644
index ac7170b55d8..00000000000
--- a/src/components/ADempiere/DataTable/menu/menuTableMixin.js
+++ /dev/null
@@ -1,297 +0,0 @@
-// ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
-// Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A.
-// Contributor(s): Elsio Sanchez esanchez@erpya.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 { supportedTypes, exportFileFromJson, exportZipFile } from '@/utils/ADempiere/exportUtil.js'
-import { clientDateTime, recursiveTreeSearch } from '@/utils/ADempiere/valueUtils.js'
-import { FIELDS_QUANTITY } from '@/utils/ADempiere/references'
-import TableMixin from '@/components/ADempiere/DataTable/mixin/tableMixin.js'
-
-export default {
- name: 'MixinMenuTable',
- mixins: [
- TableMixin
- ],
- props: {
- currentRow: {
- type: Object,
- default: () => {}
- },
- processMenu: {
- type: Array,
- default: () => []
- },
- panelMetadata: {
- type: Object,
- default: () => {}
- },
- defaultFromatExport: {
- type: String,
- default: 'xlsx'
- }
- },
- data() {
- return {
- supportedTypes,
- menuTable: '1',
- isCollapse: true
- }
- },
- computed: {
- classTableMenu() {
- if (this.isMobile) {
- return 'menu-table-mobile'
- }
- return 'menu-table'
- },
- fieldsList() {
- if (this.panelMetadata && this.panelMetadata.fieldsList) {
- return this.panelMetadata.fieldsList
- }
- return []
- },
- isFieldsQuantity() {
- const fieldsQuantity = this.getterFieldsList.filter(fieldItem => {
- return FIELDS_QUANTITY.includes(fieldItem.displayType)
- }).length
- return !fieldsQuantity
- },
- getterFieldsList() {
- return this.$store.getters.getFieldsListFromPanel(this.containerUuid)
- },
- getterFieldsListHeader() {
- const header = this.getterFieldsList.filter(fieldItem => {
- const isDisplayed = fieldItem.isDisplayed || fieldItem.isDisplayedFromLogic
- if (fieldItem.isActive && isDisplayed && !fieldItem.isKey) {
- return fieldItem.name
- }
- })
- return header.map(fieldItem => {
- return fieldItem.name
- })
- },
- getterFieldsListValue() {
- const value = this.getterFieldsList.filter(fieldItem => {
- const isDisplayed = fieldItem.isDisplayed || fieldItem.isDisplayedFromLogic
- if (fieldItem.isActive && isDisplayed && !fieldItem.isKey) {
- return fieldItem
- }
- })
- return value.map(fieldItem => {
- if (fieldItem.componentPath === 'FieldSelect') {
- return fieldItem.displayColumnName
- }
- return fieldItem.columnName
- })
- },
- permissionRoutes() {
- return this.$store.getters.permission_routes
- }
- },
- methods: {
- sortTab(actionSequence) {
- // TODO: Refactor and remove redundant dispatchs
- this.$store.dispatch('setShowDialog', {
- type: 'window',
- action: actionSequence,
- parentRecordUuid: this.$route.query.action
- })
- },
- showModalTable(process) {
- if (process.type === 'application') {
- this.sortTab(process)
- return
- }
-
- const processData = this.$store.getters.getProcess(process.uuid)
- if (!this.currentRow) {
- this.$store.dispatch('setProcessSelect', {
- selection: this.getDataSelection,
- processTablaSelection: true,
- tableName: this.panelMetadata.keyColumn
- })
- } else {
- let valueProcess
- const selection = this.currentRow
- for (const element in selection) {
- if (element === this.panelMetadata.keyColumn) {
- valueProcess = selection[element]
- }
- }
- this.$store.dispatch('setProcessTable', {
- valueRecord: valueProcess,
- tableName: this.panelMetadata.keyColumn,
- processTable: true
- })
- }
- if (processData === undefined) {
- this.$store.dispatch('getProcessFromServer', {
- containerUuid: process.uuid,
- routeToDelete: this.$route
- })
- .then(response => {
- this.$store.dispatch('setShowDialog', {
- type: process.type,
- action: response,
- record: this.getDataSelection
- })
- }).catch(error => {
- console.warn(`ContextMenu: Dictionary Process (State) - Error ${error.code}: ${error.message}.`)
- })
- } else {
- this.$store.dispatch('setShowDialog', {
- type: process.type,
- action: processData
- })
- }
- },
- showTotals() {
- this.$store.dispatch('changePanelAttributesBoolean', {
- containerUuid: this.containerUuid,
- attributeName: 'isShowedTotals'
- })
- },
- showOnlyMandatoryColumns() {
- this.$store.dispatch('showOnlyMandatoryColumns', {
- containerUuid: this.containerUuid
- })
- },
- showAllAvailableColumns() {
- this.$store.dispatch('showAllAvailableColumns', {
- containerUuid: this.containerUuid
- })
- },
- addNewRow() {
- if (this.newRecordsQuantity <= 0) {
- this.$store.dispatch('addNewRow', {
- parentUuid: this.parentUuid,
- containerUuid: this.containerUuid,
- fieldsList: this.fieldsList,
- isEdit: true,
- isSendServer: false
- })
- return
- }
- const fieldsEmpty = this.$store.getters.getFieldsListEmptyMandatory({
- containerUuid: this.containerUuid
- })
- this.$message({
- message: this.$t('notifications.mandatoryFieldMissing') + fieldsEmpty,
- showClose: true,
- type: 'info'
- })
- },
- showOptionalColums() {
- this.$store.dispatch('changePanelAttributesBoolean', {
- containerUuid: this.containerUuid,
- attributeName: 'isShowedTableOptionalColumns'
- })
- },
- /**
- * @param {string} formatToExport
- */
- exporRecordTable(formatToExport) {
- const header = this.getterFieldsListHeader
- const filterVal = this.getterFieldsListValue
-
- let list = []
- if (this.menuType === 'tableContextMenu') {
- list = [this.currentRow]
- } else {
- list = this.getDataSelection
- }
-
- let title = this.panelMetadata.name
- if (this.isEmptyValue(title)) {
- title = this.$route.meta.title
- }
-
- const data = this.formatJson(filterVal, list)
- exportFileFromJson({
- header,
- data,
- fileName: `${title} ${clientDateTime()}`,
- exportType: formatToExport
- })
-
- this.closeMenu()
- },
- /**
- * Export records as .txt into compressed .zip file
- */
- exporZipRecordTable({
- recordContexMenu = false
- }) {
- const header = this.getterFieldsListHeader
- const filterVal = this.getterFieldsListValue
- let list = this.getDataSelection
- if (this.getDataSelection.length <= 0) {
- list = this.recordsData
- }
- if (recordContexMenu) {
- list = [this.currentRow]
- }
- const data = this.formatJson(filterVal, list)
-
- let title = this.panelMetadata.name
- if (this.isEmptyValue(title)) {
- title = this.$route.meta.title
- }
-
- exportZipFile({
- header,
- data,
- txtName: title,
- zipName: `${title} ${clientDateTime()}`
- })
- },
- formatJson(filterVal, jsonData) {
- return jsonData.map(row => {
- return filterVal.map(column => {
- return row[column]
- })
- })
- },
- zoomRecord() {
- const browserMetadata = this.$store.getters.getBrowser(this.$route.meta.uuid)
- const { elementName } = browserMetadata.fieldsList.find(field => field.columnName === browserMetadata.keyColumn)
- const records = []
- this.getDataSelection.forEach(recordItem => {
- let record = recordItem[browserMetadata.keyColumn]
- if (!isNaN(record)) {
- record = Number(record)
- }
- records.push(record)
- })
-
- const viewSearch = recursiveTreeSearch({
- treeData: this.permissionRoutes,
- attributeValue: browserMetadata.window.uuid,
- attributeName: 'meta',
- secondAttribute: 'uuid',
- attributeChilds: 'children'
- })
- if (viewSearch) {
- this.$router.push({
- name: viewSearch.name,
- query: {
- action: 'advancedQuery',
- [elementName]: records
- }
- }, () => {})
- }
- }
- }
-}
diff --git a/src/components/ADempiere/DataTable/menu/tableContextMenu.vue b/src/components/ADempiere/DataTable/menu/tableContextMenu.vue
deleted file mode 100644
index 217e5c49cd0..00000000000
--- a/src/components/ADempiere/DataTable/menu/tableContextMenu.vue
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
-
- {{ $t('data.exportRecord') }}
-
-
- {{ format }}
-
-
-
- {{ $t('table.dataTable.exportZip') }}
-
-
- {{ $t('window.deleteRecord') }}
-
-
-
-
- {{ process.name }}
-
-
-
-
-
diff --git a/src/components/ADempiere/DataTable/mixin/mixinTableSort.js b/src/components/ADempiere/DataTable/mixin/mixinTableSort.js
deleted file mode 100644
index 918bd7c4c7b..00000000000
--- a/src/components/ADempiere/DataTable/mixin/mixinTableSort.js
+++ /dev/null
@@ -1,56 +0,0 @@
-// ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
-// Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A.
-// Contributor(s): Yamel Senih ysenih@erpya.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 Sortable from 'sortablejs'
-
-export default {
- name: 'MixinTableSort',
- data() {
- return {
- sortable: null
- }
- },
- methods: {
- async getList() {
- this.oldgetDataDetail = this.recordsData.map(v => v.id)
- this.newgetDataDetail = this.oldgetDataDetail.slice()
- this.$nextTick(() => {
- this.setSort()
- })
- },
- setSort() {
- if (!this.isMobile) {
- const el = this.$refs.multipleTable.$el.querySelectorAll('.el-table__body-wrapper > table > tbody')[0]
- this.sortable = Sortable.create(el, {
- ghostClass: 'sortable-ghost', // Class name for the drop placeholder,
- setData: dataTransfer => {
- // to avoid Firefox bug
- // Detail see : https://github.com/RubaXa/Sortable/issues/1012
- dataTransfer.setData('Text', '')
- },
- onEnd: evt => {
- const targetRow = this.recordsData.splice(evt.oldIndex, 1)[0]
- this.recordsData.splice(evt.newIndex, 0, targetRow)
-
- // for show the changes, you can delete in you code
- const tempIndex = this.newgetDataDetail.splice(evt.oldIndex, 1)[0]
- this.newgetDataDetail.splice(evt.newIndex, 0, tempIndex)
- }
- })
- }
- }
- }
-}
diff --git a/src/components/ADempiere/DataTable/mixin/tableMixin.js b/src/components/ADempiere/DataTable/mixin/tableMixin.js
deleted file mode 100644
index 56732dd3ffd..00000000000
--- a/src/components/ADempiere/DataTable/mixin/tableMixin.js
+++ /dev/null
@@ -1,125 +0,0 @@
-// ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
-// Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A.
-// Contributor(s): Yamel Senih ysenih@erpya.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 .
-
-export default {
- name: 'TableMixin',
- props: {
- parentUuid: {
- type: String,
- default: undefined
- },
- containerUuid: {
- type: String,
- required: true
- },
- panelType: {
- type: String,
- default: 'window'
- },
- // is used in root view with primary records
- isParent: {
- type: Boolean,
- default: false
- }
- },
- computed: {
- isMobile() {
- return this.$store.state.app.device === 'mobile'
- },
- isCreateNewRoute() {
- return this.$route.query.action === 'create-new'
- },
- isPanelWindow() {
- return Boolean(this.panelType === 'window')
- },
- isReadOnlyParent() {
- if (this.isPanelWindow) {
- if (!this.$store.getters.getContainerIsActive(this.parentUuid)) {
- return true
- }
- if (this.$store.getters.getContainerProcessing(this.parentUuid)) {
- return true
- }
- if (this.$store.getters.getContainerProcessed(this.parentUuid)) {
- return true
- }
- }
- return false
- },
- isDisabledAddNew() {
- if (this.isParent) {
- return true
- }
- if (this.isCreateNewRoute) {
- return true
- }
- const panelMetadata = this.panelMetadata
- if (panelMetadata && !panelMetadata.isInsertRecord) {
- return true
- }
- if (this.isReadOnlyParent) {
- return true
- }
- if (this.getterNewRecords) {
- return true
- }
- return false
- },
- // records, selection, record count
- getterDataRecordsAndSelection() {
- return this.$store.getters.getDataRecordAndSelection(this.containerUuid)
- },
- recordsData() {
- return this.getterDataRecordsAndSelection.record
- },
- getDataSelection() {
- return this.getterDataRecordsAndSelection.selection
- },
- newRecordsQuantity() {
- if (this.isPanelWindow && !this.isParent) {
- const newRecordTable = this.getterDataRecordsAndSelection.record.filter(recordItem => {
- return recordItem.isNew
- })
- return newRecordTable.length
- }
- return 0
- }
- },
- methods: {
- closeMenu() {
- // TODO: Validate to dispatch one action
- this.$store.dispatch('showMenuTable', {
- isShowedTable: false
- })
- this.$store.dispatch('showMenuTabChildren', {
- isShowedTabChildren: false
- })
- },
- deleteSelection() {
- this.$store.dispatch('deleteSelectionDataList', {
- parentUuid: this.parentUuid,
- containerUuid: this.containerUuid
- })
- .then(() => {
- this.$store.dispatch('setRecordSelection', {
- parentUuid: this.parentUuid,
- containerUuid: this.containerUuid,
- panelType: this.panelType
- })
- })
- }
- }
-}
diff --git a/src/components/ADempiere/DefaultTable/CellInfo.vue b/src/components/ADempiere/DefaultTable/CellInfo.vue
index b15bccbb84d..a9b25ab0288 100644
--- a/src/components/ADempiere/DefaultTable/CellInfo.vue
+++ b/src/components/ADempiere/DefaultTable/CellInfo.vue
@@ -1,35 +1,120 @@
+
+
-
- {{ displayedValue }}
-
+
+
+
- {{ displayedValue }}
+
+
+
+
+
+
+ {{ displayedValue }}
+
+
+
+
+ {{ displayedValue }}
+
+
+
+
+
+
+ {{ displayedValue }}
+
+
+
diff --git a/src/components/ADempiere/DefaultTable/ColumnsDisplayOption.vue b/src/components/ADempiere/DefaultTable/ColumnsDisplayOption.vue
new file mode 100644
index 00000000000..40db477ea1a
--- /dev/null
+++ b/src/components/ADempiere/DefaultTable/ColumnsDisplayOption.vue
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('table.dataTable.showAllColumns') }}
+
+
+
+ {{ $t('table.dataTable.showOnlyMandatoryColumns') }}
+
+
+
+ {{ $t('table.dataTable.showTableColumnsOnly') }}
+
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/DefaultTable/CustomPagination.vue b/src/components/ADempiere/DefaultTable/CustomPagination.vue
new file mode 100644
index 00000000000..ef200916284
--- /dev/null
+++ b/src/components/ADempiere/DefaultTable/CustomPagination.vue
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+
+ {{ $t('table.dataTable.selected') }}: {{ selection }} /
+
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/DefaultTable/index.vue b/src/components/ADempiere/DefaultTable/index.vue
index ccc10394cb8..835e0b7f09a 100644
--- a/src/components/ADempiere/DefaultTable/index.vue
+++ b/src/components/ADempiere/DefaultTable/index.vue
@@ -17,30 +17,54 @@
-->
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -62,7 +89,7 @@
+
+
diff --git a/src/components/ADempiere/Dialog/embedded.vue b/src/components/ADempiere/Dialog/embedded.vue
index 9130b45a1d5..2994319c8cd 100644
--- a/src/components/ADempiere/Dialog/embedded.vue
+++ b/src/components/ADempiere/Dialog/embedded.vue
@@ -17,6 +17,13 @@
-->
+ This is a message
+
+
diff --git a/src/components/ADempiere/Dialog/index.vue b/src/components/ADempiere/Dialog/index.vue
index 5c45a83c6ba..d6f4fb45201 100644
--- a/src/components/ADempiere/Dialog/index.vue
+++ b/src/components/ADempiere/Dialog/index.vue
@@ -17,6 +17,13 @@
-->
+ This is a message
+
+
diff --git a/src/components/ADempiere/Field/FieldAutocomplete.vue b/src/components/ADempiere/Field/FieldAutocomplete.vue
index 697370adeb6..57641c386a9 100644
--- a/src/components/ADempiere/Field/FieldAutocomplete.vue
+++ b/src/components/ADempiere/Field/FieldAutocomplete.vue
@@ -53,12 +53,19 @@
-
diff --git a/src/components/ADempiere/Field/FieldLocation/locationAddressForm.vue b/src/components/ADempiere/Field/FieldLocation/locationAddressForm.vue
index 8c1340a70d2..609fecea253 100644
--- a/src/components/ADempiere/Field/FieldLocation/locationAddressForm.vue
+++ b/src/components/ADempiere/Field/FieldLocation/locationAddressForm.vue
@@ -15,6 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see .
-->
+
-
+
-
+
+
@@ -65,33 +71,47 @@
+
+
+
diff --git a/src/components/ADempiere/Field/FieldOptions/changeLogs/index.vue b/src/components/ADempiere/Field/FieldOptions/ChangeLogs/index.vue
similarity index 84%
rename from src/components/ADempiere/Field/FieldOptions/changeLogs/index.vue
rename to src/components/ADempiere/Field/FieldOptions/ChangeLogs/index.vue
index 4651d15b751..f6f0e7ff7e7 100644
--- a/src/components/ADempiere/Field/FieldOptions/changeLogs/index.vue
+++ b/src/components/ADempiere/Field/FieldOptions/ChangeLogs/index.vue
@@ -15,14 +15,16 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see .
-->
+
-
-
+
+
{{ $t('field.logsField') }}
{{ fieldAttributes.name }}
+
@@ -40,16 +42,18 @@
-
+
{{ list.displayColumnName }} :
-
- {{ list.oldDisplayValue }}
-
+
-
- {{ list.newDisplayValue }}
-
+
{{ list.displayColumnName }} :
@@ -77,9 +81,19 @@
+
+
diff --git a/src/components/ADempiere/Field/FieldOptions/DocumentStatus/index.vue b/src/components/ADempiere/Field/FieldOptions/DocumentStatus/index.vue
new file mode 100644
index 00000000000..768958fd2b7
--- /dev/null
+++ b/src/components/ADempiere/Field/FieldOptions/DocumentStatus/index.vue
@@ -0,0 +1,269 @@
+
+
+
+
+
+
+ {{ $t('field.field') }}:
+ {{ fieldAttributes.name }}
+
+
+
+
+ {{ fieldAttributes.description }}
+
+
+
+
+
+
+
+
+ {{ displayedValue }}
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/Field/FieldOptions/EmptyOption.vue b/src/components/ADempiere/Field/FieldOptions/EmptyOption.vue
new file mode 100644
index 00000000000..73e7a9df3c3
--- /dev/null
+++ b/src/components/ADempiere/Field/FieldOptions/EmptyOption.vue
@@ -0,0 +1,25 @@
+
+
+
diff --git a/src/components/ADempiere/Field/FieldOptions/LabelField.vue b/src/components/ADempiere/Field/FieldOptions/LabelField.vue
index 5100be8b11c..aa848c419b6 100644
--- a/src/components/ADempiere/Field/FieldOptions/LabelField.vue
+++ b/src/components/ADempiere/Field/FieldOptions/LabelField.vue
@@ -1,15 +1,21 @@
-
+
{{ label }}
- *
-
+
+ *
+
+
-
+
-
diff --git a/src/components/ADempiere/Field/FieldOptions/LabelPopoverOption.vue b/src/components/ADempiere/Field/FieldOptions/LabelPopoverOption.vue
index 639e1e6d433..84a142dc053 100644
--- a/src/components/ADempiere/Field/FieldOptions/LabelPopoverOption.vue
+++ b/src/components/ADempiere/Field/FieldOptions/LabelPopoverOption.vue
@@ -1,7 +1,16 @@
-
-
-
+
+
+
+
{{ option.name }}
@@ -11,7 +20,11 @@
-
diff --git a/src/components/ADempiere/Field/FieldOptions/operatorComparison/index.vue b/src/components/ADempiere/Field/FieldOptions/OperatorComparison/index.vue
similarity index 98%
rename from src/components/ADempiere/Field/FieldOptions/operatorComparison/index.vue
rename to src/components/ADempiere/Field/FieldOptions/OperatorComparison/index.vue
index b6ea61c0358..044b04f9dd2 100644
--- a/src/components/ADempiere/Field/FieldOptions/operatorComparison/index.vue
+++ b/src/components/ADempiere/Field/FieldOptions/OperatorComparison/index.vue
@@ -40,7 +40,7 @@
import { computed, defineComponent, ref } from '@vue/composition-api'
export default defineComponent({
- name: 'FieldOperatorComparison',
+ name: 'OperatorComparisonField',
props: {
fieldAttributes: {
diff --git a/src/components/ADempiere/Field/FieldOptions/PreferenceValue/index.vue b/src/components/ADempiere/Field/FieldOptions/PreferenceValue/index.vue
new file mode 100644
index 00000000000..7d25320a797
--- /dev/null
+++ b/src/components/ADempiere/Field/FieldOptions/PreferenceValue/index.vue
@@ -0,0 +1,388 @@
+
+
+
+
+
+
+ {{ $t('fieldOptions.preference.title') }}:
+
+ {{ fieldAttributes.name }}
+
+
+
+
+ {{ getDescriptionOfPreference }}
+
+
+
+
+ -
+ {{ $t('fieldOptions.currentValue') }}:
+
+
+
+ {{ value }} - {{ displayedValue }}
+
+
+ {{ value }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ field.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/Field/FieldOptions/preference/preferenceFields.js b/src/components/ADempiere/Field/FieldOptions/PreferenceValue/preferenceValueFieldsList.js
similarity index 91%
rename from src/components/ADempiere/Field/FieldOptions/preference/preferenceFields.js
rename to src/components/ADempiere/Field/FieldOptions/PreferenceValue/preferenceValueFieldsList.js
index 50895126cda..78fdec04ffb 100644
--- a/src/components/ADempiere/Field/FieldOptions/preference/preferenceFields.js
+++ b/src/components/ADempiere/Field/FieldOptions/PreferenceValue/preferenceValueFieldsList.js
@@ -22,6 +22,7 @@ export default [
overwriteDefinition: {
size: 24,
sequence: 0,
+ isActiveLogics: true, // enable logics
isReadOnly: true,
handleActionPerformed: true,
handleContentSelection: true,
@@ -37,10 +38,12 @@ export default [
overwriteDefinition: {
size: 24,
sequence: 1,
+ isActiveLogics: true, // enable logics
handleActionPerformed: true,
handleContentSelection: true,
handleActionKeyPerformed: true,
componentPath: 'FieldYesNo',
+ readOnlyLogic: `@AD_Client_ID@='N'`,
value: false
}
},
@@ -51,6 +54,7 @@ export default [
overwriteDefinition: {
size: 24,
sequence: 2,
+ isActiveLogics: true, // enable logics
isReadOnly: true,
handleActionPerformed: true,
handleContentSelection: true,
@@ -66,6 +70,7 @@ export default [
overwriteDefinition: {
size: 24,
sequence: 3,
+ isActiveLogics: true, // enable logics
isReadOnly: true,
handleActionPerformed: true,
handleContentSelection: true,
diff --git a/src/components/ADempiere/Field/FieldOptions/TranslatedField/index.vue b/src/components/ADempiere/Field/FieldOptions/TranslatedField/index.vue
new file mode 100644
index 00000000000..7e9e76981b6
--- /dev/null
+++ b/src/components/ADempiere/Field/FieldOptions/TranslatedField/index.vue
@@ -0,0 +1,264 @@
+
+
+
+
+
+
+ {{ $t('field.field') }}
+ {{ fieldAttributes.name }}
+
+
+
+
+
+
+ {{ $t('field.container.description') }}:
+ {{ fieldAttributes.description }}
+
+
+
+ {{ $t('field.container.help') }}:
+ {{ fieldAttributes.help }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/Field/FieldOptions/calculator/index.vue b/src/components/ADempiere/Field/FieldOptions/calculator/index.vue
deleted file mode 100644
index d5de24c7374..00000000000
--- a/src/components/ADempiere/Field/FieldOptions/calculator/index.vue
+++ /dev/null
@@ -1,329 +0,0 @@
-
-
-
-
-
- {{ $t('field.field') }}
- {{ fieldAttributes.name }}
-
-
-
-
-
-
-
-
-
-
-
- {{ row.row1.value }}
-
-
-
-
-
-
- {{ row.row2.value }}
-
-
-
-
-
-
- {{ row.row3.value }}
-
-
-
-
-
-
- {{ row.row4.value }}
-
-
-
-
-
-
- {{ row.row5.value }}
-
-
-
-
-
-
-
-
-
-
diff --git a/src/components/ADempiere/Field/FieldOptions/common-style.scss b/src/components/ADempiere/Field/FieldOptions/common-style.scss
new file mode 100644
index 00000000000..0caec02e19e
--- /dev/null
+++ b/src/components/ADempiere/Field/FieldOptions/common-style.scss
@@ -0,0 +1,48 @@
+// 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 .
+
+.field-option-card {
+ &.el-card {
+ border: 0px solid #e6ebf5 !important;
+
+ >.el-card__header {
+ padding: 0px;
+ padding-bottom: 5px;
+ }
+
+ >.el-card__body {
+ padding: 0px 0px;
+
+ .el-form-item {
+ margin-bottom: 0px !important;
+ }
+
+ // .el-form--label-top,
+ // .el-form--label-top &.el-form-item__label,
+ .el-form-item__label {
+ margin-top: 5px !important;
+ line-height: 20px !important;
+ padding: 0px;
+ }
+ }
+ }
+
+ &.el-card.is-always-shadow {
+ -webkit-box-shadow: 0 0px 0px 0 rgba(0, 0, 0, 0.1) !important;
+ box-shadow: 0 0px 0px 0 rgba(0, 0, 0, 0.1) !important;
+ }
+
+}
\ No newline at end of file
diff --git a/src/components/ADempiere/Field/FieldOptions/contextInfo/index.vue b/src/components/ADempiere/Field/FieldOptions/contextInfo/index.vue
deleted file mode 100644
index bb8f27fa289..00000000000
--- a/src/components/ADempiere/Field/FieldOptions/contextInfo/index.vue
+++ /dev/null
@@ -1,154 +0,0 @@
-
-
-
-
-
-
- {{ $t('field.field') }}
- {{ fieldAttributes.name }}
-
-
-
-
-
- {{ messageText }}
-
-
- {{ fieldAttributes.description }}
-
-
- {{ fieldAttributes.help }}
-
-
-
-
-
- {{ $t('table.ProcessActivity.zoomIn') }}
- {{ zoomItem.name }}
-
-
-
-
-
-
-
diff --git a/src/components/ADempiere/Field/FieldOptions/documentStatus/index.vue b/src/components/ADempiere/Field/FieldOptions/documentStatus/index.vue
deleted file mode 100644
index 05f3580fbd0..00000000000
--- a/src/components/ADempiere/Field/FieldOptions/documentStatus/index.vue
+++ /dev/null
@@ -1,161 +0,0 @@
-
-
-
-
-
-
-
- {{ fieldAttributes.displayColumn }}
-
-
- {{ labelDocumentActions }}
-
- {{ fieldAttributes.description }}
- {{ descriptionDocumentActions }}
-
-
-
-
-
diff --git a/src/components/ADempiere/Field/FieldOptions/fieldOptionsList.js b/src/components/ADempiere/Field/FieldOptions/fieldOptionsList.js
index 4c6b91f7226..411025431cf 100644
--- a/src/components/ADempiere/Field/FieldOptions/fieldOptionsList.js
+++ b/src/components/ADempiere/Field/FieldOptions/fieldOptionsList.js
@@ -16,45 +16,48 @@
import language from '@/lang'
+/**
+ * For lookup fields with context info
+ */
export const infoOptionItem = {
name: language.t('field.info'),
enabled: true,
svg: false,
icon: 'el-icon-info',
- componentRender: () => import('@/components/ADempiere/Field/FieldOptions/contextInfo')
+ componentRender: () => import('@/components/ADempiere/Field/FieldOptions/ContextInfo')
}
/**
- * For operators in advanced query
+ * For zoom window of the field
*/
-export const operatorOptionItem = {
- name: language.t('operators.operator'),
+export const zoomInOptionItem = {
+ name: language.t('table.ProcessActivity.zoomIn'),
enabled: true,
svg: false,
- icon: 'el-icon-rank',
- componentRender: () => import('@/components/ADempiere/Field/FieldOptions/operatorComparison')
+ icon: 'el-icon-files',
+ componentRender: () => import('@/components/ADempiere/Field/FieldOptions/EmptyOption')
}
/**
- * For lookup fields with context info
+ * For operators in advanced query
*/
-export const zoomInOptionItem = {
- name: language.t('table.ProcessActivity.zoomIn'),
+export const operatorOptionItem = {
+ name: language.t('operators.operator'),
enabled: true,
svg: false,
- icon: 'el-icon-files',
- componentRender: () => import('@/components/ADempiere/Field/FieldOptions/contextInfo')
+ icon: 'el-icon-rank',
+ componentRender: () => import('@/components/ADempiere/Field/FieldOptions/OperatorComparison')
}
/**
* Only when is translate option
*/
export const translateOptionItem = {
- name: language.t('language'),
+ name: language.t('fieldOptions.translation'),
enabled: true,
svg: true,
icon: 'language',
- componentRender: () => import('@/components/ADempiere/Field/FieldOptions/translated')
+ componentRender: () => import('@/components/ADempiere/Field/FieldOptions/TranslatedField')
}
/**
@@ -65,15 +68,15 @@ export const calculatorOptionItem = {
enabled: true,
svg: false,
icon: 'el-icon-s-operation',
- componentRender: () => import('@/components/ADempiere/Field/FieldOptions/calculator')
+ componentRender: () => import('@/components/ADempiere/Field/FieldOptions/CalculatorField')
}
-export const preferenceOptionItem = {
+export const preferenceValueOptionItem = {
name: language.t('field.preference'),
enabled: true,
svg: false,
icon: 'el-icon-notebook-2',
- componentRender: () => import('@/components/ADempiere/Field/FieldOptions/preference')
+ componentRender: () => import('@/components/ADempiere/Field/FieldOptions/PreferenceValue')
}
export const logsOptionItem = {
@@ -81,7 +84,7 @@ export const logsOptionItem = {
enabled: true,
svg: true,
icon: 'tree-table',
- componentRender: () => import('@/components/ADempiere/Field/FieldOptions/changeLogs')
+ componentRender: () => import('@/components/ADempiere/Field/FieldOptions/ChangeLogs')
}
/**
@@ -92,12 +95,23 @@ export const documentStatusOptionItem = {
enabled: true,
svg: false,
icon: 'el-icon-set-up',
- componentRender: () => import('@/components/ADempiere/Field/FieldOptions/documentStatus')
+ componentRender: () => import('@/components/ADempiere/Field/FieldOptions/DocumentStatus')
+}
+
+/**
+ * Hide only this field
+ */
+export const hideThisField = {
+ name: language.t('fieldOptions.hideThisField'),
+ enabled: true,
+ svg: true,
+ icon: 'eye',
+ componentRender: () => import('@/components/ADempiere/Field/FieldOptions/EmptyOption')
}
export const optionsListStandad = [
infoOptionItem,
- preferenceOptionItem,
+ preferenceValueOptionItem,
logsOptionItem
]
diff --git a/src/components/ADempiere/Field/FieldOptions/index.vue b/src/components/ADempiere/Field/FieldOptions/index.vue
index f36da0a6b0f..ff74a9d6442 100644
--- a/src/components/ADempiere/Field/FieldOptions/index.vue
+++ b/src/components/ADempiere/Field/FieldOptions/index.vue
@@ -17,7 +17,7 @@
-->
-
+
-
+
+
+
-
-
diff --git a/src/components/ADempiere/Field/FieldOptions/preference/index.vue b/src/components/ADempiere/Field/FieldOptions/preference/index.vue
deleted file mode 100644
index d4351f560f8..00000000000
--- a/src/components/ADempiere/Field/FieldOptions/preference/index.vue
+++ /dev/null
@@ -1,325 +0,0 @@
-
-
-
-
-
- {{ $t('components.preference.title') }}
-
- {{ fieldAttributes.name }}
- {{ fieldValue }}
-
-
-
-
- {{
- getDescriptionOfPreference
- }}
-
-
-
-
-
-
- {{ fieldAttributes.name }}: {{ fieldValue }}
-
-
-
-
-
-
- {{ field.name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/components/ADempiere/Field/FieldOptions/translated/index.vue b/src/components/ADempiere/Field/FieldOptions/translated/index.vue
deleted file mode 100644
index cc364ba7d1d..00000000000
--- a/src/components/ADempiere/Field/FieldOptions/translated/index.vue
+++ /dev/null
@@ -1,220 +0,0 @@
-
-
-
-
-
- {{ $t('field.field') }}
- {{ fieldAttributes.name }}
-
-
-
-
-
- {{ fieldAttributes.description }}
-
-
- {{ fieldAttributes.help }}
-
-
-
- {{ $t('language') + ':' }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/components/ADempiere/Field/FieldSelect.vue b/src/components/ADempiere/Field/FieldSelect.vue
index 39bfa48674b..2eb2ed97a91 100644
--- a/src/components/ADempiere/Field/FieldSelect.vue
+++ b/src/components/ADempiere/Field/FieldSelect.vue
@@ -15,6 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see
.
-->
+
diff --git a/src/components/ADempiere/Field/FieldText.vue b/src/components/ADempiere/Field/FieldText.vue
index eef2104067f..76b0e893b7e 100644
--- a/src/components/ADempiere/Field/FieldText.vue
+++ b/src/components/ADempiere/Field/FieldText.vue
@@ -15,6 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see
.
-->
+
-
diff --git a/src/components/ADempiere/Field/FieldTextLong.vue b/src/components/ADempiere/Field/FieldTextLong.vue
index 2517b1dd153..60f9908bd2e 100644
--- a/src/components/ADempiere/Field/FieldTextLong.vue
+++ b/src/components/ADempiere/Field/FieldTextLong.vue
@@ -1,7 +1,7 @@
+
diff --git a/src/components/ADempiere/Field/index.vue b/src/components/ADempiere/Field/index.vue
index 8b693026e00..601f63886c1 100644
--- a/src/components/ADempiere/Field/index.vue
+++ b/src/components/ADempiere/Field/index.vue
@@ -15,10 +15,24 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see
.
-->
+
-
+
+
+
@@ -38,27 +54,28 @@
:is="componentRender"
:id="field.panelType !== 'form' ? field.columnName : ''"
:ref="field.columnName"
+ :parent-uuid="parentUuid"
+ :container-uuid="containerUuid"
+ :container-manager="containerManager"
:metadata="fieldAttributes"
- :value-model="recordDataFields"
/>
-
diff --git a/src/components/ADempiere/Field/mixin/mixinField.js b/src/components/ADempiere/Field/mixin/mixinField.js
index 593f1f9b47a..f6ea0711230 100644
--- a/src/components/ADempiere/Field/mixin/mixinField.js
+++ b/src/components/ADempiere/Field/mixin/mixinField.js
@@ -15,17 +15,27 @@
// along with this program. If not, see
.
export default {
+ name: 'MixinField',
+
props: {
- metadata: {
+ parentUuid: {
+ type: String,
+ default: undefined
+ },
+ containerUuid: {
+ type: String,
+ required: true
+ },
+ containerManager: {
type: Object,
required: true
},
- // value received from data result
- valueModel: {
- type: [String, Number, Boolean, Date, Array, Object],
- default: null
+ metadata: {
+ type: Object,
+ required: true
}
},
+
computed: {
isMobile() {
return this.$store.state.app.device === 'mobile'
@@ -35,22 +45,33 @@ export default {
},
cssClassStyle() {
let styleClass = ''
+ if (this.isEmptyRequired) {
+ styleClass += ' field-empty-required '
+ }
+
if (!this.isEmptyValue(this.metadata.cssClassName)) {
styleClass = this.metadata.cssClassName
}
+
return styleClass
},
+ isEmptyRequired() {
+ return this.isEmptyValue(this.value) && this.metadata.required
+ },
value: {
get() {
- const { columnName, containerUuid } = this.metadata
+ const { columnName, containerUuid, inTable } = this.metadata
// table records values
- if (this.metadata.inTable) {
- const row = this.$store.getters.getRowData({
- containerUuid,
- index: this.metadata.tableIndex
- })
- return row[columnName]
+ if (inTable) {
+ // implement container manager row
+ if (this.containerManager && this.containerManager.getCell) {
+ return this.containerManager.getCell({
+ containerUuid,
+ rowIndex: this.metadata.rowIndex,
+ columnName
+ })
+ }
}
// main panel values
@@ -61,15 +82,6 @@ export default {
})
},
set(value) {
- if (this.metadata.inTable) {
- this.$store.dispatch('notifyCellTableChange', {
- parentUuid: this.metadata.parentUuid,
- containerUuid: this.metadata.containerUuid,
- newValue: value,
- field: this.metadata
- })
- return
- }
this.$store.commit('updateValueOfField', {
parentUuid: this.metadata.parentUuid,
containerUuid: this.metadata.containerUuid,
@@ -79,22 +91,38 @@ export default {
}
}
},
+
async created() {
- if (this.metadata.isSQLValue && (this.isEmptyValue(this.metadata.value) || this.metadata.value.isSQL)) {
- const value = await this.$store.dispatch('getValueBySQL', {
+ if (this.metadata.isSQLValue && this.isEmptyValue(this.value)) {
+ let value = this.$store.getters.getStoredDefaultValue({
parentUuid: this.metadata.parentUuid,
containerUuid: this.metadata.containerUuid,
query: this.metadata.defaultValue
})
+
+ if (this.isEmptyValue(value)) {
+ value = await this.$store.dispatch('getDefaultValue', {
+ parentUuid: this.metadata.parentUuid,
+ containerUuid: this.metadata.containerUuid,
+ columnName: this.metadata.columnName,
+ query: this.metadata.defaultValue
+ })
+ }
+
+ // set value into component and fieldValue store
+ this.value = this.parseValue(value)
+
// set value and change into store
this.preHandleChange(value)
}
},
+
mounted() {
if (this.metadata.handleRequestFocus) {
this.requestFocus()
}
},
+
methods: {
/**
* Parse the value to a new value if required for element-ui component
@@ -157,7 +185,6 @@ export default {
}
},
actionKeyPerformed(value) {
- // TODO: Delete for production
if (this.metadata.handleActionKeyPerformed) {
this.$store.dispatch('notifyActionKeyPerformed', {
containerUuid: this.metadata.containerUuid,
@@ -180,7 +207,7 @@ export default {
/**
* @param {mixed} value, main value in component
* @param {mixed} valueTo, used in end value in range
- * @param {string} label, or displayColumn to show in select
+ * @param {string} label, or displayColumnName to show in select
*/
handleFieldChange({
value,
@@ -199,22 +226,25 @@ export default {
// if is custom field, set custom handle change value
if (this.metadata.isCustomField) {
if (this.metadata.isActiveLogics) {
+ let fieldsList = []
+ if (this.containerManager.getFieldsList) {
+ fieldsList = this.containerManager.getFieldsList({
+ parentUuid: this.metadata.parentUuid,
+ containerUuid: this.metadata.containerUuid,
+ root: this
+ })
+ }
this.$store.dispatch('changeDependentFieldsList', {
- field: this.metadata
+ field: this.metadata,
+ fieldsList
})
}
return
}
- if (this.metadata.inTable) {
- this.$store.dispatch('notifyCellTableChange', {
- parentUuid: this.metadata.parentUuid,
- containerUuid: this.metadata.containerUuid,
- field: this.metadata
- })
- }
this.$store.dispatch('notifyFieldChange', {
containerUuid: this.metadata.containerUuid,
+ containerManager: this.containerManager,
field: this.metadata,
columnName: this.metadata.columnName
})
diff --git a/src/components/ADempiere/Field/mixin/mixinFieldRange.js b/src/components/ADempiere/Field/mixin/mixinFieldRange.js
index df953f8c72c..00abb18bdc9 100644
--- a/src/components/ADempiere/Field/mixin/mixinFieldRange.js
+++ b/src/components/ADempiere/Field/mixin/mixinFieldRange.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,6 +15,8 @@
// along with this program. If not, see
.
export default {
+ name: 'MixinFieldRange',
+
computed: {
value: {
get() {
diff --git a/src/components/ADempiere/Field/mixin/mixinFieldText.js b/src/components/ADempiere/Field/mixin/mixinFieldText.js
index 4e5e6680d9a..5d4718782a3 100644
--- a/src/components/ADempiere/Field/mixin/mixinFieldText.js
+++ b/src/components/ADempiere/Field/mixin/mixinFieldText.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,6 +15,8 @@
// along with this program. If not, see
.
export default {
+ name: 'MixinFieldText',
+
methods: {
parseValue(value) {
if (this.isEmptyValue(value)) {
@@ -23,4 +25,5 @@ export default {
return String(value)
}
}
+
}
diff --git a/src/components/ADempiere/FileRender/EmptyFile/index.vue b/src/components/ADempiere/FileRender/EmptyFile/index.vue
new file mode 100644
index 00000000000..8861deca0a8
--- /dev/null
+++ b/src/components/ADempiere/FileRender/EmptyFile/index.vue
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/FileRender/ExcelFile/index.vue b/src/components/ADempiere/FileRender/ExcelFile/index.vue
new file mode 100644
index 00000000000..3323ea064b8
--- /dev/null
+++ b/src/components/ADempiere/FileRender/ExcelFile/index.vue
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+ {{ $t('components.contextMenuDownload') }}
+
+
+
+
+
+ {{ scope.row[item] }} {{ item }}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/FileRender/HtmlFile/index.vue b/src/components/ADempiere/FileRender/HtmlFile/index.vue
new file mode 100644
index 00000000000..c737c2933f2
--- /dev/null
+++ b/src/components/ADempiere/FileRender/HtmlFile/index.vue
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ADempiere/WindowView/StandardWindow.vue b/src/components/ADempiere/FileRender/PdfFile/index.vue
similarity index 73%
rename from src/views/ADempiere/WindowView/StandardWindow.vue
rename to src/components/ADempiere/FileRender/PdfFile/index.vue
index ba98ff850c4..5cdc524bfe7 100644
--- a/src/views/ADempiere/WindowView/StandardWindow.vue
+++ b/src/components/ADempiere/FileRender/PdfFile/index.vue
@@ -6,50 +6,43 @@
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
.
-->
-
+
+
diff --git a/src/components/ADempiere/FileRender/index.vue b/src/components/ADempiere/FileRender/index.vue
new file mode 100644
index 00000000000..4710871eb7e
--- /dev/null
+++ b/src/components/ADempiere/FileRender/index.vue
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/FilterFields/fieldsDisplayOptions.vue b/src/components/ADempiere/FilterFields/fieldsDisplayOptions.vue
new file mode 100644
index 00000000000..871de5b2f8a
--- /dev/null
+++ b/src/components/ADempiere/FilterFields/fieldsDisplayOptions.vue
@@ -0,0 +1,149 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('fieldDisplayOptions.hideOptionalFields') }}
+
+
+
+
+ {{ $t('fieldDisplayOptions.showOptionalFields') }}
+
+
+
+
+ {{ $t('fieldDisplayOptions.showOptionalFieldsWithValue') }}
+
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/FilterFields/index.vue b/src/components/ADempiere/FilterFields/index.vue
index a3391c0cfdc..8df46d8648f 100644
--- a/src/components/ADempiere/FilterFields/index.vue
+++ b/src/components/ADempiere/FilterFields/index.vue
@@ -40,6 +40,15 @@
:value="item.columnName"
/>
+
+
@@ -47,10 +56,20 @@
+
+
+
diff --git a/src/components/ADempiere/Form/VPOS/BusinessPartner/BillingFieldLocation/mixinLocation.js b/src/components/ADempiere/Form/VPOS/BusinessPartner/BillingFieldLocation/mixinLocation.js
new file mode 100644
index 00000000000..0448356fa5c
--- /dev/null
+++ b/src/components/ADempiere/Form/VPOS/BusinessPartner/BillingFieldLocation/mixinLocation.js
@@ -0,0 +1,170 @@
+// ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
+// Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A.
+// Contributor(s): Yamel Senih ysenih@erpya.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
.
+
+// api request methods
+import { getLocationAddress } from '@/api/ADempiere/field/location.js'
+
+// constants
+import FieldsList from './fieldsList.js'
+
+// utils and helpers methods
+import { getSequenceAsList } from '@/utils/ADempiere/location'
+
+export default {
+ name: 'MixinLocationField',
+
+ props: {
+ containerManager: {
+ type: Object,
+ default: () => ({
+ actionPerformed: () => {},
+ changeFieldShowedFromUser: () => {},
+ getFieldsLit: () => {},
+ isDisplayedField: () => { return true },
+ isMandatoryField: () => { return true },
+ isReadOnlyField: () => { return false },
+ setDefaultValues: () => {}
+ })
+ }
+ },
+
+ data() {
+ return {
+ localValues: {},
+ isGettingLocation: false
+ }
+ },
+
+ computed: {
+ countryId() {
+ return this.$store.getters.getValueOfField({
+ containerUuid: 'Add-Location-Address',
+ columnName: 'C_Country_ID'
+ })
+ },
+ currentCountryDefinition() {
+ return this.$store.getters.getStoredCountryFromId({
+ id: this.countryId
+ })
+ },
+ isShowedLocationForm: {
+ get() {
+ return this.$store.getters.getIsShowedLocation
+ },
+ set(value) {
+ this.$store.commit('setShowedLocation', Boolean(value))
+ }
+ }
+ },
+
+ methods: {
+ getLocationAddress,
+ toggleShowedLocationForm() {
+ this.isShowedLocationForm = !this.isShowedLocationForm
+ },
+ /**
+ * Displayed sequence location
+ * @param {object} entityValues
+ */
+ getDisplayedValue(entityValues) {
+ let displayValue = ''
+
+ if (this.isEmptyValue(entityValues)) {
+ return displayValue
+ }
+
+ let displaySequence = this.$store.getters.getDisplaySequence
+ const country = this.currentCountryDefinition
+ if (!this.isEmptyValue(country)) {
+ displaySequence = country.displaySequence
+ }
+ const locationDisplayedSequence = getSequenceAsList(displaySequence)
+
+ const newFieldsList = FieldsList.map(item => {
+ const { sequenceFields } = item.overwriteDefinition
+ if (locationDisplayedSequence.includes(sequenceFields)) {
+ return {
+ ...item,
+ isDisplayed: true,
+ sequenceFields,
+ index: locationDisplayedSequence.indexOf(sequenceFields)
+ }
+ }
+ return {
+ ...item,
+ sequenceFields,
+ isDisplayed: false
+ }
+ }).filter(field => {
+ return field.isDisplayed
+ }).sort((itemA, itemB) => {
+ return itemA.index - itemB.index
+ })
+
+ const addDisplayValue = (value) => {
+ if (this.isEmptyValue(value)) {
+ value = ''
+ }
+ if (!this.isEmptyValue(displayValue)) {
+ displayValue += ', ' + value
+ } else {
+ displayValue = value
+ }
+ }
+
+ // displayed value of Address column names
+ Object.keys(entityValues).forEach(columnName => {
+ if (columnName.includes('Address')) {
+ const currrentValue = entityValues[columnName]
+ addDisplayValue(currrentValue)
+ }
+ })
+
+ newFieldsList.forEach(field => {
+ const { columnName } = field
+ const displayColumnName = `DisplayColumn_${columnName}`
+
+ let currrentValue = ''
+ if (!this.isEmptyValue(entityValues[displayColumnName])) {
+ currrentValue = entityValues[displayColumnName]
+ }
+
+ if (this.isEmptyValue(currrentValue)) {
+ if (columnName === 'C_City_ID') {
+ currrentValue = entityValues['City']
+ }
+ if (columnName === 'C_Region_ID') {
+ currrentValue = entityValues['RegionName']
+ }
+
+ if (this.isEmptyValue(currrentValue)) {
+ currrentValue = this.$store.getters.getValueOfField({
+ containerUuid: 'Add-Location-Address',
+ columnName: displayColumnName
+ })
+ }
+ }
+ if (this.isEmptyValue(currrentValue)) {
+ currrentValue = entityValues[columnName]
+ }
+
+ addDisplayValue(currrentValue)
+ })
+
+ return displayValue
+ }
+ }
+}
diff --git a/src/components/ADempiere/Form/VPOS/BusinessPartner/addAddress.vue b/src/components/ADempiere/Form/VPOS/BusinessPartner/addAddress.vue
index 5c0a9e01238..1e77bcef533 100644
--- a/src/components/ADempiere/Form/VPOS/BusinessPartner/addAddress.vue
+++ b/src/components/ADempiere/Form/VPOS/BusinessPartner/addAddress.vue
@@ -15,6 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see
.
-->
+
@@ -29,6 +30,8 @@
:ref="fieldsList[0].columnName"
:metadata="fieldsList[0]"
:value-model="fieldsList[0].value"
+ :container-uuid="'New-Address'"
+ :container-manager="containerManager"
/>
@@ -69,11 +72,17 @@
diff --git a/src/components/ADempiere/Form/VPOS/BusinessPartner/billingAddressFieldLocation/locationAddressForm.vue b/src/components/ADempiere/Form/VPOS/BusinessPartner/billingAddressFieldLocation/locationAddressForm.vue
index b8102faf0b1..ef6c18b5ce9 100644
--- a/src/components/ADempiere/Form/VPOS/BusinessPartner/billingAddressFieldLocation/locationAddressForm.vue
+++ b/src/components/ADempiere/Form/VPOS/BusinessPartner/billingAddressFieldLocation/locationAddressForm.vue
@@ -15,6 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see
.
-->
+
-
@@ -48,13 +49,20 @@
+
+
diff --git a/src/components/ADempiere/Form/VPOS/BusinessPartner/shippingFieldLocation/mixinLocation.js b/src/components/ADempiere/Form/VPOS/BusinessPartner/shippingFieldLocation/mixinLocation.js
new file mode 100644
index 00000000000..0448356fa5c
--- /dev/null
+++ b/src/components/ADempiere/Form/VPOS/BusinessPartner/shippingFieldLocation/mixinLocation.js
@@ -0,0 +1,170 @@
+// ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
+// Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A.
+// Contributor(s): Yamel Senih ysenih@erpya.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 .
+
+// api request methods
+import { getLocationAddress } from '@/api/ADempiere/field/location.js'
+
+// constants
+import FieldsList from './fieldsList.js'
+
+// utils and helpers methods
+import { getSequenceAsList } from '@/utils/ADempiere/location'
+
+export default {
+ name: 'MixinLocationField',
+
+ props: {
+ containerManager: {
+ type: Object,
+ default: () => ({
+ actionPerformed: () => {},
+ changeFieldShowedFromUser: () => {},
+ getFieldsLit: () => {},
+ isDisplayedField: () => { return true },
+ isMandatoryField: () => { return true },
+ isReadOnlyField: () => { return false },
+ setDefaultValues: () => {}
+ })
+ }
+ },
+
+ data() {
+ return {
+ localValues: {},
+ isGettingLocation: false
+ }
+ },
+
+ computed: {
+ countryId() {
+ return this.$store.getters.getValueOfField({
+ containerUuid: 'Add-Location-Address',
+ columnName: 'C_Country_ID'
+ })
+ },
+ currentCountryDefinition() {
+ return this.$store.getters.getStoredCountryFromId({
+ id: this.countryId
+ })
+ },
+ isShowedLocationForm: {
+ get() {
+ return this.$store.getters.getIsShowedLocation
+ },
+ set(value) {
+ this.$store.commit('setShowedLocation', Boolean(value))
+ }
+ }
+ },
+
+ methods: {
+ getLocationAddress,
+ toggleShowedLocationForm() {
+ this.isShowedLocationForm = !this.isShowedLocationForm
+ },
+ /**
+ * Displayed sequence location
+ * @param {object} entityValues
+ */
+ getDisplayedValue(entityValues) {
+ let displayValue = ''
+
+ if (this.isEmptyValue(entityValues)) {
+ return displayValue
+ }
+
+ let displaySequence = this.$store.getters.getDisplaySequence
+ const country = this.currentCountryDefinition
+ if (!this.isEmptyValue(country)) {
+ displaySequence = country.displaySequence
+ }
+ const locationDisplayedSequence = getSequenceAsList(displaySequence)
+
+ const newFieldsList = FieldsList.map(item => {
+ const { sequenceFields } = item.overwriteDefinition
+ if (locationDisplayedSequence.includes(sequenceFields)) {
+ return {
+ ...item,
+ isDisplayed: true,
+ sequenceFields,
+ index: locationDisplayedSequence.indexOf(sequenceFields)
+ }
+ }
+ return {
+ ...item,
+ sequenceFields,
+ isDisplayed: false
+ }
+ }).filter(field => {
+ return field.isDisplayed
+ }).sort((itemA, itemB) => {
+ return itemA.index - itemB.index
+ })
+
+ const addDisplayValue = (value) => {
+ if (this.isEmptyValue(value)) {
+ value = ''
+ }
+ if (!this.isEmptyValue(displayValue)) {
+ displayValue += ', ' + value
+ } else {
+ displayValue = value
+ }
+ }
+
+ // displayed value of Address column names
+ Object.keys(entityValues).forEach(columnName => {
+ if (columnName.includes('Address')) {
+ const currrentValue = entityValues[columnName]
+ addDisplayValue(currrentValue)
+ }
+ })
+
+ newFieldsList.forEach(field => {
+ const { columnName } = field
+ const displayColumnName = `DisplayColumn_${columnName}`
+
+ let currrentValue = ''
+ if (!this.isEmptyValue(entityValues[displayColumnName])) {
+ currrentValue = entityValues[displayColumnName]
+ }
+
+ if (this.isEmptyValue(currrentValue)) {
+ if (columnName === 'C_City_ID') {
+ currrentValue = entityValues['City']
+ }
+ if (columnName === 'C_Region_ID') {
+ currrentValue = entityValues['RegionName']
+ }
+
+ if (this.isEmptyValue(currrentValue)) {
+ currrentValue = this.$store.getters.getValueOfField({
+ containerUuid: 'Add-Location-Address',
+ columnName: displayColumnName
+ })
+ }
+ }
+ if (this.isEmptyValue(currrentValue)) {
+ currrentValue = entityValues[columnName]
+ }
+
+ addDisplayValue(currrentValue)
+ })
+
+ return displayValue
+ }
+ }
+}
diff --git a/src/components/ADempiere/Form/VPOS/Collection/index.vue b/src/components/ADempiere/Form/VPOS/Collection/index.vue
index 40115e2f86c..9b85860b867 100644
--- a/src/components/ADempiere/Form/VPOS/Collection/index.vue
+++ b/src/components/ADempiere/Form/VPOS/Collection/index.vue
@@ -15,6 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see .
-->
+
@@ -51,6 +52,8 @@
...field,
labelCurrency: isEmptyValue(dayRate.divideRate) ? dayRate : dayRate.currencyTo
} : field"
+ :container-uuid="'Collection'"
+ :container-manager="containerManager"
/>
@@ -93,6 +96,8 @@
>
@@ -103,7 +108,7 @@
-
+
@@ -184,25 +189,35 @@
-
-
diff --git a/src/components/ADempiere/Form/VPOS/Collection/typeCollection.vue b/src/components/ADempiere/Form/VPOS/Collection/typeCollection.vue
index 58f2b7178af..b5f293476de 100644
--- a/src/components/ADempiere/Form/VPOS/Collection/typeCollection.vue
+++ b/src/components/ADempiere/Form/VPOS/Collection/typeCollection.vue
@@ -215,6 +215,9 @@ export default {
}
},
computed: {
+ listRefunds() {
+ return this.currentPointOfSales.currentOrder.listPayments.payments.filter(payments => payments.isRefund)
+ },
typesPayment() {
return this.$store.getters.getListsPaymentTypes
},
diff --git a/src/components/ADempiere/Form/VPOS/Options/AssignSeller/index.vue b/src/components/ADempiere/Form/VPOS/Options/AssignSeller/index.vue
index 664a82ee102..7758d6a0678 100644
--- a/src/components/ADempiere/Form/VPOS/Options/AssignSeller/index.vue
+++ b/src/components/ADempiere/Form/VPOS/Options/AssignSeller/index.vue
@@ -93,6 +93,18 @@ export default {
containerUuid: 'Assign-Seller'
}
}
+ },
+ containerManager: {
+ type: Object,
+ default: () => ({
+ actionPerformed: () => {},
+ changeFieldShowedFromUser: () => {},
+ getFieldsLit: () => {},
+ isDisplayedField: () => { return true },
+ isMandatoryField: () => { return true },
+ isReadOnlyField: () => { return false },
+ setDefaultValues: () => {}
+ })
}
},
data() {
diff --git a/src/components/ADempiere/Form/VPOS/Options/CashOpening/index.vue b/src/components/ADempiere/Form/VPOS/Options/CashOpening/index.vue
index 21a5611ad37..36e2a03dd82 100644
--- a/src/components/ADempiere/Form/VPOS/Options/CashOpening/index.vue
+++ b/src/components/ADempiere/Form/VPOS/Options/CashOpening/index.vue
@@ -15,6 +15,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see .
-->
+
@@ -33,6 +34,8 @@
>
@@ -165,6 +168,8 @@
>
@@ -201,22 +208,31 @@
+
+
diff --git a/src/components/ADempiere/Form/VPOS/OrderList/index.vue b/src/components/ADempiere/Form/VPOS/OrderList/index.vue
index 68cb66b0187..3718f4db49c 100644
--- a/src/components/ADempiere/Form/VPOS/OrderList/index.vue
+++ b/src/components/ADempiere/Form/VPOS/OrderList/index.vue
@@ -34,9 +34,11 @@
-
@@ -113,11 +115,10 @@
-
- {{ scope.row.documentStatus.name }}
-
+
@@ -254,8 +255,19 @@
+
+
diff --git a/src/components/ADempiere/LoadingView/index.vue b/src/components/ADempiere/LoadingView/index.vue
new file mode 100644
index 00000000000..60c9331f427
--- /dev/null
+++ b/src/components/ADempiere/LoadingView/index.vue
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/Pagination/index.vue b/src/components/ADempiere/Pagination/index.vue
index a65cf3b855c..e83097d2b7e 100644
--- a/src/components/ADempiere/Pagination/index.vue
+++ b/src/components/ADempiere/Pagination/index.vue
@@ -37,6 +37,10 @@
+
+
diff --git a/src/components/ADempiere/Tab/index.vue b/src/components/ADempiere/Tab/index.vue
deleted file mode 100644
index 884e24fa3fe..00000000000
--- a/src/components/ADempiere/Tab/index.vue
+++ /dev/null
@@ -1,136 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/components/ADempiere/Tab/tabChildren.vue b/src/components/ADempiere/Tab/tabChildren.vue
deleted file mode 100644
index 23079e716f1..00000000000
--- a/src/components/ADempiere/Tab/tabChildren.vue
+++ /dev/null
@@ -1,155 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/components/ADempiere/Tab/tabMixin.js b/src/components/ADempiere/Tab/tabMixin.js
deleted file mode 100644
index d96ed5e2434..00000000000
--- a/src/components/ADempiere/Tab/tabMixin.js
+++ /dev/null
@@ -1,70 +0,0 @@
-// 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
-// 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
.
-
-export default {
- name: 'MixinTab',
- props: {
- windowUuid: {
- type: String,
- default: ''
- },
- windowMetadata: {
- type: Object,
- default: () => {}
- },
- tabsList: {
- type: Array,
- default: () => []
- },
- record: {
- type: Object,
- default: () => {}
- }
- },
- data() {
- return {
- tabUuid: '',
- panelType: 'window'
- }
- },
- computed: {
- isCreateNew() {
- return Boolean(this.$route.query.action === 'create-new')
- }
- },
- created() {
- this.tabUuid = this.tabsList[0].uuid
- },
- methods: {
- getDataTable() {
- this.$store.dispatch('getDataListTab', {
- parentUuid: this.windowUuid,
- containerUuid: this.tabUuid
- })
- .catch(error => {
- console.warn(`Error getting data list tab. Message: ${error.message}, code ${error.code}.`)
- })
- },
- /**
- * @param {object} tabHTML DOM HTML the tab clicked
- */
- handleClick(tabHTML) {
- if (this.tabUuid !== tabHTML.$attrs.tabuuid) {
- this.tabUuid = tabHTML.$attrs.tabuuid
- }
- }
- }
-}
diff --git a/src/components/ADempiere/TabManager/TabLabel.vue b/src/components/ADempiere/TabManager/TabLabel.vue
new file mode 100644
index 00000000000..49b320af484
--- /dev/null
+++ b/src/components/ADempiere/TabManager/TabLabel.vue
@@ -0,0 +1,148 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/TabManager/index.vue b/src/components/ADempiere/TabManager/index.vue
index 26630f4d60f..ad04ef320d1 100644
--- a/src/components/ADempiere/TabManager/index.vue
+++ b/src/components/ADempiere/TabManager/index.vue
@@ -17,113 +17,199 @@
-->
-
-
+
+
+
+
+
+
-
-
-
+
+
-
-
+
+
-
diff --git a/src/views/ADempiere/BrowserView/index.vue b/src/views/ADempiere/BrowserView/index.vue
deleted file mode 100644
index 62a0cf8cca6..00000000000
--- a/src/views/ADempiere/BrowserView/index.vue
+++ /dev/null
@@ -1,247 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/ADempiere/Form/index.vue b/src/views/ADempiere/Form/index.vue
index b030313b5d9..449345e665b 100644
--- a/src/views/ADempiere/Form/index.vue
+++ b/src/views/ADempiere/Form/index.vue
@@ -26,16 +26,13 @@
v-if="showContextMenu"
style="height: 39px; background: white;"
>
+
+
-
@@ -78,31 +75,30 @@
-
-
-
diff --git a/src/views/ADempiere/ReportViewer/index.vue b/src/views/ADempiere/ReportViewer/index.vue
index 984519b41e5..7a55c363496 100644
--- a/src/views/ADempiere/ReportViewer/index.vue
+++ b/src/views/ADempiere/ReportViewer/index.vue
@@ -18,14 +18,7 @@
-->
-
+
@@ -35,37 +28,15 @@
:name="processMetadata.name"
:help="processMetadata.help"
/>
-
-
-
-
-
-
+
-
diff --git a/src/views/ADempiere/Window/StandardWindow.vue b/src/views/ADempiere/Window/StandardWindow.vue
new file mode 100644
index 00000000000..30fd8d6415d
--- /dev/null
+++ b/src/views/ADempiere/Window/StandardWindow.vue
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/ADempiere/Window/index.vue b/src/views/ADempiere/Window/index.vue
index af96942fae3..f0ed3cb0099 100644
--- a/src/views/ADempiere/Window/index.vue
+++ b/src/views/ADempiere/Window/index.vue
@@ -15,382 +15,301 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see .
-->
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('window.containerInfo.notes') }}
-
-
-
-
-
-
-
- {{ $t('window.containerInfo.changeLog') }}
-
-
-
-
-
-
-
-
-
- {{ $t('window.containerInfo.workflowLog') }}
-
-
-
-
-
-
-
-
- {{ $t('window.containerInfo.attachment') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('window.containerInfo.notes') }}
-
-
-
-
-
-
-
- {{ $t('window.containerInfo.changeLog') }}
-
-
-
-
-
-
-
-
-
- {{ $t('window.containerInfo.workflowLog') }}
-
-
-
-
-
-
-
-
- {{ $t('window.containerInfo.attachment') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
+
-
-
+
diff --git a/src/views/ADempiere/Window/windowLogicComponent.js b/src/views/ADempiere/Window/windowLogicComponent.js
index 649c81bc33d..1b2c4a6e021 100644
--- a/src/views/ADempiere/Window/windowLogicComponent.js
+++ b/src/views/ADempiere/Window/windowLogicComponent.js
@@ -25,7 +25,6 @@ import DataTable from '@/components/ADempiere/DataTable'
import splitPane from 'vue-splitpane'
// Container Info
import ChatEntries from '@/components/ADempiere/ChatEntries'
-import Attachment from '@/components/ADempiere/Attachment/index.vue'
import ListChatEntry from '@/components/ADempiere/ChatEntries/listChatEntry'
import RecordLogs from '@/components/ADempiere/ContainerInfo/recordLogs'
import WorkflowLogs from '@/components/ADempiere/ContainerInfo/workflowLogs'
@@ -53,7 +52,6 @@ export default {
RightPanel,
ChatEntries,
ListChatEntry,
- Attachment,
RecordLogs,
WorkflowLogs,
WorkflowStatusBar,
@@ -339,10 +337,6 @@ export default {
return currentRecord
},
isDocumentTab() {
- if (this.isEmptyValue(this.windowMetadata)) {
- return false
- }
-
const panel = this.isEmptyValue(this.windowMetadata.currentTabUuid) ? '' : this.$store.getters.getPanel(this.windowMetadata.currentTabUuid)
if (!this.isEmptyValue(panel)) {
return panel.isDocument
diff --git a/src/views/ADempiere/Window/windowStyleGlobal.scss b/src/views/ADempiere/Window/windowStyleGlobal.scss
deleted file mode 100644
index f277b0b3ef1..00000000000
--- a/src/views/ADempiere/Window/windowStyleGlobal.scss
+++ /dev/null
@@ -1,81 +0,0 @@
-
-.el-step.is-simple .el-step__icon-inner {
- font-size: 18px;
- padding-top: 30px;
-}
-.el-steps--simple {
- /* padding: 13px 8%; */
- padding-top: 0px;
- padding-bottom: 0px;
- padding-left: 0%;
- padding-right: 0px;
- border-radius: 4px;
- background: #F5F7FA;
- overflow-x: auto;
- overflow-y: hidden;
- width: auto;
-}
-.scroll-window-log-change {
- max-height: 74vh !important;
-}
-.scroll-window-log-workflow {
- max-height: 68vh !important;
-}
-.scroll-window-log-chat {
- max-height: 28vh !important;
-}
-.el-card__header {
- background: rgba(245, 247, 250, 0.75);
- padding: 18px 20px;
- border-bottom: 1px solid #f5f7fa;
- -webkit-box-sizing: border-box;
- box-sizing: border-box;
-}
-.split {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- overflow-y: hidden;
- overflow-x: hidden;
- height: 102%;
- width: 100%;
-}
-.components-container {
- position: relative;
- height: 100vh;
-}
-.left-container {
- background-color: #ffffff;
- height: 100%;
-}
-.right-container {
- background-color: #ffffff;
- height: 200px;
-}
-.top-container {
- background-color: #ffffff;
- width: 100%;
- height: 100%;
-}
-.bottom-container {
- width: 100%;
- background-color: #95E1D3;
- height: 100%;
-}
-.splitter-pane-resizer.vertical {
- width: 11px !important;
- /* width: 9px; */
- height: 100%;
- background: gray !important;
- margin-left: -10px;
- /* margin-left: -5px; */
- border-left: 5px solid hsla(0,0%,100%,0);
- border-right: 5px solid hsla(0,0%,100%,0);
- cursor: col-resize;
-}
-.splitter-pane.vertical.splitter-paneR {
- position: absolute;
- right: 0;
- height: 100%;
- padding-left: 10px;
-}
diff --git a/src/views/ADempiere/Window/windowStyleScoped.scss b/src/views/ADempiere/Window/windowStyleScoped.scss
deleted file mode 100644
index a7751cc0b52..00000000000
--- a/src/views/ADempiere/Window/windowStyleScoped.scss
+++ /dev/null
@@ -1,176 +0,0 @@
-// 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 .
-
-.scroll {
- max-height: 60vh;
-}
-/* Enter and leave animations can use different */
-/* durations and timing functions. */
-.slide-fade-enter-active {
- transition: all .2s ease;
-}
-.slide-fade-leave-active {
- transition: all .3s cubic-bezier(1.0, 0.5, 0.8, 1.0);
-}
-.slide-fade-enter, .slide-fade-leave-to
-/* .slide-fade-leave-active below version 2.1.8 */ {
- transform: translateX(10px);
- opacity: 0;
-}
-.el-tabs__content {
- overflow: hidden;
- position: relative;
- padding-top: 0px !important;
- padding-right: 15px !important;
- padding-bottom: 0px !important;
- padding-left: 15px !important;
-}
-.el-header {
- background-color: #fff;
- color: #333;
- line-height: 21px;
-}
-.el-aside {
- height: 100%;
- color: #333;
- overflow-y: hidden;
- overflow-x: hidden;
-}
-aside {
- background: #fff;
- padding: 0px;
- margin-bottom: 0px;
- border-radius: 2px;
- display: block;
- line-height: 32px;
- font-size: 16px;
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
- color: #2c3e50;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-}
-.el-main {
- display: block;
- -webkit-box-flex: 1;
- flex: 1;
- flex-basis: auto;
- overflow: hidden;
- height: 90vh;
- box-sizing: border-box;
- padding-top: 0px !important;
- padding-right: 0px !important;
- padding-bottom: 0px !important;
- padding-left: 0px !important;
-}
-.center{
- text-align: center;
-}
-.close{
- text-align: right;
-}
-.w-33 {
- width: 100%;
- background-color: transparent;
-}
-.w {
- height: 100%;
-}
-.open-table-detail-mobile {
- position: absolute;
- right: 50%;
- bottom: 4%;
-}
-.open-table-detail {
- position: absolute;
- right: 50%;
- bottom: 4%;
- display: none;
-}
-.open-navegation {
- position: fixed;
- top: 50%;
- display: none;
- z-index: 5;
-}
-.open-datatable-aside {
- position: absolute;
- top: 41%;
- display: none;
- z-index: 5;
- right: 1% !important;
-}
-.open-datatable-aside-mobile {
- position: absolute;
- top: 41%;
- display: grid;
- z-index: 5;
- right: 1% !important;
-}
-.button {
- display: none;
-}
-.wrapper:hover .open-table-detail {
- display: inline-block;
-}
-.w:hover .open-navegation {
- display: inline-block;
-}
-.w:hover .open-datatable-aside {
- display: grid;
-}
-.open-detail {
- width: 100%;
- height: 20px;
- position: absolute;
- bottom: 5%;
-}
-.open-left {
- width: 2%;
- height: 97%;
- position: absolute;
- top: 2%;
- left: 1%;
-}
-.el-button-window {
- cursor: pointer;
- background: #FFFFFF;
- border: 1px solid #DCDFE6;
- border-color: #DCDFE6;
- color: white;
- background: #008fd3;
-}
-.close-info {
- float: left;
- padding-top: 50%;
-}
-.close-info-mobile {
- top: 29%;
- position: absolute;
-}
-.vertical-panes {
- width: 100%;
- height: 85vh;
- border: 1px solid #ccc;
-}
-.vertical-panes > .pane {
- text-align: left;
- padding: 15px;
- overflow: hidden;
- background: #fff;
-}
-.vertical-panes > .pane ~ .pane {
- border-left: 1px solid #ccc;
-}
diff --git a/src/views/ADempiere/WindowView/index.vue b/src/views/ADempiere/WindowView/index.vue
deleted file mode 100644
index a78772acd10..00000000000
--- a/src/views/ADempiere/WindowView/index.vue
+++ /dev/null
@@ -1,142 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/ADempiere/WindowView/windowUtils.js b/src/views/ADempiere/WindowView/windowUtils.js
deleted file mode 100644
index 8a1823842cb..00000000000
--- a/src/views/ADempiere/WindowView/windowUtils.js
+++ /dev/null
@@ -1,81 +0,0 @@
-
-import { convertWindow } from '@/utils/ADempiere/apiConverts/dictionary.js'
-
-export function generateWindow(windowResponse) {
- const responseWindow = convertWindow(windowResponse)
-
- const {
- tabsList, tabsListParent,
- firstTab, firstTabUuid
- } = generateTabs({
- tabs: responseWindow.tabs,
- windowUuid: responseWindow.uuid
- })
-
- const newWindow = {
- ...responseWindow,
- tabsList,
- currentTab: tabsListParent[0],
- tabsListParent,
- // app attributes
- currentTabUuid: tabsListParent[0].uuid,
- firstTab,
- firstTabUuid,
- // App properties
- isShowedTabsChildren: false,
- isShowedRecordNavigation: undefined,
- isShowedAdvancedQuery: false
- }
-
- return newWindow
-}
-
-export function generateTabs({
- tabs,
- windowUuid
-}) {
- const firstTabTableName = tabs[0].tableName
- const firstTabUuid = tabs[0].uuid
- const tabsListParent = []
-
- // indexes related to visualization
- let tabParentIndex = 0
-
- const tabsList = tabs.filter((itemTab) => {
- return !(
- itemTab.isTranslationTab || itemTab.isSortTab ||
- itemTab.isAdvancedTab || itemTab.isHasTree
- )
- }).map((tabItem, index) => {
- // let tab = tabItem
- const tab = {
- ...tabItem,
- containerUuid: tabItem.uuid,
- parentUuid: windowUuid,
- windowUuid,
- tabGroup: tabItem.fieldGroup,
- firstTabUuid,
- // relations
- isParentTab: Boolean(firstTabTableName === tabItem.tableName),
- // app properties
- isShowedRecordNavigation: !(tabItem.isSingleRow),
- isLoadFieldsList: false,
- index // this index is not related to the index in which the tabs are displayed
- }
-
- if (tab.isParentTab) {
- tab.tabParentIndex = tabParentIndex
- tabParentIndex++
- tabsListParent.push(tab)
- return tab
- }
- return tab
- })
-
- return {
- firstTabUuid,
- firstTab: tabsList[0],
- tabsListParent,
- tabsList
- }
-}
diff --git a/src/views/dashboard/admin/index.vue b/src/views/dashboard/admin/index.vue
index 6e256df7d69..d85fa87a0aa 100644
--- a/src/views/dashboard/admin/index.vue
+++ b/src/views/dashboard/admin/index.vue
@@ -36,7 +36,11 @@ export default {
},
computed: {
listDashboard() {
+ if (this.isEmptyValue(this.maindashboard)) {
+ return []
+ }
const list = this.$store.getters.getDashboard
+
return list.filter(dashboard => this.maindashboard.id !== dashboard.id)
},
currentRole() {
diff --git a/src/views/documentation/RepositoryDocumentation.vue b/src/views/documentation/RepositoryDocumentation.vue
index 7b4a7721b27..7638694538f 100644
--- a/src/views/documentation/RepositoryDocumentation.vue
+++ b/src/views/documentation/RepositoryDocumentation.vue
@@ -32,7 +32,10 @@
v-model="repositoryData.clone"
:disabled="true"
/>
-
+
@@ -41,7 +44,10 @@
v-model="repositoryData.sshUrl"
:disabled="true"
/>
-
+
@@ -138,6 +144,7 @@ import { defineComponent, computed, ref } from '@vue/composition-api'
import { config } from '@/utils/ADempiere/config'
import RepositoryTags from './RepositoryTags'
import { fetchReleasesList, fetchReadme } from '@/api/documentation/documentation'
+import { copyToClipboard } from '@/utils/ADempiere/coreUtils'
export default defineComponent({
name: 'Repository-Documentation',
@@ -167,33 +174,6 @@ export default defineComponent({
return releasesList.value.length - 1
})
- // fallback Copy Text To Clip board
- const fallbackCopyTextToClipboard = (text) => {
- const textArea = document.createElement('textarea')
- textArea.value = text
- document.body.appendChild(textArea)
- textArea.focus()
- textArea.select()
- try {
- if (document.execCommand('copy')) {
- clipboardMessage(root.$t('notifications.copySuccessful'))
- }
- } catch (err) {
- clipboardMessage(root.$t('notifications.copyUnsuccessful'))
- }
- document.body.removeChild(textArea)
- }
-
- // Notification Message when Copying TextNotification Message when Copying Text
- const clipboardMessage = (message) => {
- root.$message({
- message,
- type: 'success',
- showClose: true,
- duration: 1500
- })
- }
-
// Repository
fetchReadme({
repository: props.repository
@@ -263,7 +243,7 @@ export default defineComponent({
// computed
stopper,
// methods
- fallbackCopyTextToClipboard
+ copyToClipboard
}
}
})
diff --git a/src/views/login/loginMixin.js b/src/views/login/loginMixin.js
index 535674ad019..c28eb250509 100644
--- a/src/views/login/loginMixin.js
+++ b/src/views/login/loginMixin.js
@@ -17,6 +17,7 @@ export default {
})
},
pathRedirect(path = 'login') {
+ console.log({ path })
this.$router.push({
path
}).catch(error => {