diff --git a/src/components/ADempiere/Panel/index.vue b/src/components/ADempiere/Panel/index.vue index 2647b048..2b1d5605 100644 --- a/src/components/ADempiere/Panel/index.vue +++ b/src/components/ADempiere/Panel/index.vue @@ -618,7 +618,8 @@ export default { if (!this.isEmptyValue(this.$route.params.recordId)) { this.$store.dispatch('listDocumentStatus', { recordUuid: this.$route.query.action, - recordId: this.$route.params.recordId + recordId: this.$route.params.recordId, + tableName: this.$route.params.tableName }) } if (actionValue === 'create-new' || this.isEmptyValue(actionValue)) { @@ -678,11 +679,9 @@ export default { async setFocus() { return new Promise(resolve => { const fieldFocus = this.getterFieldList.find(itemField => { - if (itemField.componentPath !== 'FieldSelect' && itemField.isDisplayed) { - if (this.$refs.hasOwnProperty(itemField.columnName)) { - if (fieldIsDisplayed(itemField) && !itemField.isReadOnly && itemField.isUpdateable) { - return true - } + if (this.$refs.hasOwnProperty(itemField.columnName)) { + if (fieldIsDisplayed(itemField) && !itemField.isReadOnly && itemField.isUpdateable) { + return true } } }) diff --git a/src/components/ADempiere/Tab/index.vue b/src/components/ADempiere/Tab/index.vue index 77894c15..92002acf 100644 --- a/src/components/ADempiere/Tab/index.vue +++ b/src/components/ADempiere/Tab/index.vue @@ -55,11 +55,12 @@ export default { } }, watch: { - // TODO: Remove watchers of action, and pased as props from window - '$route.query.action'(actionValue) { + '$route.query.tabParent'(actionValue) { if (this.isEmptyValue(actionValue) || actionValue === 'create-new') { this.currentTab = '0' + return } + this.currentTab = actionValue }, currentTab(newValue, oldValue) { if (newValue !== oldValue) { diff --git a/src/components/ADempiere/Tab/tabChildren.vue b/src/components/ADempiere/Tab/tabChildren.vue index b392e6ae..eeba29d5 100644 --- a/src/components/ADempiere/Tab/tabChildren.vue +++ b/src/components/ADempiere/Tab/tabChildren.vue @@ -60,6 +60,13 @@ export default { } }, watch: { + '$route.query.tabChild'(actionValue) { + if (this.isEmptyValue(actionValue) || actionValue === 'create-new') { + this.currentTabChild = '0' + return + } + this.currentTabChild = actionValue + }, // Current TabChildren currentTabChild(newValue, oldValue) { if (newValue !== oldValue) { diff --git a/src/components/ADempiere/WorkflowStatusBar/index.vue b/src/components/ADempiere/WorkflowStatusBar/index.vue index 1f71fe7d..10adff75 100644 --- a/src/components/ADempiere/WorkflowStatusBar/index.vue +++ b/src/components/ADempiere/WorkflowStatusBar/index.vue @@ -83,12 +83,16 @@ export default { return this.$store.getters.getPanel(this.containerUuid) }, getValueStatus() { - if (!this.isEmptyValue(this.getterPanel)) { - var status = this.getterPanel.fieldList.find(field => { + const panel = this.getterPanel + var status + if (!this.isEmptyValue(panel)) { + status = panel.fieldList.find(field => { if (field.columnName === 'DocStatus') { return field } }) + } + if (!this.isEmptyValue(status)) { return status.value } return 'CL' diff --git a/src/store/modules/ADempiere/contextMenu.js b/src/store/modules/ADempiere/contextMenu.js index 62aae0b6..66f4cb34 100644 --- a/src/store/modules/ADempiere/contextMenu.js +++ b/src/store/modules/ADempiere/contextMenu.js @@ -85,7 +85,7 @@ const contextMenu = { }) }, listDocumentStatus({ commit }, { - tableName = 'C_Order', + tableName, recordId, recordUuid, documentAction,