Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
Change ID to UUID (#2550)
Browse files Browse the repository at this point in the history
  • Loading branch information
elsiosanchez authored Aug 1, 2024
1 parent b6b48d2 commit 9ba1ccb
Showing 1 changed file with 14 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import { defineComponent, ref } from '@vue/composition-api'

import lang from '@/lang'
import store from '@/store'
import router from '@/router'

// Constants
// import { config } from '@/utils/ADempiere/config'
Expand Down Expand Up @@ -121,14 +120,11 @@ export default defineComponent({
}

function resourceReference(file) {
const clientId = store.getters.getSessionContextClientId
const { action_id, type } = router.app._route.meta
const { client } = store.getters['user/getRole']
return new Promise((resolve, reject) => {
const url = presignedUrl({
clientId: clientId,
containerId: action_id,
containerType: type,
// fileName: file.name,
clientId: client.uuid,
containerType: 'attachment',
file
})
resolve(url)
Expand All @@ -142,8 +138,7 @@ export default defineComponent({
return new Promise((resolve, reject) => {
requestPresignedUrl({
clientId,
containerId,
containerType,
containerType: 'attachment',
fileName: file.name,
recordId: props.recordId,
tableName: props.tableName
Expand Down Expand Up @@ -176,13 +171,11 @@ export default defineComponent({
method: 'PUT',
body: file
}).then(() => {
const { action_id, type } = router.app._route.meta
const { client } = store.getters['user/getRole']
if (!props.containerManager) {
const clientId = store.getters.getSessionContextClientId
store.dispatch('getAttachmentFromServer', {
containerType: type,
clientId: clientId,
containerId: action_id,
containerType: 'attachment',
clientId: client.uuid,
recordId: props.recordId,
tableName: props.tableName
})
Expand All @@ -196,11 +189,10 @@ export default defineComponent({
return file
}
props.containerManager.getAttachment({
containerUuid: props.containerUuid,
containerId: action_id,
parentUuid: props.parentUuid,
tableName: props.tableName,
recordId: props.recordId
containerType: 'attachment',
clientId: client.uuid,
recordId: props.recordId,
tableName: props.tableName
})
// store.dispatch('')
resolve(file_name)
Expand Down Expand Up @@ -233,11 +225,12 @@ export default defineComponent({
})
}
additionalData.value = {}

const { client } = store.getters['user/getRole']
store.dispatch('getAttachmentFromServer', {
tableName: props.tableName,
recordId: props.recordId,
recordUuid: props.recordUuid
containerType: 'attachment',
clientId: client.uuid
})
}

Expand Down

0 comments on commit 9ba1ccb

Please sign in to comment.