diff --git a/src/modules/05_command/components/ViewPdf.vue b/src/modules/05_command/components/ViewPdf.vue index ec87a014..16a31b9b 100644 --- a/src/modules/05_command/components/ViewPdf.vue +++ b/src/modules/05_command/components/ViewPdf.vue @@ -80,13 +80,17 @@ async function fetchDocumentTemplate(dataTemple: DataTemplateDetail) { }; await axios - .post(config.API.reportTemplate + `/${typeFile.value}`, body, { - headers: { - accept: "application/pdf", - "content-Type": "application/json", - }, - responseType: "blob", - }) + .post( + config.API.reportTemplate + `/${typeFile.value}?folder=command`, + body, + { + headers: { + accept: "application/pdf", + "content-Type": "application/json", + }, + responseType: "blob", + } + ) .then(async (res) => { isLoadPDF.value = false; const blob = new Blob([res.data]); @@ -121,7 +125,7 @@ async function uploadTemplate() { await axios .post( config.API.reportTemplate + - `/${typeFile.value}/upload?report_name=${reportName}`, + `/${typeFile.value}/upload?report_name=${reportName}&folder=command`, documentFile.value, { headers: { @@ -161,7 +165,7 @@ async function downloadTemplate() { : dataTemplateDetail.value.fileAttachment); await axios .post( - config.API.reportTemplate + `/${typeFile.value}/download`, + config.API.reportTemplate + `/${typeFile.value}/download?folder=command`, { template: check, }, diff --git a/src/plugins/genreport.ts b/src/plugins/genreport.ts index 4886a895..0673a76a 100644 --- a/src/plugins/genreport.ts +++ b/src/plugins/genreport.ts @@ -12,7 +12,7 @@ const { showLoader, hideLoader, messageError } = mixin; async function genReport(data: any, fileName: string, type: string = "docx") { showLoader(); await axios - .post(`${config.API.reportTemplate}/docx/html`, data, { + .post(`${config.API.reportTemplate}/docx`, data, { headers: type == "docx" ? {