diff --git a/src/modules/03_recruiting/components/ExamFinished.vue b/src/modules/03_recruiting/components/ExamFinished.vue index bc824c871..437c0840d 100644 --- a/src/modules/03_recruiting/components/ExamFinished.vue +++ b/src/modules/03_recruiting/components/ExamFinished.vue @@ -193,7 +193,7 @@ const fetchCard = async () => { - + diff --git a/src/modules/03_recruiting/components/TableCandidate.vue b/src/modules/03_recruiting/components/TableCandidate.vue index 88697967d..d24baf50d 100644 --- a/src/modules/03_recruiting/components/TableCandidate.vue +++ b/src/modules/03_recruiting/components/TableCandidate.vue @@ -461,6 +461,7 @@ watch( +
ดาวน์โหลดไฟล์ - + (false); const checkDisability = ref(false); const announcementExam = ref(true); const round = ref(1); -const yearly = ref(calculateFiscalYear(new Date())); +const yearly = ref(new Date().getFullYear()); const nameRaw = ref(null); const roundRaw = ref(null); const yearlyRaw = ref(null); @@ -84,6 +83,7 @@ const datePayment = ref<[Date, Date] | null>(null); //วันที่จ่ const dateAnnouncement = ref<[Date, Date] | null>(null); //วันที่ประกาศ const dateAnnounce = ref(null); //วันประกาศผลสอบ const dateExam = ref(null); //วันที่สอบ +const graduationYearLock = ref(3); //ล็อกวันที่สำเร็จการศึกษา (ปี) const myFormPayment = ref(); const myFormPosition = ref(); const organizationShortName = ref(); @@ -150,6 +150,7 @@ const visibleColumnsPosition = ref([ "position", "level", "type", + "educational", "highDegree", ]); const columnsPosition = ref([ @@ -199,6 +200,18 @@ const columnsPosition = ref([ a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, + { + name: "educational", + align: "left", + label: "กำหนดขีดจำกัดวุฒิการศึกษา", + sortable: true, + field: "educational", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, + { name: "type", align: "left", @@ -242,6 +255,7 @@ async function fetchData() { }, code: r.code, highDegree: r.highDegree == true ? "1" : "0", + educationLevel: r.educationLevel, }); }); const bankData: ResponsePayment[] = []; @@ -276,7 +290,7 @@ async function fetchData() { dateExam.value = data.examDate != null ? new Date(data.examDate) : null; dateRegister.value = data.registerStartDate != null && data.registerEndDate != null - ? [new Date(data.registerStartDate), new Date(data.registerEndDate)] + ? [data.registerStartDate, data.registerEndDate] : null; if (data.fee == 0) { data.paymentStartDate = null; @@ -314,6 +328,7 @@ async function fetchData() { companyCode.value = data.companyCode; refNo1.value = data.refNo1; reason.value = data.reason; + graduationYearLock.value = data.graduationYearLock; }) .catch((e) => { messageError($q, e); @@ -405,6 +420,7 @@ function sendData() { typeName: r.type.name, code: r.code, highDegree: r.highDegree == "1" ? true : false, + educationLevel: r.educationLevel, }); }); if (fee.value == 0) { @@ -446,11 +462,11 @@ function sendData() { positionExam: positionData, registerEndDate: dateRegister.value != null - ? convertDateToAPI(dateRegister.value[1]) + ? convertDatetimeToAPI(dateRegister.value[1]) : null, registerStartDate: dateRegister.value != null - ? convertDateToAPI(dateRegister.value[0]) + ? convertDatetimeToAPI(dateRegister.value[0]) : null, round: round.value, year: yearly.value, @@ -459,6 +475,7 @@ function sendData() { companyCode: companyCode.value, refNo1: refNo1.value, reason: reason.value, + graduationYearLock: Number(graduationYearLock.value), }; return valueData; } @@ -475,7 +492,6 @@ async function addData() { const uploadDoc = await uploadDocData(); const uploadBarCode = await uploadBarCodes(); const uploadQrCode = await uploadQrCodes(); - hideLoader(); if (uploadImg && uploadDoc && uploadBarCode && uploadQrCode) { success($q, "บันทึกรอบคัดเลือกสำเร็จ"); @@ -484,9 +500,10 @@ async function addData() { }) .catch((e) => { messageError($q, e); - hideLoader(); }) - .finally(async () => {}); + .finally(async () => { + hideLoader(); + }); } /** @@ -502,20 +519,18 @@ async function editData(id: string) { const uploadDoc = await uploadDocData(); const uploadBarCode = await uploadBarCodes(); const uploadQrCode = await uploadQrCodes(); - hideLoader(); - - console.log(uploadImg, uploadDoc, uploadBarCode, uploadQrCode); if (uploadImg && uploadDoc && uploadBarCode && uploadQrCode) { success($q, "แก้ไขรอบคัดเลือกสำเร็จ"); - await clickBack(); + clickBack(); } }) .catch((e) => { messageError($q, e); - hideLoader(); }) - .finally(() => {}); + .finally(() => { + hideLoader(); + }); } /** @@ -842,6 +857,8 @@ function onUpdateHighDegree(val: string, index: string) { rowsPosition.value[index].position = null; rowsPosition.value[index].level = val === "0" ? optionPosLevel1.value[0] : optionPosLevel2.value[0]; + rowsPosition.value[index].educationLevel = + val === "0" ? "LOW_BACHELOR" : "BACHELOR"; } watch(fee, () => { @@ -1017,6 +1034,7 @@ onMounted(async () => { :readonly="checkRoutePermisson" :enableTimePicker="false" week-start="0" + hide-bottom-space >