Skip to content

Commit

Permalink
Fixed does not appear the context menu in the reports (#1573)
Browse files Browse the repository at this point in the history
* #1315

* #1571

Co-authored-by: elsiosanchez <elsiossanches@gmail.com>
  • Loading branch information
elsiosanchez and elsiosanchez authored Feb 15, 2022
1 parent 2db3217 commit db3a571
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,36 @@ export default [
isMandatory: true
}
},
// WHDocumentNo
{
elementColumnName: 'WHDocumentNo',
isFromDictionary: true,
overwriteDefinition: {
sequence: 10,
handleActionKeyPerformed: true,
handleContentSelection: true,
handleActionPerformed: true,
displayLogicPayment: 'ISLR',
size: 24,
isActiveLogics: true,
isMandatory: true
}
},
// WH_Type_ID
{
elementColumnName: 'WH_Type_ID',
isFromDictionary: true,
overwriteDefinition: {
sequence: 11,
handleActionKeyPerformed: true,
handleContentSelection: true,
handleActionPerformed: true,
displayLogicPayment: 'ISLR',
size: 24,
isActiveLogics: true,
isMandatory: true
}
},
// type credit card
{
tableName,
Expand Down
29 changes: 29 additions & 0 deletions src/views/ADempiere/ReportViewer/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@

<el-row type="flex" style="min-height: inherit;">
<el-col :span="24">
<action-menu
:parent-uuid="$route.params.reportUuid"
:actions-manager="actionsManager"
:relations-manager="relationsManager"
/>
<br>
<div class="content">
<title-and-help
style="margin: 0 !important;"
Expand Down Expand Up @@ -62,6 +68,7 @@
import { defineComponent, computed, onMounted, ref } from '@vue/composition-api'

// components and mixins
import ActionMenu from '@/components/ADempiere/ActionMenu/index.vue'
import FileRender from '@/components/ADempiere/FileRender/index.vue'
import LoadingView from '@/components/ADempiere/LoadingView/index.vue'
// import ModalDialog from '@/components/ADempiere/Dialog/index.vue'
Expand All @@ -70,12 +77,19 @@ import TitleAndHelp from '@/components/ADempiere/TitleAndHelp/index.vue'
// utils and helper methods
import { showNotification } from '@/utils/ADempiere/notification'

// constants
import {
runProcess,
sharedLink
} from '@/utils/ADempiere/constants/actionsMenuList'

export default defineComponent({
name: 'ReportViewer',

components: {
FileRender,
LoadingView,
ActionMenu,
// ModalDialog,
TitleAndHelp
},
Expand Down Expand Up @@ -148,7 +162,20 @@ export default defineComponent({
displayReport(reportResult.value)
}
}
const actionsManager = ref({
containerUuid: root.$route.params.reportUuid,

defaultActionName: root.$t('actionMenu.runProcess'),

getActionList: () => [
runProcess,
sharedLink
]
})

const relationsManager = ref({
menuParentUuid: root.$route.meta.parentUuid
})
onMounted(() => {
getCachedReport()
root.$route.meta.reportFormat = reportFormat.value
Expand All @@ -158,6 +185,8 @@ export default defineComponent({
isLoading,
reportFormat,
reportContent,
actionsManager,
relationsManager,
// computeds
link,
showContextMenu,
Expand Down

0 comments on commit db3a571

Please sign in to comment.