From de5c82b7efae7a7bbf25c718ad092aa799dc179c Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 10 Jan 2025 18:00:40 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1?= =?UTF-8?q?=20=20API=20Committee?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/05_placement/api.probation.ts | 1 + .../components/probation/ProbationDetail.vue | 29 +++++++++++++------ 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/api/05_placement/api.probation.ts b/src/api/05_placement/api.probation.ts index e3c9989d8..7deae216f 100644 --- a/src/api/05_placement/api.probation.ts +++ b/src/api/05_placement/api.probation.ts @@ -33,6 +33,7 @@ export default { probationsGetAssign: (assignId: string) => `${finish}?assign_id=${assignId}`, changestatusProbations: (personalId: string) => `${evaluate}/report/change-status?personal_id=${personalId}`, + probationCommittee : `${appointMain}/committee`, // probationGetAssignList: (personalId: string) => // `${finish}/assign-list?personal_id=${personalId}`, diff --git a/src/modules/05_placement/components/probation/ProbationDetail.vue b/src/modules/05_placement/components/probation/ProbationDetail.vue index 2dc9e8ac5..213e54a0e 100644 --- a/src/modules/05_placement/components/probation/ProbationDetail.vue +++ b/src/modules/05_placement/components/probation/ProbationDetail.vue @@ -243,12 +243,6 @@ function clickSelect(id: string) { } } -/** รีเซ็ตค่าในช่อง input */ -function resetFilter() { - filterKeyword.value = ""; - filterRef.value.focus(); -} - function paginationLabel(start: string, end: string, total: string) { if (paging.value == true) return " " + start + "-" + end + " ใน " + total; else return start + "-" + end + " ใน " + total; @@ -284,6 +278,19 @@ async function fetchProfilePhoto() { }); } +const isCommittee = ref(false); //สถานะการแสดงเพิ่มแบบมอบหมายงานการทดลองปฏิบัติหน้าที่ราชการ +function fetchCheckCommittee() { + http + .get(config.API.probationCommittee + `/${personalId.value}`) + .then((res) => { + const data = res.data.result; + isCommittee.value = data; + }) + .catch((err) => { + messageError($q, err); + }); +} + function onSearch() { rows.value = onSearchDataTable( filterKeyword.value, @@ -294,7 +301,12 @@ function onSearch() { /** get ค่า เมื่อโหลดหน้า */ onMounted(async () => { - await Promise.all([getpersonalList(), getAssignList(), fetchProfilePhoto()]); + await Promise.all([ + getpersonalList(), + getAssignList(), + fetchProfilePhoto(), + fetchCheckCommittee(), + ]); }); @@ -389,8 +401,7 @@ onMounted(async () => {