From fab480816b90b624c64d297f7350a2a0f8d3b6a1 Mon Sep 17 00:00:00 2001 From: elsiosanchez <45974454+elsiosanchez@users.noreply.github.com> Date: Wed, 11 Mar 2020 21:23:05 -0400 Subject: [PATCH] unnecessary requests (#383) * unnecessary requests * validate isDocument * validate when new registration --- src/components/ADempiere/Panel/index.vue | 7 +++---- src/components/ADempiere/WorkflowStatusBar/index.vue | 2 +- src/views/ADempiere/Window/index.vue | 9 +++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/ADempiere/Panel/index.vue b/src/components/ADempiere/Panel/index.vue index 6c8d6e99..1c14b95f 100644 --- a/src/components/ADempiere/Panel/index.vue +++ b/src/components/ADempiere/Panel/index.vue @@ -315,7 +315,6 @@ export default { }, created() { // get fields with uuid - this.$store.dispatch('listWorkflows', this.metadata.tableName) this.getPanel() }, methods: { @@ -615,11 +614,11 @@ export default { return groupsList }, setTagsViewTitle(actionValue) { - if (!this.isEmptyValue(this.$route.params.recordId) && this.getterPanel.isDocument) { + if (this.getterPanel.isDocument && this.getterDataStore.isLoaded) { + this.$store.dispatch('listWorkflows', this.metadata.tableName) this.$store.dispatch('listDocumentStatus', { recordUuid: this.$route.query.action, - recordId: this.$route.params.recordId, - tableName: this.$route.params.tableName + tableName: this.metadata.tableName }) } if (actionValue === 'create-new' || this.isEmptyValue(actionValue)) { diff --git a/src/components/ADempiere/WorkflowStatusBar/index.vue b/src/components/ADempiere/WorkflowStatusBar/index.vue index 10adff75..a43f7ec0 100644 --- a/src/components/ADempiere/WorkflowStatusBar/index.vue +++ b/src/components/ADempiere/WorkflowStatusBar/index.vue @@ -1,5 +1,5 @@