Skip to content

Commit

Permalink
perf: Improve source code. (adempiere#675)
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwinBetanc0urt authored Dec 30, 2022
1 parent 89c7911 commit 427e374
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 23 deletions.
4 changes: 2 additions & 2 deletions src/store/modules/ADempiere/form/VHRActionNotice.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,11 @@ export default {
})
.then(response => {
const { attributes } = response
const alo = {
const row = {
...convertValuesToSend(attributes),
referenceUuid: attributes[1].value
}
commit('setConceptDefinition', alo)
commit('setConceptDefinition', row)
})
.catch(error => {
console.warn(`Error conceptDefinition: ${error.message}. Code: ${error.code}.`)
Expand Down
2 changes: 1 addition & 1 deletion src/themes/default
Submodule default updated 28 files
+11 −6 components/ADempiere/ContainerOptions/FullScreenContainer/useFullScreenContainer.js
+120 −0 components/ADempiere/ContainerOptions/ProgressPercentage.vue
+30 −6 components/ADempiere/DataTable/Components/CellDisplayInfo.vue
+74 −11 components/ADempiere/DataTable/Components/CustomPagination.vue
+41 −96 components/ADempiere/DataTable/Windows/index.vue
+34 −7 components/ADempiere/FieldDefinition/FieldText.vue
+8 −4 components/ADempiere/FieldDefinition/index.vue
+101 −128 components/ADempiere/FilterFields/index.vue
+4 −0 components/ADempiere/Form/VPOS/Options/index.vue
+2 −2 components/ADempiere/Form/VPOS/Order/index.vue
+5 −4 components/ADempiere/Form/VPOS/ProductInfo/index.vue
+1 −0 components/ADempiere/Form/VPOS/index.vue
+331 −0 components/ADempiere/Form/VPayPrint/index.vue
+166 −20 components/ADempiere/Form/WorkflowActivity/index.vue
+4 −0 components/ADempiere/Form/index.vue
+24 −16 components/ADempiere/PanelDefinition/StandardPanel.vue
+5 −0 components/ADempiere/PanelDefinition/index.vue
+7 −15 components/ADempiere/PanelInfo/Component/AttachmentManager/index.vue
+72 −33 components/ADempiere/PanelInfo/Component/AttachmentManager/uploadResource.vue
+21 −62 components/ADempiere/PanelInfo/index.vue
+28 −98 components/ADempiere/TabManager/TabOptions.vue
+115 −21 components/ADempiere/TabManager/TabPanel.vue
+21 −9 components/ADempiere/TabManager/convenienceButtons.vue
+110 −60 components/ADempiere/TabManager/index.vue
+2 −2 components/ADempiere/TabManager/tabChild.vue
+5 −1 components/ADempiere/WorkflowDiagram/index.vue
+1 −0 components/ADempiere/searchRecordField/index.vue
+1 −0 components/ADempiere/searchRecordField/panelSearchCriteria.vue
56 changes: 36 additions & 20 deletions src/views/ADempiere/childIncome/index.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
<!--
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 elsiosanches@gmail.com https://github.com/elsiosanchez
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 <https:www.gnu.org/licenses/>.
-->

<template>
<el-container
key="child-income-loaded"
Expand Down Expand Up @@ -83,36 +101,41 @@

<script>
import { defineComponent, ref, computed } from '@vue/composition-api'

import store from '@/store'

// componets and mixins
import TitleAndHelp from '@theme/components/ADempiere/TitleAndHelp'
import FieldDefinition from '@theme/components/ADempiere/FieldDefinition/index.vue'
import heardList from './headerTable'

// Constants
import fieldsList from './fieldsList'
// utils and helper methods
import heardList from './headerTable'
import { ROW_ATTRIBUTES } from '@/utils/ADempiere/tableUtils'

// Utils and Helper Methods
import {
requestCreateResource,
requestUpdateResource,
requestDeleteResource,
requestListResource
} from '@/api/ADempiere/form/timeControl.js'
import { createFieldFromDictionary } from '@/utils/ADempiere/lookupFactory'
import { ROW_ATTRIBUTES } from '@/utils/ADempiere/tableUtils'
import { showMessage } from '@/utils/ADempiere/notification'
import { containerManager as containerManagerForm } from '@/utils/ADempiere/dictionary/form/index.js'
import { isEmptyValue } from '../../../utils/ADempiere'
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
import { translateDateByLong } from '@/utils/ADempiere/formatValue/dateFormat.js'
// import { containerManager as containerManagerWindow } from '@/utils/ADempiere/dictionary/window'

export default defineComponent({
name: 'ChildIncome',

components: {
TitleAndHelp,
FieldDefinition
},
setup(props, { root }) {
// Ref

setup() {
// Ref
const area = ref('')
const name = ref('')
const description = ref('')
Expand All @@ -122,20 +145,13 @@ export default defineComponent({
const metadataList = ref([])

// computed
const isValidateAdd = computed(() => {
if (isEmptyValue(recurringType.value) || isEmptyValue(name.value)) {
return true
}
return false
})

const alo = store.getters.getValuesView({
containerUuid: 'ChildIncome',
format: 'array'
})
console.log({ alo })
const recurringType = computed(() => {
return store.getters.getValueOfField({
containerUuid: 'ChildIncome',
Expand Down Expand Up @@ -266,16 +282,16 @@ export default defineComponent({
requestListResource()
.then(response => {
const { records } = response
const alo = records.map(a => {
const recordsList = records.map(row => {
return {
...a,
resourceNameType: a.resource.name,
dateFrom: translateDateByLong(a.assign_date_from),
dateTo: translateDateByLong(a.assign_date_to),
...row,
resourceNameType: row.resource.name,
dateFrom: translateDateByLong(row.assign_date_from),
dateTo: translateDateByLong(row.assign_date_to),
...ROW_ATTRIBUTES
}
})
tableData.value = alo
tableData.value = recordsList
}).catch(error => {
showMessage({
message: error,
Expand Down

0 comments on commit 427e374

Please sign in to comment.