diff --git a/src/modules/03_recruiting/components/Education.vue b/src/modules/03_recruiting/components/Education.vue
index 9a545b3c9..898bdc7c5 100644
--- a/src/modules/03_recruiting/components/Education.vue
+++ b/src/modules/03_recruiting/components/Education.vue
@@ -27,9 +27,10 @@
v-model="defaultEducation.educationLevelExamId"
:rules="[(val) => !!val || `${'กรุณาเลือก วุฒิที่ใช้สมัครสอบ'}`]"
:label="`${'วุฒิที่ใช้สมัครสอบ'}`"
+ @update:model-value="(value) => checkInputName()"
/>
-
+
(true);
+const showEducationName = ref(true);
const myform = ref({});
const route = useRoute();
const candidateId = ref(route.params.candidateId.toString());
@@ -276,6 +278,17 @@ const fetchData = async () => {
});
};
+const checkInputName = () => {
+ showEducationName.value =
+ props.educationLevelOptions.filter(
+ (x) =>
+ x.id == defaultEducation.value.educationLevelExamId &&
+ (x.name == "ปริญญาตรี" || x.name == "ปริญญาโท" || x.name == "ปริญญาเอก")
+ ).length == 0
+ ? false
+ : true;
+};
+
const getClass = (val: boolean) => {
return {
"full-width inputgreen cursor-pointer": val,
diff --git a/src/modules/03_recruiting/components/Information.vue b/src/modules/03_recruiting/components/Information.vue
index 23526e63c..6f8b56e88 100644
--- a/src/modules/03_recruiting/components/Information.vue
+++ b/src/modules/03_recruiting/components/Information.vue
@@ -136,6 +136,7 @@
week-start="0"
:max-date="new Date()"
:disabled="!(status == 'checkRegister' || status == 'payment')"
+ @update:modelValue="selectBirthDate"
>
{{ year + 543 }}
@@ -214,6 +215,7 @@
:borderless="!(status == 'checkRegister' || status == 'payment')"
v-model="defaultInformation.tel"
:rules="[
+ (val) => !!val || `${'กรุณากรอก เบอร์โทร'}`,
(val) => val.length == 10 || `${'กรุณากรอก เบอร์โทร'}`,
(val) =>
/^[0-9]*$/.test(val) || `${'กรุณากรอกข้อมูลเบอร์โทรให้ถูกต้อง'}`,
@@ -440,7 +442,8 @@ const props = defineProps({
const $q = useQuasar();
const mixin = useCounterMixin();
-const { date2Thai, calAge, modalError, success } = mixin;
+const { date2Thai, calAge, modalError, success, notifyError, calAgeYear } =
+ mixin;
const districtOptions = ref([]);
const route = useRoute();
const candidateId = ref(route.params.candidateId.toString());
@@ -449,6 +452,7 @@ const myform = ref({});
const img = ref("");
const opNat = ref(["ไทย"]);
const fileProfile = ref([]);
+const registerEndDate = ref(new Date());
const { messageError, showLoader, hideLoader } = mixin;
@@ -577,6 +581,21 @@ const getClass = (val: boolean) => {
"full-width cursor-pointer": !val,
};
};
+const selectBirthDate = async () => {
+ // if (defaultInformation.value.birthDate != null) {
+ // if (
+ // calAgeYear(defaultInformation.value.birthDate, registerEndDate.value) < 18
+ // ) {
+ // defaultInformation.value.birthDate = null;
+ // notifyError($q, "อายุไม่ถึง18");
+ // } else if (
+ // calAgeYear(defaultInformation.value.birthDate, registerEndDate.value) > 60
+ // ) {
+ // defaultInformation.value.birthDate = null;
+ // notifyError($q, "อายุเกิน60");
+ // }
+ // }
+};