From 55ab6e157f98abcfa6aa75fbb382d45ad87ef1d4 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Wed, 26 Nov 2025 17:39:18 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9B=E0=B8=B4=E0=B8=94/=E0=B9=80=E0=B8=9B?= =?UTF-8?q?=E0=B8=B4=E0=B8=94=20=E0=B9=83=E0=B8=AB=E0=B9=89=E0=B8=94?= =?UTF-8?q?=E0=B8=B2=E0=B8=A7=E0=B8=99=E0=B9=8C=E0=B9=82=E0=B8=AB=E0=B8=A5?= =?UTF-8?q?=E0=B8=94=E0=B9=83=E0=B8=9A=E0=B8=AA=E0=B8=A1=E0=B8=B1=E0=B8=84?= =?UTF-8?q?=E0=B8=A3=E0=B8=AA=E0=B8=A3=E0=B8=A3=E0=B8=AB=E0=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/TableCandidate.vue | 30 ++++++++++++------- .../views/02_qualify/manageDetail.vue | 6 ++++ 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/src/modules/03_recruiting/components/TableCandidate.vue b/src/modules/03_recruiting/components/TableCandidate.vue index e80972eee..c9980af97 100644 --- a/src/modules/03_recruiting/components/TableCandidate.vue +++ b/src/modules/03_recruiting/components/TableCandidate.vue @@ -11,13 +11,11 @@ import config from "@/app.config"; import { useQuasar } from "quasar"; const route = useRoute(); -const router = useRouter(); const $q = useQuasar(); const mixin = useCounterMixin(); const { dateToISO, success, modalError, dialogMessage } = mixin; -const detailReport = ref(); const attrs = ref(useAttrs()); const table = ref(null); const files = ref([]); @@ -104,6 +102,10 @@ const props = defineProps({ type: Boolean, defualt: false, }, + isShowExaminfo: { + type: Boolean, + required: false, + }, save: { type: Function, default: () => console.log("not function"), @@ -395,23 +397,30 @@ async function clickCandidateList() { } async function onCheckShowExaminfo() { + console.log(props.isShowExaminfo); + dialogMessage( $q, - "ยืนยันการเปิดให้ดาวน์โหลดใบสมัคร แสดงสถานที่สอบ และเลขประจำตัวสอบนี้หรือไม่?", - "ยืนยันการเปิดให้ดาวน์โหลดใบสมัคร แสดงสถานที่สอบ และเลขประจำตัวสอบ", - "mdi-email-check-outline", + `ยืนยันการ${props.isShowExaminfo ? "ปิด" : "เปิด"}`, + `${ + props.isShowExaminfo ? "ปิดไม่" : "เปิด" + }ให้ดาวน์โหลดใบสมัคร แสดงสถานที่สอบ และเลขประจำตัวสอบหรือไม่?`, + props.isShowExaminfo ? "mdi-eye-off" : "mdi-eye-check", "ยืนยัน", - "public", + props.isShowExaminfo ? "red" : "public", async () => { try { showLoader(); await http.post(config.API.checkShowExaminfo, { examId: examId.value, + status: !props.isShowExaminfo, }); await props.fetchData(); success( $q, - "เปิดให้ดาวน์โหลดใบสมัคร แสดงสถานที่สอบ และเลขประจำตัวสอบสำเร็จ" + `${ + props.isShowExaminfo ? "เปิด" : "ปิดไม่" + }ให้ดาวน์โหลดใบสมัคร แสดงสถานที่สอบ และเลขประจำตัวสอบสำเร็จ` ); } catch (error) { messageError($q, error); @@ -529,14 +538,15 @@ watch( เปิดให้ดาวน์โหลดใบสมัคร แสดงสถานที่สอบ และเลขประจำตัวสอบ{{ isShowExaminfo ? "ปิดไม่" : "เปิด" }}ให้ดาวน์โหลดใบสมัคร + แสดงสถานที่สอบ และเลขประจำตัวสอบ diff --git a/src/modules/03_recruiting/views/02_qualify/manageDetail.vue b/src/modules/03_recruiting/views/02_qualify/manageDetail.vue index c6de803e0..46f60a5cd 100644 --- a/src/modules/03_recruiting/views/02_qualify/manageDetail.vue +++ b/src/modules/03_recruiting/views/02_qualify/manageDetail.vue @@ -33,6 +33,7 @@ const examId = ref(route.params.examId.toString()); const visible = ref(false); //เปิดปิด card สรุปข้อมูล const dataNum = ref([]); //จำนวนสรุปจำนวนข้อมูลหลัก const isFee = ref(false); +const isShowExaminfo = ref(false); const rows = ref([]); const visibleColumns = ref([ "no", @@ -283,6 +284,10 @@ async function fetchData(loading: boolean = true) { isShowExamInfo: r.isShowExamInfo, }); }); + + isShowExaminfo.value = data.data.some( + (item: any) => item.isShowExamInfo === true + ); } loading ?? hideLoader(); }) @@ -493,6 +498,7 @@ onMounted(async () => { @update:change-page="changePage" :max-page="maxPage" :is-fee="isFee" + :is-show-examinfo="isShowExaminfo" >