Compare commits

..

No commits in common. "89801e787f81766764b7592b791e179db2ad659a" and "d022ae189cad903df9cc99d3cfb07023fabc8f93" have entirely different histories.

View file

@ -2,6 +2,7 @@ import axios from "axios";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import { downloadBlobFile } from "@/modules/10_registry/utils/downloadFile";
const mixin = useCounterMixin();
const { showLoader, hideLoader } = mixin;
@ -31,16 +32,11 @@ async function genReport(data: any, fileName: string, type: string = "docx") {
const url = URL.createObjectURL(blob);
const baseName = fileName.trim();
const extension = type === "docx" ? "docx" : "pdf";
const link = document.createElement("a");
link.href = url;
link.download = `${baseName}.${extension}`;
document.body.appendChild(link);
link.click();
setTimeout(() => {
document.body.removeChild(link);
URL.revokeObjectURL(url);
}, 100);
// const extension = type === "docx" ? "docx" : "pdf";
await downloadBlobFile({
downloadUrl: url,
fileName: baseName,
});
}
})
.catch((err) => {