แก้ไข itemlist download ไฟล์

- รายละเอียดการขอยกเลิกการลา
- รายละเอียดการลา
This commit is contained in:
AnandaTon 2023-12-20 17:00:45 +07:00
parent 8cfda78cb0
commit 7d90f443a0
3 changed files with 88 additions and 9 deletions

View file

@ -41,7 +41,7 @@ async function genReport(data: any, fileName: string, type: string = "docx") {
// สร้างลิงก์เพื่อดาวน์โหลดไฟล์
const link = document.createElement("a");
link.href = url;
link.download = `${fileName}.docx`; // กำหนดชื่อไฟล์ที่จะดาวน์โหลด
link.download = `${fileName}.${type === "docx" ? "docx" : "pdf"}`; // กำหนดชื่อไฟล์ที่จะดาวน์โหลด
document.body.appendChild(link);
link.click();