diff --git a/src/modules/07_insignia/components/2_Manage/Tab1.vue b/src/modules/07_insignia/components/2_Manage/Tab1.vue
index 5641ad146..884864418 100644
--- a/src/modules/07_insignia/components/2_Manage/Tab1.vue
+++ b/src/modules/07_insignia/components/2_Manage/Tab1.vue
@@ -1245,17 +1245,15 @@ onMounted(async () => {
-
+
{{ props.rowIndex + 1 }}
diff --git a/src/modules/07_insignia/components/2_Manage/downloadFile.vue b/src/modules/07_insignia/components/2_Manage/downloadFile.vue
index e879bd3e6..24623e6d4 100644
--- a/src/modules/07_insignia/components/2_Manage/downloadFile.vue
+++ b/src/modules/07_insignia/components/2_Manage/downloadFile.vue
@@ -1,12 +1,12 @@
+
{
hideLoader();
});
};
-const fileOpen = (url: string, isReport: boolean, fileName: string) => {
- if (isReport) {
+const fileOpen = async (attachmentsData: attachments) => {
+ if (attachmentsData.isReport) {
showLoader();
- http
- .get(url)
+ await http
+ .get(attachmentsData.url)
.then(async (res) => {
- const data = res.data.result;
- await genReport(data, fileName, "pdf");
+ const result = res.data;
+ if (attachmentsData.isTemplate) {
+ await genReport(result.result, attachmentsData.name, "pdf");
+ } else {
+ window.open(result.downloadUrl, "_blank");
+ }
})
.catch((err) => {
messageError($q, err);
@@ -130,7 +135,7 @@ const fileOpen = (url: string, isReport: boolean, fileName: string) => {
hideLoader();
});
} else {
- window.open(url, "_blank");
+ window.open(attachmentsData.url, "_blank");
}
};
@@ -363,10 +368,7 @@ const thaiOptions: Intl.DateTimeFormatOptions = {
v-for="(link, num) in d.payload.attachments"
:key="num"
>
-
+
{{ link.name }}