From bf80274f868cb7cc5b857afef5c9dafeb34d37fa Mon Sep 17 00:00:00 2001 From: AnandaTon <125332905+anandaAiemvong@users.noreply.github.com> Date: Fri, 11 Aug 2023 11:13:14 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B9=80=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82=20api=20insignia=20(file)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/1_Proposals/addProposals.vue | 1 + .../components/1_Proposals/listProposals.vue | 21 +++++++++++-------- .../components/1_Proposals/addProposals.vue | 1 + .../components/1_Proposals/listProposals.vue | 9 +++++--- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/modules/07_insignia/components/1_Proposals/addProposals.vue b/src/modules/07_insignia/components/1_Proposals/addProposals.vue index 8a2cfc5ab..f4b3205ef 100644 --- a/src/modules/07_insignia/components/1_Proposals/addProposals.vue +++ b/src/modules/07_insignia/components/1_Proposals/addProposals.vue @@ -295,6 +295,7 @@ const checkSave = async () => { await editData(id.value); } else { await addData(); + clickBack(); } } }); diff --git a/src/modules/07_insignia/components/1_Proposals/listProposals.vue b/src/modules/07_insignia/components/1_Proposals/listProposals.vue index 2c132ed72..a3851651f 100644 --- a/src/modules/07_insignia/components/1_Proposals/listProposals.vue +++ b/src/modules/07_insignia/components/1_Proposals/listProposals.vue @@ -102,7 +102,7 @@ ดาวน์โหลดเอกสารประกอบ @@ -297,7 +297,7 @@ const rows = ref([ year: "2566", startDate: "2566", endDate: "31 พ.ค. 2566", - status: "เสนอเเล้ว", + status: true, statusRoyal: "เสนอเเล้ว", }, { @@ -305,7 +305,7 @@ const rows = ref([ year: "2566", startDate: "2566", endDate: "31 พ.ค. 2566", - status: "เสนอเเล้ว", + status: true, statusRoyal: "เสนอเเล้ว", }, { @@ -313,7 +313,7 @@ const rows = ref([ year: "2566", startDate: "2566", endDate: "31 พ.ค. 2566", - status: "เสนอเเล้ว", + status: true, statusRoyal: "เสนอเเล้ว", }, { @@ -329,7 +329,7 @@ const rows = ref([ year: "2566", startDate: "2566", endDate: "31 พ.ค. 2566", - status: "เสนอเเล้ว", + status: true, statusRoyal: "ยังไม่ได้เสนอ", }, ]); @@ -356,7 +356,8 @@ const fetchData = async () => { e.period_start == null ? null : date2Thai(new Date(e.period_start)), endDate: e.period_end == null ? null : date2Thai(new Date(e.period_end)), - status: e.period_status, + status: e.period_isActive, + file: e.period_doc, }); }); }) @@ -406,8 +407,10 @@ const clickAdd = () => { router.push({ name: "roundAdd" }); }; -const clickProposals = (id: string) => { - // window.open(config.API.exportInsigniaDoc(id)); +const clickProposals = (file: string) => { + if (file !== null) { + window.open(file); + } }; // ค้นหาในตาราง diff --git a/src/modules/09_coin/components/1_Proposals/addProposals.vue b/src/modules/09_coin/components/1_Proposals/addProposals.vue index b3a014055..037ceaf2e 100644 --- a/src/modules/09_coin/components/1_Proposals/addProposals.vue +++ b/src/modules/09_coin/components/1_Proposals/addProposals.vue @@ -319,6 +319,7 @@ const checkSave = async () => { await editData(id.value); } else { await addData(); + clickBack(); } } }); diff --git a/src/modules/09_coin/components/1_Proposals/listProposals.vue b/src/modules/09_coin/components/1_Proposals/listProposals.vue index d9d5793b9..3202d3397 100644 --- a/src/modules/09_coin/components/1_Proposals/listProposals.vue +++ b/src/modules/09_coin/components/1_Proposals/listProposals.vue @@ -139,7 +139,7 @@ flat round color="light-blue-8" - @click.stop.prevent="clickProposals(props.row.id)" + @click.stop.prevent="clickProposals(props.row.file)" icon="mdi-file-download" > ดาวน์โหลดเอกสารประกอบ @@ -341,6 +341,7 @@ const fetchData = async () => { endDate: e.period_end == null ? null : date2Thai(new Date(e.period_end)), status: e.period_status, + file: e.period_doc, }); }); }) @@ -356,8 +357,10 @@ const clickEdit = (col: any) => { router.push(`/coin/round-add/${col.id}`); }; -const clickProposals = (id: string) => { - // window.open(config.API.exportDisablePassExamList(id)); +const clickProposals = (file: string) => { + if (file !== null) { + window.open(file); + } }; // หัวตาราง2