From 8b53babb212c001869b4fd3ea13a98bf489a0891 Mon Sep 17 00:00:00 2001 From: EdwinBetanc0urt Date: Wed, 11 Dec 2019 16:33:29 -0400 Subject: [PATCH] feat: Add support to sequence tab. (#186) * feat: Add support to sequence tab. * Add name to list sequence tab. * Add multiple tab sequence as process in tab. * Add identifier fields from source tab to sequence tab. * Add multiple requests to get all records according to the pagination. * Corrects the display of records in the first load. * Correct multiple petition if parent record has not changed. * Refresh the list of records on the source tab. * Fix moved sequence and names to showed. * fix identifiers list and actions. * remove the displayed sequence. --- package.json | 4 +- .../ADempiere/ContextMenu/contextMenuMixin.js | 32 +- .../ADempiere/ContextMenu/index.vue | 5 - src/components/ADempiere/DataTable/index.vue | 23 +- src/components/ADempiere/Dialog/index.vue | 80 ++++- src/components/ADempiere/Panel/index.vue | 2 +- .../ADempiere/SequenceOrder/index.vue | 299 ++++++++++++++++++ src/components/ADempiere/Tab/index.vue | 19 +- src/components/ADempiere/Tab/tabChildren.vue | 42 ++- src/components/ADempiere/Tab/tabMixin.js | 23 +- src/lang/ADempiere/en.js | 5 + src/lang/ADempiere/es.js | 5 + src/store/modules/ADempiere/data.js | 141 ++++++--- src/store/modules/ADempiere/panel.js | 38 ++- src/store/modules/ADempiere/processControl.js | 28 +- src/store/modules/ADempiere/window.js | 108 +++++-- src/store/modules/ADempiere/windowControl.js | 169 +++++++++- src/utils/ADempiere/dictionaryUtils.js | 16 +- src/views/ADempiere/Browser/index.vue | 2 +- src/views/ADempiere/Process/index.vue | 2 +- src/views/ADempiere/Window/index.vue | 6 +- 21 files changed, 854 insertions(+), 195 deletions(-) create mode 100644 src/components/ADempiere/SequenceOrder/index.vue diff --git a/package.json b/package.json index badf8368..043f42f3 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "path-to-regexp": "2.4.0", "screenfull": "4.2.0", "showdown": "1.9.0", - "sortablejs": "1.8.4", + "sortablejs": "1.10.1", "tui-editor": "1.3.3", "vue": "2.6.10", "vue-count-to": "1.0.13", @@ -77,7 +77,7 @@ "vue-router": "3.0.4", "vue-split-panel": "^1.0.4", "vue-splitpane": "1.0.4", - "vuedraggable": "^2.20.0", + "vuedraggable": "^2.23.2", "vuex": "3.1.0", "xlsx": "0.14.1" }, diff --git a/src/components/ADempiere/ContextMenu/contextMenuMixin.js b/src/components/ADempiere/ContextMenu/contextMenuMixin.js index c2c5859e..1f787dbf 100644 --- a/src/components/ADempiere/ContextMenu/contextMenuMixin.js +++ b/src/components/ADempiere/ContextMenu/contextMenuMixin.js @@ -39,10 +39,6 @@ export const contextMixin = { type: String, default: undefined }, - modalMetadata: { - type: Object, - default: () => {} - }, // used only window isInsertRecord: { type: Boolean, @@ -322,25 +318,10 @@ export const contextMixin = { showModal(action) { // TODO: Refactor and remove redundant dispatchs if (action.type === 'process') { - var processData = this.$store.getters.getProcess(action.uuid) - if (processData === undefined) { - this.$store.dispatch('getProcessFromServer', { - containerUuid: action.uuid, - routeToDelete: this.$route - }) - .then(response => { - this.$store.dispatch('setShowDialog', { - type: action.type, - action: response - }) - }).catch(error => { - console.warn('ContextMenu: Dictionary Process (State) - Error ' + error.code + ': ' + error.message) - }) - } else { - this.$store.dispatch('setShowDialog', { type: action.type, action: processData }) - } - } else { - this.$store.dispatch('setShowDialog', { type: action.type, action: this.modalMetadata }) + this.$store.dispatch('setShowDialog', { + type: action.type, + action: action + }) } }, runAction(action) { @@ -360,7 +341,10 @@ export const contextMixin = { } } if (this.panelType === 'process') { - this.$store.dispatch('setTempShareLink', { processId: this.$route.params.processId, href: window.location.href }) + this.$store.dispatch('setTempShareLink', { + processId: this.$route.params.processId, + href: window.location.href + }) } this.$store.dispatch(action.action, { action: action, diff --git a/src/components/ADempiere/ContextMenu/index.vue b/src/components/ADempiere/ContextMenu/index.vue index 7e8bce09..d762b3b5 100644 --- a/src/components/ADempiere/ContextMenu/index.vue +++ b/src/components/ADempiere/ContextMenu/index.vue @@ -8,7 +8,6 @@ :is-report="isReport" :last-parameter="lastParameter" :report-format="reportFormat" - :modal-metadata="modalMetadata" :is-insert-record="isInsertRecord" /> @@ -47,10 +46,6 @@ export default { type: String, default: undefined }, - modalMetadata: { - type: Object, - default: () => {} - }, // used only window isInsertRecord: { type: Boolean, diff --git a/src/components/ADempiere/DataTable/index.vue b/src/components/ADempiere/DataTable/index.vue index 0204c9f0..71561e1d 100644 --- a/src/components/ADempiere/DataTable/index.vue +++ b/src/components/ADempiere/DataTable/index.vue @@ -35,6 +35,17 @@ > {{ $t('window.newRecord') }} + { this.isLoadPanelFromServer = true }).catch(error => { diff --git a/src/components/ADempiere/Dialog/index.vue b/src/components/ADempiere/Dialog/index.vue index 476d93a8..342c2562 100644 --- a/src/components/ADempiere/Dialog/index.vue +++ b/src/components/ADempiere/Dialog/index.vue @@ -2,26 +2,44 @@ - {{ modalMetadata.description }} -
+ + - + {{ $t('components.dialogCancelButton') }} - + {{ $t('components.dialogConfirmButton') }} @@ -30,12 +48,14 @@ + + diff --git a/src/components/ADempiere/Panel/index.vue b/src/components/ADempiere/Panel/index.vue index 9540380b..5f8e29ae 100644 --- a/src/components/ADempiere/Panel/index.vue +++ b/src/components/ADempiere/Panel/index.vue @@ -333,7 +333,7 @@ export default { this.$store.dispatch('getPanelAndFields', { parentUuid: this.parentUuid, containerUuid: this.containerUuid, - type: this.panelType, + panelType: this.panelType, isAdvancedQuery: this.isAdvancedQuery }).then(() => { this.generatePanel(this.getterFieldList) diff --git a/src/components/ADempiere/SequenceOrder/index.vue b/src/components/ADempiere/SequenceOrder/index.vue new file mode 100644 index 00000000..97bca44c --- /dev/null +++ b/src/components/ADempiere/SequenceOrder/index.vue @@ -0,0 +1,299 @@ + + + + + + diff --git a/src/components/ADempiere/Tab/index.vue b/src/components/ADempiere/Tab/index.vue index 1ec1e7fa..cf91b91a 100644 --- a/src/components/ADempiere/Tab/index.vue +++ b/src/components/ADempiere/Tab/index.vue @@ -1,24 +1,23 @@