Skip to content

Commit

Permalink
Fix: Support Default Value WIndows and Update Record (adempiere#1525)
Browse files Browse the repository at this point in the history
  • Loading branch information
elsiosanchez authored Oct 13, 2023
1 parent febb77a commit 5d70195
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/api/ADempiere/field/binary.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function updateResource({
tableName,
binaryFile
}) {
const { updateEntity } = require('@/api/ADempiere/common/persistence.js')
const { updateEntity } = require('@/api/ADempiere/userInterface/entities.ts')

return updateEntity({
recordUuid: uuid,
Expand Down
2 changes: 1 addition & 1 deletion src/api/ADempiere/field/location.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function updateLocationAddress({
uuid,
attributesList
}) {
const { updateEntity } = require('@/api/ADempiere/common/persistence.js')
const { updateEntity } = require('@/api/ADempiere/userInterface/entities.ts')

return updateEntity({
tableName,
Expand Down
20 changes: 10 additions & 10 deletions src/components/ADempiere/ContainerOptions/LockRecord/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,16 @@ export default defineComponent({
isGettingRecordAccess.value = true

// get from server
store.dispatch('getPrivateAccessFromServer', {
tableName,
recordUuid: recordUuid.value
})
.then(privateAccessResponse => {
isLocked.value = privateAccessResponse
})
.finally(() => {
isGettingRecordAccess.value = false
})
// store.dispatch('getPrivateAccessFromServer', {
// tableName,
// recordUuid: recordUuid.value
// })
// .then(privateAccessResponse => {
// isLocked.value = privateAccessResponse
// })
// .finally(() => {
// isGettingRecordAccess.value = false
// })
}

// timer to execute the request between times
Expand Down
18 changes: 9 additions & 9 deletions src/store/modules/ADempiere/defaultValueManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,16 @@ const defaultValueManager = {

let key = clientId
// TODO: generate with your fieldUuid, processParameterUuid, browseFieldUuid
if (!isEmptyValue(uuid)) {
key += `|${uuid}`
}
// if (!isEmptyValue(fieldUuid)) {
// key += `|${fieldUuid}`
// } else if (!isEmptyValue(processParameterUuid)) {
// key += `|${processParameterUuid}`
// } else if (!isEmptyValue(browseFieldUuid)) {
// key += `|${browseFieldUuid}`
// if (!isEmptyValue(uuid)) {
// key += `|${uuid}`
// }
if (!isEmptyValue(fieldUuid)) {
key += `|${fieldUuid}`
} else if (!isEmptyValue(processParameterUuid)) {
key += `|${processParameterUuid}`
} else if (!isEmptyValue(browseFieldUuid)) {
key += `|${browseFieldUuid}`
}

const contextKey = generateContextKey(contextAttributesList)
key += contextKey
Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/ADempiere/languageManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import Vue from 'vue'

import { updateEntity } from '@/api/ADempiere/common/persistence.js'
import { updateEntity } from '@/api/ADempiere/userInterface/entities.ts'
import { requestTranslations } from '@/api/ADempiere/actions/translation.js'

import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
Expand Down
5 changes: 1 addition & 4 deletions src/store/modules/ADempiere/windowManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ import router from '@/router'

// API Request Methods
import {
// requestGetEntities,
updateEntity
} from '@/api/ADempiere/user-interface/persistence.js'
import {
updateEntity,
deleteEntity,
requestGetEntities
} from '@/api/ADempiere/userInterface/entities.ts'
Expand Down
1 change: 1 addition & 0 deletions src/utils/ADempiere/dictionary/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ export const containerManager = {
containerUuid,
contextColumnNames,
browseFieldId: id,
browseFieldUuid: uuid,
uuid,
// id,
//
Expand Down
1 change: 1 addition & 0 deletions src/utils/ADempiere/dictionary/process.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ export const containerManager = {
containerUuid,
contextColumnNames,
processParameterId: id,
processParameterUuid: uuid,
//
columnName,
value
Expand Down

0 comments on commit 5d70195

Please sign in to comment.