From cff39d85fb73211f998ab04438059ba4ac55122b Mon Sep 17 00:00:00 2001 From: waruneeta Date: Fri, 6 Oct 2023 17:32:08 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84=E0=B8=82?= =?UTF-8?q?=E0=B9=80=E0=B8=87=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=99=E0=B9=84?= =?UTF-8?q?=E0=B8=82=20=E0=B9=83=E0=B8=99=E0=B8=AA=E0=B9=88=E0=B8=A7?= =?UTF-8?q?=E0=B8=99=E0=B8=82=E0=B8=AD=E0=B8=87=E0=B9=81=E0=B8=81=E0=B9=89?= =?UTF-8?q?=E0=B9=84=E0=B8=82=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7=E0=B8=B1?= =?UTF-8?q?=E0=B8=95=E0=B8=B4=E0=B8=9C=E0=B8=B9=E0=B9=89=E0=B8=AA=E0=B8=AD?= =?UTF-8?q?=E0=B8=9A=E0=B8=9C=E0=B9=88=E0=B8=B2=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/PersonalList/Table.vue | 17 ++++++++--------- .../components/PersonalList/TableDetail.vue | 6 +++--- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/modules/05_placement/components/PersonalList/Table.vue b/src/modules/05_placement/components/PersonalList/Table.vue index 4ced84dff..554858b12 100644 --- a/src/modules/05_placement/components/PersonalList/Table.vue +++ b/src/modules/05_placement/components/PersonalList/Table.vue @@ -360,14 +360,13 @@ const getClass = (val: boolean) => { }; }; // เรียกดูรายละเอียดข้อมูล -const selectData = (pid: string) => { - router.push("/placement/personal-detail/" + pid); - // if (roleAdmin.value === true) { - // personalId.value = pid; - // modal.value = true; - // } else { - // router.push("/placement/personal-detail/" + pid); - // } +const selectData = (pid: string, draft: string) => { + if (roleAdmin.value && draft === 'ส่งตัวแล้ว') { + personalId.value = pid; + modal.value = true; + } else { + router.push("/placement/personal-detail/" + pid); + } }; const getNumFile = ref(0); const dataInfo = reactive({ @@ -582,7 +581,7 @@ const pagination = ref({ v-for="col in props.cols" :key="col.name" :props="props" - @click="selectData(props.row.personalId)" + @click="selectData(props.row.personalId, props.row.draft)" class="cursor-pointer" >