0
0
Fork 0
This commit is contained in:
Javier Segarra 2024-03-28 07:20:54 +01:00
parent 2bec5f0e9c
commit da93b9cca8
2 changed files with 5 additions and 5 deletions

View File

@ -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
);

View File

@ -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,
});