refs #6930 updates
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Javier Segarra 2024-03-28 07:22:28 +01:00
parent 075259dee9
commit d30cac971f
2 changed files with 7 additions and 4 deletions

View File

@ -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}`;

View File

@ -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}`;