From da93b9cca84110ed741be04de609d6509616be98 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 28 Mar 2024 07:20:54 +0100 Subject: [PATCH] updates --- src/composables/usePrintService.js | 4 ++-- src/pages/InvoiceOut/InvoiceOutList.vue | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/composables/usePrintService.js b/src/composables/usePrintService.js index 110e4d864..edf9598b2 100644 --- a/src/composables/usePrintService.js +++ b/src/composables/usePrintService.js @@ -4,7 +4,7 @@ import { useQuasar } from 'quasar'; export function usePrintService() { const quasar = useQuasar(); - const { getToken } = useSession(); + const { getTokenMultimedia } = useSession(); function sendEmail(path, params) { return axios.post(path, params).then(() => @@ -19,7 +19,7 @@ export function usePrintService() { function openReport(path, params) { params = Object.assign( { - access_token: getToken(), + access_token: getTokenMultimedia(), }, params ); diff --git a/src/pages/InvoiceOut/InvoiceOutList.vue b/src/pages/InvoiceOut/InvoiceOutList.vue index 266dac26e..c77502af5 100644 --- a/src/pages/InvoiceOut/InvoiceOutList.vue +++ b/src/pages/InvoiceOut/InvoiceOutList.vue @@ -22,7 +22,7 @@ const { t } = useI18n(); const router = useRouter(); const stateStore = useStateStore(); const session = useSession(); -const token = session.getToken(); +const tokenMultimedia = session.getTokenMultimedia(); const { viewSummary } = useSummaryDialog(); const manualInvoiceDialogRef = ref(null); @@ -66,7 +66,7 @@ const openPdf = () => { if (selectedCards.value.size === 1) { const [invoiceOut] = selectedCardsArray; - const url = `api/InvoiceOuts/${invoiceOut.id}/download?access_token=${token}`; + const url = `api/InvoiceOuts/${invoiceOut.id}/download?access_token=${tokenMultimedia}`; window.open(url, '_blank'); } else { const invoiceOutIdsArray = selectedCardsArray.map( @@ -75,7 +75,7 @@ const openPdf = () => { const invoiceOutIds = invoiceOutIdsArray.join(','); const params = new URLSearchParams({ - access_token: token, + access_token: tokenMultimedia, ids: invoiceOutIds, });