diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue index 7a978a3b01e..d344406d271 100644 --- a/src/layout/components/TagsView/index.vue +++ b/src/layout/components/TagsView/index.vue @@ -106,15 +106,20 @@ import { generateTitle } from '@/utils/i18n' import path from 'path' import draggable from 'vuedraggable' -// constants -import { REPORT_VIEWER_NAME } from '@/utils/ADempiere/constants/report' +// Constants +import { + REPORT_VIEWER_NAME +} from '@/utils/ADempiere/dictionary/report' -// utils and helper methods +// Utils and Helper Methods import { capitalize } from '@/utils/ADempiere/formatValue/stringFormat' -import { isEmptyValue } from '@/utils/ADempiere' +import { isEmptyValue } from '@/utils/ADempiere/valueUtils' export default { - components: { ScrollPane, draggable }, + components: { + ScrollPane, draggable + }, + data() { return { visible: false, @@ -126,6 +131,7 @@ export default { recordsModifiedWindow: [] } }, + computed: { isMobile() { return this.$store.state.app.device === 'mobile' @@ -137,6 +143,7 @@ export default { return this.$store.state.permission.routes } }, + watch: { $route() { this.addTags() @@ -150,10 +157,12 @@ export default { } } }, + mounted() { this.initTags() this.addTags() }, + methods: { generateTitle, // generateTitle by vue-i18n isActive(route) { diff --git a/src/router/modules/ADempiere/staticRoutes.js b/src/router/modules/ADempiere/staticRoutes.js index 39cb6c05b0f..c3e57a464a6 100644 --- a/src/router/modules/ADempiere/staticRoutes.js +++ b/src/router/modules/ADempiere/staticRoutes.js @@ -1,7 +1,7 @@ /** * ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution * Copyright (C) 2018-Present E.R.P. Consultores y Asociados, C.A. www.erpya.com - * Contributor(s): Leonel Matos lMatos@eroya.com + * Contributor(s): Leonel Matos lMatos@erpya.com * 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 @@ -22,7 +22,10 @@ import Layout from '@/layout' import language from '@/lang' // Constants -import { REPORT_VIEWER_NAME, REPORT_VIEWER_ENGINE_NAME } from '@/utils/ADempiere/constants/report' +import { + REPORT_VIEWER_NAME, + REPORT_VIEWER_ENGINE_NAME +} from '@/utils/ADempiere/dictionary/report' import { REQUEST_ALL_WINDOW_ID } from '@/utils/ADempiere/dictionary/form/Issues' // Utils and Helper Methods diff --git a/src/store/modules/ADempiere/dictionary/report/actions.js b/src/store/modules/ADempiere/dictionary/report/actions.js index a378b29f69c..0ca6c77aada 100644 --- a/src/store/modules/ADempiere/dictionary/report/actions.js +++ b/src/store/modules/ADempiere/dictionary/report/actions.js @@ -31,7 +31,7 @@ import { import { showNotification } from '@/utils/ADempiere/notification.js' import { containerManager -} from '@/utils/ADempiere/dictionary/report.js' +} from '@/utils/ADempiere/dictionary/report' import { runReport, runReportAs, diff --git a/src/store/modules/ADempiere/form/VPOS/options.js b/src/store/modules/ADempiere/form/VPOS/options.js index 2376d417aa3..19a3e36b817 100644 --- a/src/store/modules/ADempiere/form/VPOS/options.js +++ b/src/store/modules/ADempiere/form/VPOS/options.js @@ -1,20 +1,29 @@ -// ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution -// Copyright (C) 2023-Present E.R.P. Consultores y Asociados, C.A. -// Contributor(s): Elsio Sanchez elsiosanchez15@outlook.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. +/** + * ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution + * Copyright (C) 2018-Present E.R.P. Consultores y Asociados, C.A. www.erpya.com + * 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 . + */ -// 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 . import router from '@/router' import lang from '@/lang' + +// Constants +import { + REPORT_VIEWER_NAME +} from '@/utils/ADempiere/dictionary/report/index.js' + // API Request Methods import { copyOrder, @@ -40,12 +49,11 @@ import { processCashClosing, listCashSummaryMovements } from '@/api/ADempiere/form/VPOS' -// // Utils and Helper Methods + +// Utils and Helper Methods import { isEmptyValue } from '@/utils/ADempiere/valueUtils.js' import { showMessage } from '@/utils/ADempiere/notification' import { buildLinkHref } from '@/utils/ADempiere/resource.js' -// Constants -import { REPORT_VIEWER_NAME } from '@/utils/ADempiere/constants/report' const options = { showOptions: false, diff --git a/src/store/modules/ADempiere/pointOfSales/order/actions.js b/src/store/modules/ADempiere/pointOfSales/order/actions.js index cce7e557e28..58ebd4205cb 100644 --- a/src/store/modules/ADempiere/pointOfSales/order/actions.js +++ b/src/store/modules/ADempiere/pointOfSales/order/actions.js @@ -1,6 +1,6 @@ /** * ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution - * Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A. www.erpya.com + * Copyright (C) 2018-Present E.R.P. Consultores y Asociados, C.A. www.erpya.com * Contributor(s): Elsio Sanchez elsiosanchez@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 @@ -9,7 +9,7 @@ * * 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 +* 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 @@ -19,7 +19,12 @@ import language from '@/lang' import router from '@/router' -// api request methods +// Constants +import { + REPORT_VIEWER_NAME +} from '@/utils/ADempiere/dictionary/report' + +// API Request Methods import { createOrder, getOrder, @@ -30,14 +35,12 @@ import { printTicketPreviwer } from '@/api/ADempiere/form/point-of-sales.js' -// utils and helper methods +// Utils and Helper Methods import { isEmptyValue, convertValuesToSendListOrders } from '@/utils/ADempiere/valueUtils.js' import { extractPagingToken, generatePageToken } from '@/utils/ADempiere/dataUtils' import { showMessage } from '@/utils/ADempiere/notification.js' import { buildLinkHref } from '@/utils/ADempiere/resource.js' -// Constants -import { REPORT_VIEWER_NAME } from '@/utils/ADempiere/constants/report' /** * Order Actions */ diff --git a/src/store/modules/ADempiere/report/reportRun.js b/src/store/modules/ADempiere/report/reportRun.js index eecc5465474..d9584dace10 100644 --- a/src/store/modules/ADempiere/report/reportRun.js +++ b/src/store/modules/ADempiere/report/reportRun.js @@ -19,6 +19,7 @@ // import Vue from 'vue' import router from '@/router' import language from '@/lang' + // API Request Methods import { generateReportRequest, @@ -27,10 +28,10 @@ import { // Constants import { - DEFAULT_REPORT_TYPE -} from '@/utils/ADempiere/dictionary/report.js' -import { REPORT_VIEWER_SUPPORTED_FORMATS } from '@/utils/ADempiere/dictionary/report.js' -import { REPORT_VIEWER_NAME } from '@/utils/ADempiere/constants/report' + DEFAULT_REPORT_TYPE, + REPORT_VIEWER_NAME, + REPORT_VIEWER_SUPPORTED_FORMATS +} from '@/utils/ADempiere/dictionary/report' // Utils import { buildLinkHref } from '@/utils/ADempiere/resource.js' diff --git a/src/store/modules/ADempiere/reportManager.js b/src/store/modules/ADempiere/reportManager.js index 945a3d44f94..636215f1bd7 100644 --- a/src/store/modules/ADempiere/reportManager.js +++ b/src/store/modules/ADempiere/reportManager.js @@ -41,11 +41,12 @@ import { } from '@/api/ADempiere/file-management/resource-reference.ts' // Constants -import { - DEFAULT_REPORT_TYPE -} from '@/utils/ADempiere/dictionary/report.js' import { config } from '@/utils/ADempiere/config' -import { REPORT_VIEWER_NAME, REPORT_VIEWER_ENGINE_NAME } from '@/utils/ADempiere/constants/report' +import { + DEFAULT_REPORT_TYPE, + REPORT_VIEWER_NAME, + REPORT_VIEWER_ENGINE_NAME +} from '@/utils/ADempiere/dictionary/report' // Utils and Helper Methods import { getToken } from '@/utils/auth' @@ -59,7 +60,7 @@ import { import { showMessage, showNotification } from '@/utils/ADempiere/notification.js' import { containerManager -} from '@/utils/ADempiere/dictionary/report.js' +} from '@/utils/ADempiere/dictionary/report' import { requestShareResources } from '@/api/ADempiere/file-management/resource-reference.ts' diff --git a/src/store/modules/tagsView.js b/src/store/modules/tagsView.js index eda87c7bb49..96d37931c3a 100644 --- a/src/store/modules/tagsView.js +++ b/src/store/modules/tagsView.js @@ -1,7 +1,10 @@ import router from '@/router' -// constants -import { REPORT_VIEWER_NAME, REPORT_VIEWER_ENGINE_NAME } from '@/utils/ADempiere/constants/report' +// Constants +import { + REPORT_VIEWER_NAME, + REPORT_VIEWER_ENGINE_NAME +} from '@/utils/ADempiere/dictionary/report' const state = { visitedViews: [], diff --git a/src/utils/ADempiere/constants/report.js b/src/utils/ADempiere/constants/report.js deleted file mode 100644 index 94a3dbc71cc..00000000000 --- a/src/utils/ADempiere/constants/report.js +++ /dev/null @@ -1,94 +0,0 @@ -/** - * ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution - * Copyright (C) 2018-Present E.R.P. Consultores y Asociados, C.A. www.erpya.com - * 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 . - */ - -import language from '@/lang' - -const today = new Date() - -export const REPORT_VIEWER_NAME = 'Report Viewer' -export const REPORT_VIEWER_ENGINE_NAME = 'Report Viewer Engine' - -export const staticReportRoutes = [ - { - uuid: '92b9a696-adba-4409-a200-7df0ba74cb63', - action: 'processOption', - tabChild: undefined, - parametersList: [{ columnName: 'ValidFrom', value: today }] - }, - { - uuid: '78b249ee-613e-4241-a2c1-00243fa36470', - action: 'processOption', - tabChild: undefined, - parametersList: [{ columnName: 'ValidFrom', value: today }, { columnName: 'MustBeStocked', value: false }] - } -] - -export const REPORT_EXPORT_TYPE_XLSX = { - name: language.t('report.reportExportTypes.xlsx.name'), - description: language.t('report.reportExportTypes.xlsx.description'), - type: language.t('report.reportExportTypes.xlsx.type') -} - -export const REPORT_EXPORT_TYPES = [ - { - name: language.t('report.reportExportTypes.ps.name'), - description: language.t('report.reportExportTypes.ps.description'), - type: language.t('report.reportExportTypes.ps.type') - }, - { - name: language.t('report.reportExportTypes.xml.name'), - description: language.t('report.reportExportTypes.xml.description'), - type: language.t('report.reportExportTypes.xml.type') - }, - { - name: language.t('report.reportExportTypes.pdf.name'), - description: language.t('report.reportExportTypes.pdf.description'), - type: language.t('report.reportExportTypes.pdf.type') - }, - { - name: language.t('report.reportExportTypes.html.name'), - description: language.t('report.reportExportTypes.html.description'), - type: language.t('report.reportExportTypes.html.type') - }, - { - name: language.t('report.reportExportTypes.txt.name'), - description: language.t('report.reportExportTypes.txt.description'), - type: language.t('report.reportExportTypes.txt.type') - }, - { - name: language.t('report.reportExportTypes.ssv.name'), - description: language.t('report.reportExportTypes.ssv.description'), - type: language.t('report.reportExportTypes.ssv.type') - }, - { - name: language.t('report.reportExportTypes.csv.name'), - description: language.t('report.reportExportTypes.csv.description'), - type: language.t('report.reportExportTypes.csv.type') - }, - { - name: language.t('report.reportExportTypes.xls.name'), - description: language.t('report.reportExportTypes.xls.description'), - type: language.t('report.reportExportTypes.xls.type') - }, - REPORT_EXPORT_TYPE_XLSX, - { - name: language.t('report.reportExportTypes.arxml.name'), - description: language.t('report.reportExportTypes.arxml.description'), - type: language.t('report.reportExportTypes.arxml.type') - } -] diff --git a/src/utils/ADempiere/dictionary/process.js b/src/utils/ADempiere/dictionary/process.js index 4c6fb06c763..7fc52e47ee7 100644 --- a/src/utils/ADempiere/dictionary/process.js +++ b/src/utils/ADempiere/dictionary/process.js @@ -22,7 +22,7 @@ import store from '@/store' import { requestSaveProcessCustomization } from '@/api/ADempiere/user-customization/processes' // Constants -import { REPORT_EXPORT_TYPES } from '@/utils/ADempiere/constants/report' +import { REPORT_EXPORT_TYPES } from '@/utils/ADempiere/dictionary/report' import { BUTTON } from '@/utils/ADempiere/references' // Utils and Helpers Methods diff --git a/src/utils/ADempiere/dictionary/report/actionsMenu.ts b/src/utils/ADempiere/dictionary/report/actionsMenu.ts index 058295449e4..84d95ade990 100644 --- a/src/utils/ADempiere/dictionary/report/actionsMenu.ts +++ b/src/utils/ADempiere/dictionary/report/actionsMenu.ts @@ -21,7 +21,9 @@ import router from '@/router' import store from '@/store' // Constants -import { REPORT_VIEWER_NAME } from '@/utils/ADempiere/constants/report' +import { + REPORT_VIEWER_NAME +} from '@/utils/ADempiere/dictionary/report' // Utils and Helper Methods import { isEmptyValue } from '@/utils/ADempiere/valueUtils.js' diff --git a/src/utils/ADempiere/dictionary/report.js b/src/utils/ADempiere/dictionary/report/index.js similarity index 57% rename from src/utils/ADempiere/dictionary/report.js rename to src/utils/ADempiere/dictionary/report/index.js index 1ae22636d1a..035b81085d7 100644 --- a/src/utils/ADempiere/dictionary/report.js +++ b/src/utils/ADempiere/dictionary/report/index.js @@ -16,6 +16,7 @@ * along with this program. If not, see . */ +import language from '@/lang' import store from '@/store' import { @@ -27,11 +28,104 @@ import { */ export const CONTAINER_REPORT_PREFIX = 'report_' -/** - * Suppoerted render files - * @deprecated - */ -export const viewerSupportedFormats = REPORT_VIEWER_SUPPORTED_FORMATS +const today = new Date() + +export const REPORT_VIEWER_NAME = 'Report Viewer' +export const REPORT_VIEWER_ENGINE_NAME = 'Report Viewer Engine' + +export const staticReportRoutes = [ + { + uuid: '92b9a696-adba-4409-a200-7df0ba74cb63', + action: 'processOption', + tabChild: undefined, + parametersList: [ + { columnName: 'ValidFrom', value: today } + ] + }, + { + uuid: '78b249ee-613e-4241-a2c1-00243fa36470', + action: 'processOption', + tabChild: undefined, + parametersList: [ + { columnName: 'ValidFrom', value: today }, + { columnName: 'MustBeStocked', value: false } + ] + } +] + +export const REPORT_EXPORT_TYPE_PS = { + name: language.t('report.reportExportTypes.ps.name'), + description: language.t('report.reportExportTypes.ps.description'), + type: language.t('report.reportExportTypes.ps.type') +} + +export const REPORT_EXPORT_TYPE_XML = { + name: language.t('report.reportExportTypes.xml.name'), + description: language.t('report.reportExportTypes.xml.description'), + type: language.t('report.reportExportTypes.xml.type') +} + +export const REPORT_EXPORT_TYPE_PDF = { + name: language.t('report.reportExportTypes.pdf.name'), + description: language.t('report.reportExportTypes.pdf.description'), + type: language.t('report.reportExportTypes.pdf.type') +} + +export const REPORT_EXPORT_TYPE_HTML = { + name: language.t('report.reportExportTypes.html.name'), + description: language.t('report.reportExportTypes.html.description'), + type: language.t('report.reportExportTypes.html.type') +} + +export const REPORT_EXPORT_TYPE_TXT = { + name: language.t('report.reportExportTypes.txt.name'), + description: language.t('report.reportExportTypes.txt.description'), + type: language.t('report.reportExportTypes.txt.type') +} + +export const REPORT_EXPORT_TYPE_SSV = { + name: language.t('report.reportExportTypes.ssv.name'), + description: language.t('report.reportExportTypes.ssv.description'), + type: language.t('report.reportExportTypes.ssv.type') +} + +export const REPORT_EXPORT_TYPE_CSV = { + name: language.t('report.reportExportTypes.csv.name'), + description: language.t('report.reportExportTypes.csv.description'), + type: language.t('report.reportExportTypes.csv.type') +} + +export const REPORT_EXPORT_TYPE_XLS = { + name: language.t('report.reportExportTypes.xls.name'), + description: language.t('report.reportExportTypes.xls.description'), + type: language.t('report.reportExportTypes.xls.type') +} + +export const REPORT_EXPORT_TYPE_XLSX = { + name: language.t('report.reportExportTypes.xlsx.name'), + description: language.t('report.reportExportTypes.xlsx.description'), + type: language.t('report.reportExportTypes.xlsx.type') +} + +export const REPORT_EXPORT_TYPE_ARXML = { + name: language.t('report.reportExportTypes.arxml.name'), + description: language.t('report.reportExportTypes.arxml.description'), + type: language.t('report.reportExportTypes.arxml.type') +} + +export const REPORT_EXPORT_TYPES = [ + REPORT_EXPORT_TYPE_PS, + REPORT_EXPORT_TYPE_XML, + REPORT_EXPORT_TYPE_PDF, + REPORT_EXPORT_TYPE_HTML, + REPORT_EXPORT_TYPE_TXT, + REPORT_EXPORT_TYPE_SSV, + REPORT_EXPORT_TYPE_CSV, + REPORT_EXPORT_TYPE_XLS, + REPORT_EXPORT_TYPE_XLSX, + REPORT_EXPORT_TYPE_ARXML +] + /** * Suppoerted render files */ @@ -46,11 +140,6 @@ export const REPORT_VIEWER_SUPPORTED_FORMATS = [ 'xml' ] -/** - * All report extension file - * @deprecated - */ -export const reportFormatsList = REPORT_FORMATS_LIST /** * All report extension file */ diff --git a/src/views/ADempiere/ProcessActivity/processActivity.js b/src/views/ADempiere/ProcessActivity/processActivity.js index 3f54bbd00ee..c149832291a 100644 --- a/src/views/ADempiere/ProcessActivity/processActivity.js +++ b/src/views/ADempiere/ProcessActivity/processActivity.js @@ -1,6 +1,6 @@ /** * ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution - * Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A. www.erpya.com + * Copyright (C) 2018-Present E.R.P. Consultores y Asociados, C.A. www.erpya.com * Contributor(s): Edwin Betancourt EdwinBetanc0urt@outlook.com https://github.com/EdwinBetanc0urt * 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 @@ -26,7 +26,7 @@ import store from '@/store' import LoadingView from '@/components/ADempiere/LoadingView' // Constants -import { REPORT_VIEWER_NAME } from '@/utils/ADempiere/constants/report' +import { REPORT_VIEWER_NAME } from '@/utils/ADempiere/dictionary/report' // Utils and Helper Methods import { isEmptyValue } from '@/utils/ADempiere/valueUtils' diff --git a/src/views/ADempiere/ReportViewer/index.vue b/src/views/ADempiere/ReportViewer/index.vue index a9a24ba225f..3c6c2938a62 100644 --- a/src/views/ADempiere/ReportViewer/index.vue +++ b/src/views/ADempiere/ReportViewer/index.vue @@ -99,8 +99,9 @@ import ModalDialog from '@/components/ADempiere/ModalDialog/index.vue' import OptionsReport from '@/components/ADempiere/ReportManager/Setup/optionsReport.vue' import TitleAndHelp from '@/components/ADempiere/TitleAndHelp/index.vue' import dialogShareReport from '@/views/ADempiere/ReportViewerEngine/dialog' + // Constants -import { DEFAULT_REPORT_TYPE } from '@/utils/ADempiere/dictionary/report.js' +import { DEFAULT_REPORT_TYPE } from '@/utils/ADempiere/dictionary/report' // Utils and Helper Methods import { convertObjectToKeyValue } from '@/utils/ADempiere/valueFormat.js' diff --git a/src/views/ADempiere/ReportViewerEngine/dialog/index.vue b/src/views/ADempiere/ReportViewerEngine/dialog/index.vue index 084486d7f9d..d54c20d88a9 100644 --- a/src/views/ADempiere/ReportViewerEngine/dialog/index.vue +++ b/src/views/ADempiere/ReportViewerEngine/dialog/index.vue @@ -181,7 +181,7 @@ import typeNotify from './typeNotify' // Constants import { config } from '@/utils/ADempiere/config' -import { REPORT_EXPORT_TYPE_XLSX } from '@/utils/ADempiere/constants/report' +import { REPORT_EXPORT_TYPE_XLSX } from '@/utils/ADempiere/dictionary/report' // API Request Methods import { diff --git a/src/views/ADempiere/ReportViewerEngine/index.vue b/src/views/ADempiere/ReportViewerEngine/index.vue index 9a29f1d2f2b..941e03d22c7 100644 --- a/src/views/ADempiere/ReportViewerEngine/index.vue +++ b/src/views/ADempiere/ReportViewerEngine/index.vue @@ -93,7 +93,7 @@ import TitleAndHelp from '@/components/ADempiere/TitleAndHelp/index.vue' import reportPanel from '@/views/ADempiere/ReportViewerEngine/reportPanel.vue' // Constants -import { DEFAULT_REPORT_TYPE } from '@/utils/ADempiere/dictionary/report.js' +import { DEFAULT_REPORT_TYPE } from '@/utils/ADempiere/dictionary/report' // Utils and Helper Methods import { convertObjectToKeyValue } from '@/utils/ADempiere/valueFormat.js'