refactor: change documents location
This commit is contained in:
parent
3c18e0526a
commit
4da2f9cf69
70 changed files with 1157 additions and 1258 deletions
|
|
@ -13,7 +13,7 @@ const route = useRoute();
|
|||
const { toc } = storeToRefs(manualStore);
|
||||
const { loader } = storeToRefs(dataStore);
|
||||
|
||||
const role = ref<string>("user");
|
||||
const role = ref<string>("admin");
|
||||
const queryRole = route.query.role as string;
|
||||
|
||||
const drawerMini = ref(false);
|
||||
|
|
@ -59,7 +59,7 @@ onMounted(async () => {
|
|||
if (getLocalRole !== null) {
|
||||
role.value = getLocalRole;
|
||||
} else {
|
||||
role.value = "user";
|
||||
role.value = "admin";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ onMounted(async () => {
|
|||
|
||||
const downloadManual = () => {
|
||||
const fileName = route.fullPath.split("/").pop();
|
||||
const pdfUrl = window.location.href.split("manual/").join("") + ".pdf";
|
||||
const pdfUrl = window.location.href.replace("manual/", "documents/") + ".pdf";
|
||||
const link = document.createElement("a");
|
||||
link.href = pdfUrl;
|
||||
link.download = fileName ?? ""; // ชื่อไฟล์ที่ต้องการดาวน์โหลด
|
||||
|
|
@ -92,7 +92,7 @@ const downloadManual = () => {
|
|||
|
||||
const downloadManualAll = () => {
|
||||
const fileName = "manual-all.pdf";
|
||||
const pdfUrl = window.location.origin + "/manual-all.pdf";
|
||||
const pdfUrl = window.location.origin + "/documents/manual-all.pdf";
|
||||
const link = document.createElement("a");
|
||||
link.href = pdfUrl;
|
||||
link.download = `${fileName}`; // ชื่อไฟล์ที่ต้องการดาวน์โหลด
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue