More updates to use scopedMultimedia #2227
|
@ -23,15 +23,16 @@ export default class Controller extends Section {
|
||||||
}
|
}
|
||||||
|
|
||||||
openPdf() {
|
openPdf() {
|
||||||
|
const access_token = this.vnToken.tokenMultimedia;
|
||||||
if (this.checked.length <= 1) {
|
if (this.checked.length <= 1) {
|
||||||
const [invoiceOutId] = this.checked;
|
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');
|
window.open(url, '_blank');
|
||||||
} else {
|
} else {
|
||||||
const invoiceOutIds = this.checked;
|
const invoiceOutIds = this.checked;
|
||||||
const invoicesIds = invoiceOutIds.join(',');
|
const invoicesIds = invoiceOutIds.join(',');
|
||||||
const serializedParams = this.$httpParamSerializer({
|
const serializedParams = this.$httpParamSerializer({
|
||||||
access_token: this.vnToken.token,
|
access_token,
|
||||||
ids: invoicesIds
|
ids: invoicesIds
|
||||||
});
|
});
|
||||||
const url = `api/InvoiceOuts/downloadZip?${serializedParams}`;
|
const url = `api/InvoiceOuts/downloadZip?${serializedParams}`;
|
||||||
|
|
|
@ -35,16 +35,18 @@ export default class Controller extends Section {
|
||||||
|
|
||||||
showRouteReport() {
|
showRouteReport() {
|
||||||
const routesIds = [];
|
const routesIds = [];
|
||||||
|
const access_token = this.vnToken.tokenMultimedia;
|
||||||
|
|
||||||
for (let route of this.checked)
|
for (let route of this.checked)
|
||||||
routesIds.push(route.id);
|
routesIds.push(route.id);
|
||||||
const stringRoutesIds = routesIds.join(',');
|
const stringRoutesIds = routesIds.join(',');
|
||||||
|
|
||||||
if (this.checked.length <= 1) {
|
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');
|
window.open(url, '_blank');
|
||||||
} else {
|
} else {
|
||||||
const serializedParams = this.$httpParamSerializer({
|
const serializedParams = this.$httpParamSerializer({
|
||||||
access_token: this.vnToken.token,
|
access_token,
|
||||||
id: stringRoutesIds
|
id: stringRoutesIds
|
||||||
});
|
});
|
||||||
const url = `api/Routes/downloadZip?${serializedParams}`;
|
const url = `api/Routes/downloadZip?${serializedParams}`;
|
||||||
|
|
Loading…
Reference in New Issue