From d30cac971ff5c7ed91dd40dd34fc43ab7cb1aaea Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Thu, 28 Mar 2024 07:22:28 +0100 Subject: [PATCH] refs #6930 updates --- modules/invoiceOut/front/index/index.js | 5 +++-- modules/route/front/index/index.js | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/invoiceOut/front/index/index.js b/modules/invoiceOut/front/index/index.js index 403c51d58..f109cd5b0 100644 --- a/modules/invoiceOut/front/index/index.js +++ b/modules/invoiceOut/front/index/index.js @@ -23,15 +23,16 @@ export default class Controller extends Section { } openPdf() { + const access_token = this.vnToken.tokenMultimedia; if (this.checked.length <= 1) { const [invoiceOutId] = this.checked; - const url = `api/InvoiceOuts/${invoiceOutId}/download?access_token=${this.vnToken.tokenMultimedia}`; + const url = `api/InvoiceOuts/${invoiceOutId}/download?access_token=${access_token}`; window.open(url, '_blank'); } else { const invoiceOutIds = this.checked; const invoicesIds = invoiceOutIds.join(','); const serializedParams = this.$httpParamSerializer({ - access_token: this.vnToken.token, + access_token, ids: invoicesIds }); const url = `api/InvoiceOuts/downloadZip?${serializedParams}`; diff --git a/modules/route/front/index/index.js b/modules/route/front/index/index.js index 0c5dfe7f3..bb32e1f13 100644 --- a/modules/route/front/index/index.js +++ b/modules/route/front/index/index.js @@ -35,16 +35,18 @@ export default class Controller extends Section { showRouteReport() { const routesIds = []; + const access_token = this.vnToken.tokenMultimedia; + for (let route of this.checked) routesIds.push(route.id); const stringRoutesIds = routesIds.join(','); if (this.checked.length <= 1) { - const url = `api/Routes/${stringRoutesIds}/driver-route-pdf?access_token=${this.vnToken.tokenMultimedia}`; + const url = `api/Routes/${stringRoutesIds}/driver-route-pdf?access_token=${access_token}`; window.open(url, '_blank'); } else { const serializedParams = this.$httpParamSerializer({ - access_token: this.vnToken.token, + access_token, id: stringRoutesIds }); const url = `api/Routes/downloadZip?${serializedParams}`; -- 2.40.1