From b5ffa871414c84c770cd0c16b67dd0bf7caa9969 Mon Sep 17 00:00:00 2001 From: Elsio Sanchez <45974454+elsiosanchez@users.noreply.github.com> Date: Wed, 11 Nov 2020 17:49:05 -0400 Subject: [PATCH] add document status bar (#539) * add document status bar * remove console Co-authored-by: elsiosanchez --- src/api/ADempiere/window.js | 4 +-- .../ADempiere/ContainerInfo/workflowLogs.vue | 28 ++++--------------- src/store/modules/ADempiere/containerInfo.js | 2 +- src/views/ADempiere/Window/index.vue | 16 ++++++++--- 4 files changed, 19 insertions(+), 31 deletions(-) diff --git a/src/api/ADempiere/window.js b/src/api/ADempiere/window.js index ea0fc439..5417eade 100644 --- a/src/api/ADempiere/window.js +++ b/src/api/ADempiere/window.js @@ -226,17 +226,15 @@ export function requestListDocumentStatuses({ recordId, recordUuid, documentStatus, - documentAction, pageSize, pageToken }) { return requestRest({ - url: '/workflow/list-document-actions', + url: '/workflow/list-document-statuses', data: { id: recordId, uuid: recordUuid, table_name: tableName, - document_action: documentAction, document_status: documentStatus }, params: { diff --git a/src/components/ADempiere/ContainerInfo/workflowLogs.vue b/src/components/ADempiere/ContainerInfo/workflowLogs.vue index 95f00930..18a25163 100644 --- a/src/components/ADempiere/ContainerInfo/workflowLogs.vue +++ b/src/components/ADempiere/ContainerInfo/workflowLogs.vue @@ -8,22 +8,20 @@
- {{ workflow.workflowName }} + {{ workflow.name }}
@@ -34,26 +32,10 @@ >

{{ $t('login.userName') }}: - {{ nodeList.userName }} -

-

- {{ $t('window.containerInfo.logWorkflow.message') }}: - {{ nodeList.textMessage }} -

-

- {{ $t('window.containerInfo.logWorkflow.responsible') }}: - {{ nodeList.responsibleName }} -

-

- {{ $t('window.containerInfo.logWorkflow.workflowName') }}: - {{ nodeList.workflowStateName }} -

-

- {{ $t('window.containerInfo.logWorkflow.timeElapsed') }}: - {{ nodeList.timeElapsed }} + {{ nodeList.name }}

- {{ nodeList.nodeName }} + {{ nodeList.name }}
@@ -76,7 +58,7 @@ export default { mixins: [MixinInfo], computed: { gettersListWorkflow() { - return this.$store.getters.getWorkflow + return this.$store.getters.getNodeWorkflow }, getIsWorkflowLog() { if (this.isEmptyValue(this.gettersListWorkflow)) { diff --git a/src/store/modules/ADempiere/containerInfo.js b/src/store/modules/ADempiere/containerInfo.js index 7146ac4f..bb21bacc 100644 --- a/src/store/modules/ADempiere/containerInfo.js +++ b/src/store/modules/ADempiere/containerInfo.js @@ -90,7 +90,7 @@ const containerInfo = { pageToken }) .then(responseWorkFlowList => { - commit('addListWorkflows', responseWorkFlowList) + commit('addListWorkflows', responseWorkFlowList.workflowsList) return responseWorkFlowList }) .catch(error => { diff --git a/src/views/ADempiere/Window/index.vue b/src/views/ADempiere/Window/index.vue index 87a6ec39..cf191329 100644 --- a/src/views/ADempiere/Window/index.vue +++ b/src/views/ADempiere/Window/index.vue @@ -264,7 +264,6 @@ @@ -272,7 +271,6 @@ {{ $t('window.containerInfo.workflowLog') }}
@@ -520,7 +518,7 @@ export default { return true }, getIsWorkflowLog() { - if (this.isEmptyValue(this.$store.getters.getWorkflow)) { + if (this.isEmptyValue(this.$store.getters.getNodeWorkflow)) { return false } return true @@ -564,9 +562,13 @@ export default { } return currentRecord }, + isDocument() { + const panel = this.$store.getters.getPanel(this.windowMetadata.currentTabUuid) + return panel.isDocument + }, isWorkflowBarStatus() { const panel = this.$store.getters.getPanel(this.windowMetadata.currentTabUuid) - if (!this.isEmptyValue(panel) && panel.isDocument && this.$route.query.action !== 'create-new') { + if (!this.isEmptyValue(panel) && this.isDocument && this.$route.query.action !== 'create-new') { return true } return false @@ -712,6 +714,12 @@ export default { this.handleChangeShowedRecordNavigation(isShowRecords) } this.isLoaded = true + const record = this.currentRecord + this.$store.dispatch('listDocumentStatus', { + tableName: this.getTableName, + recordUuid: this.$route.query.action, + recordId: record[this.getTableName + '_ID'] + }) }, handleChangeShowedRecordNavigation(valueToChange) { this.$store.dispatch('changeWindowAttribute', {