This commit is contained in:
parent
7982bd9c97
commit
647c9d5b9f
13 changed files with 383 additions and 174 deletions
|
|
@ -13,7 +13,7 @@
|
||||||
:editData="editData"
|
:editData="editData"
|
||||||
/>
|
/>
|
||||||
<q-space />
|
<q-space />
|
||||||
<div class="items-center q-col-gutter-x-sm" style="display: flex">
|
<div class="items-center q-col-gutter-x-sm" style="display: flex" v-if="isShowfilter">
|
||||||
<!-- ค้นหาข้อความใน table -->
|
<!-- ค้นหาข้อความใน table -->
|
||||||
<q-input
|
<q-input
|
||||||
standout
|
standout
|
||||||
|
|
@ -118,8 +118,12 @@ const props = defineProps({
|
||||||
},
|
},
|
||||||
editData: {
|
editData: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
defualt: true,
|
default: true,
|
||||||
required: true
|
required: true
|
||||||
|
},
|
||||||
|
isShowfilter: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,7 @@ const fetchStatus = async () => {
|
||||||
.get(config.API.candidateCard(examId.value, positionId.value))
|
.get(config.API.candidateCard(examId.value, positionId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result
|
const data = res.data.result
|
||||||
fullName.value = data.prefix + data.firstName + ' ' + data.lastName
|
fullName.value = data.prefix ? data.prefix : '' + data.firstName + ' ' + data.lastName
|
||||||
examNumber.value = data.examIdenNumber
|
examNumber.value = data.examIdenNumber
|
||||||
citizenId.value = data.citizenId
|
citizenId.value = data.citizenId
|
||||||
examSeat.value = data.seatNumber
|
examSeat.value = data.seatNumber
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
<ExamCard :isSubmit="isSubmit" @updateIsSubmit="updateIsSubmit" />
|
<ExamCard :isSubmit="isSubmit" @updateIsSubmit="updateIsSubmit" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<q-dialog v-model="dialog" persistent>
|
<!-- <q-dialog v-model="dialog" persistent>
|
||||||
<q-card>
|
<q-card>
|
||||||
<q-card-section class="row items-center q-pa-sm">
|
<q-card-section class="row items-center q-pa-sm">
|
||||||
<div class="text-bold">แบบสอบถามความพึงพอใจ</div>
|
<div class="text-bold">แบบสอบถามความพึงพอใจ</div>
|
||||||
|
|
@ -80,7 +80,7 @@
|
||||||
<q-btn label="ส่งแบบสอบถาม" class="full-width" color="blue-5" @click="sendRating" />
|
<q-btn label="ส่งแบบสอบถาม" class="full-width" color="blue-5" @click="sendRating" />
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog> -->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|
@ -124,7 +124,7 @@ const scoreSumFull = ref<number | null>(null)
|
||||||
const scoreSum = ref<number | null>(null)
|
const scoreSum = ref<number | null>(null)
|
||||||
const examResultinscore = ref<string>('')
|
const examResultinscore = ref<string>('')
|
||||||
const avatar = ref<string>('')
|
const avatar = ref<string>('')
|
||||||
const dialog = ref<boolean>(false)
|
// const dialog = ref<boolean>(false)
|
||||||
const rating = ref<number>(5)
|
const rating = ref<number>(5)
|
||||||
const text = ref<string>('')
|
const text = ref<string>('')
|
||||||
const isSubmit = ref<boolean>(false)
|
const isSubmit = ref<boolean>(false)
|
||||||
|
|
@ -158,7 +158,7 @@ const fetchStatus = async () => {
|
||||||
scoreC.value = data.pointC
|
scoreC.value = data.pointC
|
||||||
examResultinscore.value = data.pass
|
examResultinscore.value = data.pass
|
||||||
avatar.value = data.avatar
|
avatar.value = data.avatar
|
||||||
if (data.reviewPoint == null) dialog.value = true
|
// if (data.reviewPoint == null) dialog.value = true
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e)
|
messageError($q, e)
|
||||||
|
|
@ -183,7 +183,7 @@ const sendRating = async () => {
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false)
|
loaderPage(false)
|
||||||
dialog.value = false
|
// dialog.value = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -186,6 +186,8 @@ const dialogClose = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const dialogOpen = () => {
|
const dialogOpen = () => {
|
||||||
|
console.log(defaultInformation.value)
|
||||||
|
|
||||||
dialog.value = true
|
dialog.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -257,8 +259,8 @@ const saveData = async () => {
|
||||||
loaderPage(true)
|
loaderPage(true)
|
||||||
await http
|
await http
|
||||||
.post(config.API.candidateId(examId.value, positionId.value), {
|
.post(config.API.candidateId(examId.value, positionId.value), {
|
||||||
prefixId: defaultInformation.value.prefixId,
|
// prefixId: defaultInformation.value.prefixId,
|
||||||
prefixName: defaultInformation.value.prefixId,
|
prefixName: defaultInformation.value.prefix,
|
||||||
lastName: defaultInformation.value.lastname,
|
lastName: defaultInformation.value.lastname,
|
||||||
dateOfBirth:
|
dateOfBirth:
|
||||||
defaultInformation.value.birthDate == null
|
defaultInformation.value.birthDate == null
|
||||||
|
|
@ -266,7 +268,8 @@ const saveData = async () => {
|
||||||
: dateToISO(defaultInformation.value.birthDate),
|
: dateToISO(defaultInformation.value.birthDate),
|
||||||
citizenId: defaultInformation.value.cardid,
|
citizenId: defaultInformation.value.cardid,
|
||||||
firstName: defaultInformation.value.firstname,
|
firstName: defaultInformation.value.firstname,
|
||||||
religionId: defaultInformation.value.religionId,
|
// religionId: defaultInformation.value.religionId,
|
||||||
|
religionName: defaultInformation.value.religionName,
|
||||||
nationality: defaultInformation.value.nationality,
|
nationality: defaultInformation.value.nationality,
|
||||||
email: defaultInformation.value.email,
|
email: defaultInformation.value.email,
|
||||||
mobilePhone: defaultInformation.value.phone,
|
mobilePhone: defaultInformation.value.phone,
|
||||||
|
|
@ -307,7 +310,8 @@ const saveData = async () => {
|
||||||
educationScores: defaultEducation.value.educationScores,
|
educationScores: defaultEducation.value.educationScores,
|
||||||
educationLevelHighId: defaultEducation.value.educationLevelHighId,
|
educationLevelHighId: defaultEducation.value.educationLevelHighId,
|
||||||
|
|
||||||
contactprefixId: defaultContact.value.contactprefixId,
|
// contactprefixId: defaultContact.value.contactprefixId,
|
||||||
|
contactprefixName: defaultContact.value.contactprefixName,
|
||||||
contactfirstname: defaultContact.value.contactfirstname,
|
contactfirstname: defaultContact.value.contactfirstname,
|
||||||
contactlastname: defaultContact.value.contactlastname,
|
contactlastname: defaultContact.value.contactlastname,
|
||||||
contactrelations: defaultContact.value.contactrelations,
|
contactrelations: defaultContact.value.contactrelations,
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@
|
||||||
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
||||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือก ตำบล / แขวง'}`]"
|
:rules="[(val) => !!val || `${'กรุณาเลือก แขวง / ตำบล'}`]"
|
||||||
:outlined="status == 'register' || status == 'rejectRegister'"
|
:outlined="status == 'register' || status == 'rejectRegister'"
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
|
@ -78,7 +78,7 @@
|
||||||
option-label="name"
|
option-label="name"
|
||||||
:options="subdistrictOptions"
|
:options="subdistrictOptions"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
:label="`${'ตำบล / แขวง'}`"
|
:label="`${'แขวง / ตำบล'}`"
|
||||||
@update:model-value="(value) => selectSubDistrict(value, '1')"
|
@update:model-value="(value) => selectSubDistrict(value, '1')"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -180,7 +180,7 @@
|
||||||
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
||||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือก ตำบล / แขวง'}`]"
|
:rules="[(val) => !!val || `${'กรุณาเลือก แขวง / ตำบล'}`]"
|
||||||
:outlined="status == 'register' || status == 'rejectRegister'"
|
:outlined="status == 'register' || status == 'rejectRegister'"
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
|
|
@ -190,7 +190,7 @@
|
||||||
option-label="name"
|
option-label="name"
|
||||||
:options="subdistrictCOptions"
|
:options="subdistrictCOptions"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
:label="`${'ตำบล / แขวง'}`"
|
:label="`${'แขวง / ตำบล'}`"
|
||||||
@update:model-value="(value) => selectSubDistrict(value, '2')"
|
@update:model-value="(value) => selectSubDistrict(value, '2')"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@
|
||||||
:editData="status == 'register' || status == 'rejectRegister'"
|
:editData="status == 'register' || status == 'rejectRegister'"
|
||||||
name="ประวัติการทำงาน (ตั้งแต่เริ่มปฏิบัติงานกับกรุงเทพมหานคร - ปัจจุบัน)"
|
name="ประวัติการทำงาน (ตั้งแต่เริ่มปฏิบัติงานกับกรุงเทพมหานคร - ปัจจุบัน)"
|
||||||
icon="mdi-briefcase"
|
icon="mdi-briefcase"
|
||||||
|
:is-showfilter="false"
|
||||||
>
|
>
|
||||||
<template #columns="props">
|
<template #columns="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
|
|
@ -80,8 +81,8 @@
|
||||||
:readonly="!edit"
|
:readonly="!edit"
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
v-model="position"
|
v-model="position"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/ลักษณะงาน'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง'}`]"
|
||||||
:label="`${'ตำแหน่ง/ลักษณะงาน'}`"
|
:label="`${'ตำแหน่ง'}`"
|
||||||
@update:modelValue="clickEditRowPosition"
|
@update:modelValue="clickEditRowPosition"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,17 @@
|
||||||
<!-- card บุคคลที่สามารถติดต่อได้ -->
|
<!-- card บุคคลที่สามารถติดต่อได้ -->
|
||||||
<template>
|
<template>
|
||||||
<HeaderTop
|
<HeaderTop
|
||||||
v-model:edit="edit"
|
v-model:edit="edit"
|
||||||
header="บุคคลที่สามารถติดต่อได้"
|
header="บุคคลที่สามารถติดต่อได้"
|
||||||
icon="mdi-account-circle"
|
icon="mdi-account-circle"
|
||||||
:addData="true"
|
:addData="true"
|
||||||
:editOnly="false"
|
:editOnly="false"
|
||||||
:editData="false"
|
:editData="false"
|
||||||
/>
|
/>
|
||||||
<q-form ref="myform">
|
<q-form ref="myform">
|
||||||
<div class="row col-12 items-center q-col-gutter-x-sm q-col-gutter-y-xs">
|
<div class="row col-12 items-center q-col-gutter-x-sm q-col-gutter-y-xs">
|
||||||
<div class="col-xs-12 col-sm-3 col-md-2">
|
<div class="col-xs-12 col-sm-3 col-md-2">
|
||||||
<q-select
|
<!-- <q-select
|
||||||
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
||||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||||
|
|
@ -26,71 +26,88 @@
|
||||||
:options="prefixOptions"
|
:options="prefixOptions"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
:label="`${'คำนำหน้า'}`"
|
:label="`${'คำนำหน้า'}`"
|
||||||
/>
|
/> -->
|
||||||
</div>
|
<q-select
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
||||||
<q-input
|
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||||
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||||
:outlined="status == 'register' || status == 'rejectRegister'"
|
:rules="[(val) => !!val || `${'กรุณาเลือก คำนำหน้า'}`]"
|
||||||
dense
|
:outlined="status == 'register' || status == 'rejectRegister'"
|
||||||
lazy-rules
|
dense
|
||||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
lazy-rules
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
v-model="defaultContact.contactprefixName"
|
||||||
v-model="defaultContact.contactfirstname"
|
:label="`${'คำนำหน้า'}`"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอก ชื่อ'}`]"
|
:options="filteredPrefixOptions"
|
||||||
:label="`${'ชื่อ'}`"
|
use-input
|
||||||
/>
|
fill-input
|
||||||
</div>
|
input-debounce="0"
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
@filter="filterPrefix"
|
||||||
<q-input
|
@input-value="setModel"
|
||||||
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
hide-selected
|
||||||
:outlined="status == 'register' || status == 'rejectRegister'"
|
hide-dropdown-icon
|
||||||
dense
|
/>
|
||||||
lazy-rules
|
</div>
|
||||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
<q-input
|
||||||
v-model="defaultContact.contactlastname"
|
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอก นามสกุล'}`]"
|
:outlined="status == 'register' || status == 'rejectRegister'"
|
||||||
:label="`${'นามสกุล'}`"
|
dense
|
||||||
/>
|
lazy-rules
|
||||||
</div>
|
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||||
<div class="col-xs-12 col-sm-3 col-md-4">
|
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||||
<q-input
|
v-model="defaultContact.contactfirstname"
|
||||||
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
:rules="[(val) => !!val || `${'กรุณากรอก ชื่อ'}`]"
|
||||||
:outlined="status == 'register' || status == 'rejectRegister'"
|
:label="`${'ชื่อ'}`"
|
||||||
dense
|
/>
|
||||||
lazy-rules
|
</div>
|
||||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
<q-input
|
||||||
v-model="defaultContact.contactrelations"
|
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกความสัมพันธ์'}`]"
|
:outlined="status == 'register' || status == 'rejectRegister'"
|
||||||
:label="`${'เกี่ยวข้องเป็น'}`"
|
dense
|
||||||
/>
|
lazy-rules
|
||||||
</div>
|
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||||
<div class="col-xs-12 col-sm-3 col-md-4">
|
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||||
<q-input
|
v-model="defaultContact.contactlastname"
|
||||||
:outlined="status == 'register' || status == 'rejectRegister'"
|
:rules="[(val) => !!val || `${'กรุณากรอก นามสกุล'}`]"
|
||||||
dense
|
:label="`${'นามสกุล'}`"
|
||||||
:counter="status == 'register' || status == 'rejectRegister' ? true : false"
|
/>
|
||||||
lazy-rules
|
</div>
|
||||||
type="tel"
|
<div class="col-xs-12 col-sm-3 col-md-4">
|
||||||
mask="##########"
|
<q-input
|
||||||
maxlength="10"
|
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
||||||
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
:outlined="status == 'register' || status == 'rejectRegister'"
|
||||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
dense
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
lazy-rules
|
||||||
v-model="defaultContact.contacttel"
|
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||||
:label="`${'โทรศัพท์'}`"
|
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||||
:rules="[
|
v-model="defaultContact.contactrelations"
|
||||||
(val) => !!val || '* กรุณากรอกข้อมูลหมายเลขโทรศัพท์',
|
:rules="[(val) => !!val || `${'กรุณากรอกความสัมพันธ์'}`]"
|
||||||
(val) =>
|
:label="`${'เกี่ยวข้องเป็น'}`"
|
||||||
(val.length >= 9 && val.length <= 10 && val.startsWith('0')) ||
|
/>
|
||||||
'กรุณากรอกข้อมูลหมายเลขโทรศัพท์ให้ถูกต้อง'
|
</div>
|
||||||
]"
|
<div class="col-xs-12 col-sm-3 col-md-4">
|
||||||
/>
|
<q-input
|
||||||
</div>
|
:outlined="status == 'register' || status == 'rejectRegister'"
|
||||||
</div>
|
dense
|
||||||
</q-form>
|
lazy-rules
|
||||||
|
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
||||||
|
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||||
|
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||||
|
v-model="defaultContact.contacttel"
|
||||||
|
:label="`${'โทรศัพท์'}`"
|
||||||
|
:rules="[(val) => !!val || '* กรุณากรอกข้อมูลหมายเลขโทรศัพท์']"
|
||||||
|
/>
|
||||||
|
<!-- (val) =>
|
||||||
|
(val.length >= 9 && val.length <= 10 && val.startsWith('0')) ||
|
||||||
|
'กรุณากรอกข้อมูลหมายเลขโทรศัพท์ให้ถูกต้อง' -->
|
||||||
|
<!-- type="tel" -->
|
||||||
|
<!-- mask="##########" -->
|
||||||
|
<!-- maxlength="10" -->
|
||||||
|
<!-- :counter="status == 'register' || status == 'rejectRegister' ? true : false" -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-form>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, watch, PropType } from 'vue'
|
import { ref, onMounted, watch, PropType } from 'vue'
|
||||||
|
|
@ -106,18 +123,18 @@ import HeaderTop from '@/components/top.vue'
|
||||||
import { DataOption } from '../../interface/index/Main'
|
import { DataOption } from '../../interface/index/Main'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
status: {
|
status: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
prefixOptions: {
|
prefixOptions: {
|
||||||
type: Array as PropType<DataOption[]>,
|
type: Array as PropType<DataOption[]>,
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const emit = defineEmits(['update:form'])
|
const emit = defineEmits(['update:form'])
|
||||||
|
|
||||||
|
|
@ -133,43 +150,63 @@ const examId = ref<string>(route.params.id.toString())
|
||||||
const positionId = ref<string>(route.params.positionId.toString())
|
const positionId = ref<string>(route.params.positionId.toString())
|
||||||
|
|
||||||
watch(myform, async (count: any, prevCount: any) => {
|
watch(myform, async (count: any, prevCount: any) => {
|
||||||
emit('update:form', count)
|
emit('update:form', count)
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(defaultContact, async (count: Contact, prevCount: Contact) => {
|
watch(defaultContact, async (count: Contact, prevCount: Contact) => {
|
||||||
await changeData('contact', count)
|
await changeData('contact', count)
|
||||||
})
|
})
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fetchData()
|
await fetchData()
|
||||||
})
|
})
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true)
|
loaderPage(true)
|
||||||
await http
|
await http
|
||||||
.get(config.API.candidateContact(examId.value, positionId.value))
|
.get(config.API.candidateContact(examId.value, positionId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result
|
const data = res.data.result
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
defaultContact.value.contactprefixId = data.contactPrefixId
|
defaultContact.value.contactprefixId = data.contactPrefixId
|
||||||
defaultContact.value.contactfirstname = data.contactFirstname
|
defaultContact.value.contactfirstname = data.contactFirstname
|
||||||
defaultContact.value.contactlastname = data.contactLastname
|
defaultContact.value.contactlastname = data.contactLastname
|
||||||
defaultContact.value.contactrelations = data.contactRelations
|
defaultContact.value.contactrelations = data.contactRelations
|
||||||
defaultContact.value.contacttel = data.contactTel
|
defaultContact.value.contacttel = data.contactTel
|
||||||
}
|
defaultContact.value.contactprefixName = data.contactPrefixName
|
||||||
})
|
}
|
||||||
.catch((e) => {
|
})
|
||||||
// messageError($q, e)
|
.catch((e) => {
|
||||||
})
|
// messageError($q, e)
|
||||||
.finally(() => {
|
})
|
||||||
loaderPage(false)
|
.finally(() => {
|
||||||
})
|
loaderPage(false)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const filteredPrefixOptions = ref<string[]>([])
|
||||||
|
|
||||||
|
const filterPrefix = (val: string, update: (fn: () => void) => void) => {
|
||||||
|
update(() => {
|
||||||
|
if (val === '') {
|
||||||
|
filteredPrefixOptions.value = []
|
||||||
|
} else {
|
||||||
|
const needle = val.toLowerCase()
|
||||||
|
filteredPrefixOptions.value = props.prefixOptions
|
||||||
|
.filter((v) => v.name.toLowerCase().indexOf(needle) > -1)
|
||||||
|
.map((v) => v.name)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const setModel = (val: string) => {
|
||||||
|
defaultContact.value.contactprefixName = val
|
||||||
}
|
}
|
||||||
|
|
||||||
const getClass = (val: boolean) => {
|
const getClass = (val: boolean) => {
|
||||||
return {
|
return {
|
||||||
'full-width inputgreen cursor-pointer': val,
|
'full-width inputgreen cursor-pointer': val,
|
||||||
'full-width cursor-pointer': !val
|
'full-width cursor-pointer': !val
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@
|
||||||
autoApply
|
autoApply
|
||||||
:enableTimePicker="false"
|
:enableTimePicker="false"
|
||||||
week-start="0"
|
week-start="0"
|
||||||
:max-date="new Date()"
|
:max-date="dateCondition"
|
||||||
:disabled="!(status == 'register' || status == 'rejectRegister')"
|
:disabled="!(status == 'register' || status == 'rejectRegister')"
|
||||||
>
|
>
|
||||||
<template #year="{ year }">
|
<template #year="{ year }">
|
||||||
|
|
@ -176,7 +176,7 @@
|
||||||
</q-form>
|
</q-form>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, watch, PropType } from 'vue'
|
import { ref, onMounted, watch, PropType, computed } from 'vue'
|
||||||
import http from '@/plugins/http'
|
import http from '@/plugins/http'
|
||||||
import config from '@/app.config'
|
import config from '@/app.config'
|
||||||
import type { DataOption, Education } from '@/modules/01_exam/interface/index/Main'
|
import type { DataOption, Education } from '@/modules/01_exam/interface/index/Main'
|
||||||
|
|
@ -184,10 +184,13 @@ import { defaultEducation, changeData } from '@/modules/01_exam/interface/index/
|
||||||
import HeaderTop from '@/components/top.vue'
|
import HeaderTop from '@/components/top.vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
|
|
||||||
|
import { useExamDataStore } from '@/modules/01_exam/store'
|
||||||
import { useCounterMixin } from '@/stores/mixin'
|
import { useCounterMixin } from '@/stores/mixin'
|
||||||
import { useDataStore } from '@/stores/data'
|
import { useDataStore } from '@/stores/data'
|
||||||
import { useQuasar } from 'quasar'
|
import { useQuasar } from 'quasar'
|
||||||
|
|
||||||
|
const storeExam = useExamDataStore()
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
status: {
|
status: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|
@ -258,7 +261,7 @@ const fetchData = async () => {
|
||||||
checkInputName()
|
checkInputName()
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
// messageError($q, e)
|
// messageError($q, e)
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false)
|
loaderPage(false)
|
||||||
|
|
@ -282,4 +285,16 @@ const getClass = (val: boolean) => {
|
||||||
'full-width cursor-pointer': !val
|
'full-width cursor-pointer': !val
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const dateCondition = computed(() => {
|
||||||
|
const date =
|
||||||
|
storeExam.examInfo?.registerEndDate == null
|
||||||
|
? new Date()
|
||||||
|
: new Date(storeExam.examInfo.registerEndDate)
|
||||||
|
if (date === null) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
date.setFullYear(date.getFullYear() - (Number(storeExam.examInfo?.graduationYearLock) || 0))
|
||||||
|
return date
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@
|
||||||
/> -->
|
/> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-3 col-md-2">
|
<div class="col-xs-12 col-sm-3 col-md-2">
|
||||||
<q-select
|
<!-- <q-select
|
||||||
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
||||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||||
|
|
@ -83,6 +83,26 @@
|
||||||
option-value="id"
|
option-value="id"
|
||||||
:label="`${'คำนำหน้า'}`"
|
:label="`${'คำนำหน้า'}`"
|
||||||
@update:model-value="(value) => selectPrefix()"
|
@update:model-value="(value) => selectPrefix()"
|
||||||
|
/> -->
|
||||||
|
|
||||||
|
<q-select
|
||||||
|
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
||||||
|
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||||
|
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณาเลือก คำนำหน้า'}`]"
|
||||||
|
:outlined="status == 'register' || status == 'rejectRegister'"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
v-model="defaultInformation.prefix"
|
||||||
|
:label="`${'คำนำหน้า'}`"
|
||||||
|
:options="filteredPrefixOptions"
|
||||||
|
use-input
|
||||||
|
fill-input
|
||||||
|
input-debounce="0"
|
||||||
|
@filter="filterPrefix"
|
||||||
|
@input-value="setModel"
|
||||||
|
hide-selected
|
||||||
|
hide-dropdown-icon
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||||
|
|
@ -127,7 +147,7 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||||
<q-select
|
<!-- <q-select
|
||||||
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
||||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||||
|
|
@ -142,6 +162,25 @@
|
||||||
:options="religionOptions"
|
:options="religionOptions"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
:label="`${'ศาสนา'}`"
|
:label="`${'ศาสนา'}`"
|
||||||
|
/> -->
|
||||||
|
<q-select
|
||||||
|
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
||||||
|
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||||
|
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||||
|
:rules="[(val) => !!val || `${'กรุณาเลือก ศาสนา'}`]"
|
||||||
|
:outlined="status == 'register' || status == 'rejectRegister'"
|
||||||
|
dense
|
||||||
|
lazy-rules
|
||||||
|
v-model="defaultInformation.religionName"
|
||||||
|
:label="`${'ศาสนา'}`"
|
||||||
|
:options="filteredReligionOptions"
|
||||||
|
use-input
|
||||||
|
fill-input
|
||||||
|
input-debounce="0"
|
||||||
|
@filter="filterReligion"
|
||||||
|
@input-value="setModelReligionId"
|
||||||
|
hide-selected
|
||||||
|
hide-dropdown-icon
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||||
|
|
@ -214,23 +253,21 @@
|
||||||
<q-input
|
<q-input
|
||||||
:outlined="status == 'register' || status == 'rejectRegister'"
|
:outlined="status == 'register' || status == 'rejectRegister'"
|
||||||
dense
|
dense
|
||||||
:counter="status == 'register' || status == 'rejectRegister' ? true : false"
|
|
||||||
lazy-rules
|
lazy-rules
|
||||||
type="tel"
|
|
||||||
mask="##########"
|
|
||||||
maxlength="10"
|
|
||||||
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
||||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||||
v-model="defaultInformation.tel"
|
v-model="defaultInformation.tel"
|
||||||
:label="`${'โทรศัพท์'}`"
|
:label="`${'โทรศัพท์'}`"
|
||||||
:rules="[
|
:rules="[(val) => !!val || '* กรุณากรอกข้อมูลหมายเลขโทรศัพท์']"
|
||||||
(val) => !!val || '* กรุณากรอกข้อมูลหมายเลขโทรศัพท์',
|
|
||||||
(val) =>
|
|
||||||
(val.length >= 9 && val.length <= 10 && val.startsWith('0')) ||
|
|
||||||
'กรุณากรอกข้อมูลหมายเลขโทรศัพท์ให้ถูกต้อง'
|
|
||||||
]"
|
|
||||||
/>
|
/>
|
||||||
|
<!-- :counter="status == 'register' || status == 'rejectRegister' ? true : false" -->
|
||||||
|
<!-- type="tel" -->
|
||||||
|
<!-- mask="##########" -->
|
||||||
|
<!-- maxlength="10" -->
|
||||||
|
<!-- (val) =>
|
||||||
|
(val.length >= 9 && val.length <= 10 && val.startsWith('0')) ||
|
||||||
|
'กรุณากรอกข้อมูลหมายเลขโทรศัพท์ให้ถูกต้อง' -->
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="col-xs-12 col-sm-3 col-md-3">
|
<!-- <div class="col-xs-12 col-sm-3 col-md-3">
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -374,9 +411,10 @@
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, watch } from 'vue'
|
import { ref, onMounted, watch, computed } from 'vue'
|
||||||
import { useCounterMixin } from '@/stores/mixin'
|
import { useCounterMixin } from '@/stores/mixin'
|
||||||
import { useDataStore } from '@/stores/data'
|
import { useDataStore } from '@/stores/data'
|
||||||
|
import { useExamDataStore } from '@/modules/01_exam/store'
|
||||||
import http from '@/plugins/http'
|
import http from '@/plugins/http'
|
||||||
import config from '@/app.config'
|
import config from '@/app.config'
|
||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue'
|
||||||
|
|
@ -387,6 +425,8 @@ import type { Information, DataOption } from '@/modules/01_exam/interface/index/
|
||||||
import { defaultInformation, changeData } from '@/modules/01_exam/interface/index/Main'
|
import { defaultInformation, changeData } from '@/modules/01_exam/interface/index/Main'
|
||||||
import HeaderTop from '@/components/top.vue'
|
import HeaderTop from '@/components/top.vue'
|
||||||
|
|
||||||
|
const storeExam = useExamDataStore()
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
prefixOptions: {
|
prefixOptions: {
|
||||||
type: Array as PropType<DataOption[]>,
|
type: Array as PropType<DataOption[]>,
|
||||||
|
|
@ -427,7 +467,7 @@ const img = ref<string>('')
|
||||||
const fileProfile = ref<File[]>([])
|
const fileProfile = ref<File[]>([])
|
||||||
const cardid1 = ref<string | null>('')
|
const cardid1 = ref<string | null>('')
|
||||||
const cardid2 = ref<string | null>('')
|
const cardid2 = ref<string | null>('')
|
||||||
const registerEndDate = ref<Date>(new Date())
|
// const registerEndDate = ref<Date>(new Date())
|
||||||
|
|
||||||
const opNat = ref(['ไทย'])
|
const opNat = ref(['ไทย'])
|
||||||
const idModel = ref<boolean>(false)
|
const idModel = ref<boolean>(false)
|
||||||
|
|
@ -445,7 +485,7 @@ onMounted(async () => {
|
||||||
await fetchImgData()
|
await fetchImgData()
|
||||||
if (defaultInformation.value.provinceId != null)
|
if (defaultInformation.value.provinceId != null)
|
||||||
await fetchDistrict(defaultInformation.value.provinceId)
|
await fetchDistrict(defaultInformation.value.provinceId)
|
||||||
candidateCheck()
|
// candidateCheck()
|
||||||
})
|
})
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
|
|
@ -480,6 +520,8 @@ const fetchData = async () => {
|
||||||
defaultInformation.value.phone = data.mobilePhone
|
defaultInformation.value.phone = data.mobilePhone
|
||||||
defaultInformation.value.tel = data.telephone
|
defaultInformation.value.tel = data.telephone
|
||||||
defaultInformation.value.knowledge = data.knowledge
|
defaultInformation.value.knowledge = data.knowledge
|
||||||
|
defaultInformation.value.prefix = data.prefixName
|
||||||
|
defaultInformation.value.religionName = data.religionName
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
defaultInformation.value.email =
|
defaultInformation.value.email =
|
||||||
|
|
@ -536,22 +578,28 @@ const selectBirthDate = async () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const candidateCheck = async () => {
|
const registerEndDate = computed<Date>(() => {
|
||||||
loaderPage(true)
|
return storeExam.examInfo?.registerEndDate == null
|
||||||
await http
|
? new Date()
|
||||||
.get(config.API.candidateCheckCreate(examId.value, positionId.value))
|
: new Date(storeExam.examInfo?.registerEndDate)
|
||||||
.then(async (res) => {
|
})
|
||||||
const data = res.data.result
|
|
||||||
registerEndDate.value =
|
// const candidateCheck = async () => {
|
||||||
data.registerEndDate == null ? new Date() : new Date(data.registerEndDate)
|
// loaderPage(true)
|
||||||
})
|
// await http
|
||||||
.catch((e) => {
|
// .get(config.API.candidateCheckCreate(examId.value, positionId.value))
|
||||||
messageError($q, e)
|
// .then(async (res) => {
|
||||||
})
|
// const data = res.data.result
|
||||||
.finally(() => {
|
// registerEndDate.value =
|
||||||
loaderPage(false)
|
// data.registerEndDate == null ? new Date() : new Date(data.registerEndDate)
|
||||||
})
|
// })
|
||||||
}
|
// .catch((e) => {
|
||||||
|
// messageError($q, e)
|
||||||
|
// })
|
||||||
|
// .finally(() => {
|
||||||
|
// loaderPage(false)
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
const fetchImgData = async () => {
|
const fetchImgData = async () => {
|
||||||
loaderPage(true)
|
loaderPage(true)
|
||||||
|
|
@ -636,6 +684,44 @@ function getMaxBirthDate(registerEndDate: Date | string): Date {
|
||||||
date.setFullYear(date.getFullYear() - 18)
|
date.setFullYear(date.getFullYear() - 18)
|
||||||
return date
|
return date
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const filteredPrefixOptions = ref<string[]>([])
|
||||||
|
|
||||||
|
const filterPrefix = (val: string, update: (fn: () => void) => void) => {
|
||||||
|
update(() => {
|
||||||
|
if (val === '') {
|
||||||
|
filteredPrefixOptions.value = []
|
||||||
|
} else {
|
||||||
|
const needle = val.toLowerCase()
|
||||||
|
filteredPrefixOptions.value = props.prefixOptions
|
||||||
|
.filter((v) => v.name.toLowerCase().indexOf(needle) > -1)
|
||||||
|
.map((v) => v.name)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const setModel = (val: string) => {
|
||||||
|
defaultInformation.value.prefix = val
|
||||||
|
}
|
||||||
|
|
||||||
|
const filteredReligionOptions = ref<string[]>([])
|
||||||
|
|
||||||
|
const filterReligion = (val: string, update: (fn: () => void) => void) => {
|
||||||
|
update(() => {
|
||||||
|
if (val === '') {
|
||||||
|
filteredReligionOptions.value = []
|
||||||
|
} else {
|
||||||
|
const needle = val.toLowerCase()
|
||||||
|
filteredReligionOptions.value = props.religionOptions
|
||||||
|
.filter((v) => v.name.toLowerCase().indexOf(needle) > -1)
|
||||||
|
.map((v) => v.name)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const setModelReligionId = (val: string) => {
|
||||||
|
defaultInformation.value.religionName = val
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@ import http from '@/plugins/http'
|
||||||
import config from '@/app.config'
|
import config from '@/app.config'
|
||||||
import { useCounterMixin } from '@/stores/mixin'
|
import { useCounterMixin } from '@/stores/mixin'
|
||||||
import { useDataStore } from '@/stores/data'
|
import { useDataStore } from '@/stores/data'
|
||||||
|
import { useExamDataStore } from '@/modules/01_exam/store'
|
||||||
import { useQuasar } from 'quasar'
|
import { useQuasar } from 'quasar'
|
||||||
import type { DataOption } from '@/modules/01_exam/interface/index/Main'
|
import type { DataOption } from '@/modules/01_exam/interface/index/Main'
|
||||||
import Information from '@/modules/01_exam/components/Form/Information.vue'
|
import Information from '@/modules/01_exam/components/Form/Information.vue'
|
||||||
|
|
@ -102,6 +103,7 @@ const emit = defineEmits([
|
||||||
|
|
||||||
const $q = useQuasar()
|
const $q = useQuasar()
|
||||||
const dataStore = useDataStore()
|
const dataStore = useDataStore()
|
||||||
|
const examStore = useExamDataStore()
|
||||||
const { loaderPage } = dataStore
|
const { loaderPage } = dataStore
|
||||||
const mixin = useCounterMixin()
|
const mixin = useCounterMixin()
|
||||||
const { messageError } = mixin
|
const { messageError } = mixin
|
||||||
|
|
@ -164,7 +166,17 @@ const fetchPerson = async () => {
|
||||||
provinceOptions.value = optionProvince
|
provinceOptions.value = optionProvince
|
||||||
|
|
||||||
let optionEducationLevel: DataOption[] = []
|
let optionEducationLevel: DataOption[] = []
|
||||||
data.educationLevels.map((r: any) => {
|
let filterEducationLevels = data.educationLevels
|
||||||
|
|
||||||
|
if (examStore.educationLevel === 'BACHELOR') {
|
||||||
|
filterEducationLevels = data.educationLevels.filter((level: any) => level.rank === 7)
|
||||||
|
} else if (examStore.educationLevel === 'LOW_BACHELOR') {
|
||||||
|
filterEducationLevels = data.educationLevels.filter(
|
||||||
|
(level: any) => level.rank >= 4 && level.rank <= 6
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
filterEducationLevels.map((r: any) => {
|
||||||
optionEducationLevel.push({ id: r.id.toString(), name: r.name.toString() })
|
optionEducationLevel.push({ id: r.id.toString(), name: r.name.toString() })
|
||||||
})
|
})
|
||||||
educationLevelOptions.value = optionEducationLevel
|
educationLevelOptions.value = optionEducationLevel
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,9 @@ interface Information {
|
||||||
statusId: string | null
|
statusId: string | null
|
||||||
knowledge: string | null
|
knowledge: string | null
|
||||||
profileImg: string | null
|
profileImg: string | null
|
||||||
|
contactprefixName: string | null
|
||||||
|
prefixName: string | null
|
||||||
|
religionName: string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Family {
|
interface Family {
|
||||||
|
|
@ -77,6 +80,7 @@ interface Contact {
|
||||||
contactlastname: string | null
|
contactlastname: string | null
|
||||||
contactrelations: string | null
|
contactrelations: string | null
|
||||||
contacttel: string | null
|
contacttel: string | null
|
||||||
|
contactprefixName: string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Education {
|
interface Education {
|
||||||
|
|
@ -170,7 +174,10 @@ const defaultInformation = ref<Information>({
|
||||||
districtId: null,
|
districtId: null,
|
||||||
provinceId: null,
|
provinceId: null,
|
||||||
statusId: null,
|
statusId: null,
|
||||||
profileImg: null
|
profileImg: null,
|
||||||
|
contactprefixName: null,
|
||||||
|
prefixName: null,
|
||||||
|
religionName: null
|
||||||
})
|
})
|
||||||
|
|
||||||
const defaultFamily = ref<Family>({
|
const defaultFamily = ref<Family>({
|
||||||
|
|
@ -210,7 +217,8 @@ const defaultContact = ref<Contact>({
|
||||||
contactfirstname: null,
|
contactfirstname: null,
|
||||||
contactlastname: null,
|
contactlastname: null,
|
||||||
contactrelations: null,
|
contactrelations: null,
|
||||||
contacttel: null
|
contacttel: null,
|
||||||
|
contactprefixName: null
|
||||||
})
|
})
|
||||||
|
|
||||||
const defaultEducation = ref<Education>({
|
const defaultEducation = ref<Education>({
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,30 @@ export const useExamDataStore = defineStore('exam', () => {
|
||||||
career: { columns: String[] }
|
career: { columns: String[] }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface DataExam {
|
||||||
|
bank: boolean
|
||||||
|
canRegister: boolean
|
||||||
|
consend: boolean
|
||||||
|
editorCondition: string
|
||||||
|
editorConfirm: string
|
||||||
|
payment: boolean
|
||||||
|
position: boolean
|
||||||
|
positionExam: boolean
|
||||||
|
registerEndDate: string
|
||||||
|
registerStartDate: string
|
||||||
|
status: string
|
||||||
|
graduationYearLock: number
|
||||||
|
}
|
||||||
|
|
||||||
const examData = ref<exam>({
|
const examData = ref<exam>({
|
||||||
main: { columns: [] },
|
main: { columns: [] },
|
||||||
education: { columns: [] },
|
education: { columns: [] },
|
||||||
career: { columns: [] }
|
career: { columns: [] }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const examInfo = ref<DataExam>()
|
||||||
|
const educationLevel = ref<string>('')
|
||||||
|
|
||||||
const consend = ref<boolean>(false)
|
const consend = ref<boolean>(false)
|
||||||
const status = ref<string>('')
|
const status = ref<string>('')
|
||||||
|
|
||||||
|
|
@ -37,6 +55,8 @@ export const useExamDataStore = defineStore('exam', () => {
|
||||||
changeExamColumns,
|
changeExamColumns,
|
||||||
consend,
|
consend,
|
||||||
status,
|
status,
|
||||||
changeStatus
|
changeStatus,
|
||||||
|
examInfo,
|
||||||
|
educationLevel
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -82,10 +82,30 @@
|
||||||
<q-card :style="$q.screen.gt.xs ? 'min-width: 30vw' : 'min-width: 80vw'" class="q-pa-sm">
|
<q-card :style="$q.screen.gt.xs ? 'min-width: 30vw' : 'min-width: 80vw'" class="q-pa-sm">
|
||||||
<q-card-section class="row items-center col-12">
|
<q-card-section class="row items-center col-12">
|
||||||
<div class="column col-12 text-center">
|
<div class="column col-12 text-center">
|
||||||
<div><q-icon name="mdi-alert-outline" size="50px" :color="isBeforeToday && timeout ? 'amber-7':'pink'" /></div>
|
<div>
|
||||||
|
<q-icon
|
||||||
|
name="mdi-alert-outline"
|
||||||
|
size="50px"
|
||||||
|
:color="isBeforeToday && timeout ? 'amber-7' : 'pink'"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div :class="isBeforeToday && timeout ? 'text-bold text-amber-7 text-subtitle1 q-mb-md':'text-bold text-pink text-subtitle1 q-mb-md'">{{isBeforeToday && timeout ? 'ยังไม่ถึงรอบรับสมัครสอบ':'หมดเขตรับสมัครสอบ'}} !</div>
|
<div
|
||||||
{{`ไม่สามารถทำรายการได้ ${isBeforeToday && timeout ? 'เนื่องจากยังไม่ถึงรอบรับสมัครสอบ':'เนื่องจากหมดเขตรับสมัครแล้ว'}`}}
|
:class="
|
||||||
|
isBeforeToday && timeout
|
||||||
|
? 'text-bold text-amber-7 text-subtitle1 q-mb-md'
|
||||||
|
: 'text-bold text-pink text-subtitle1 q-mb-md'
|
||||||
|
"
|
||||||
|
>
|
||||||
|
{{ isBeforeToday && timeout ? 'ยังไม่ถึงรอบรับสมัครสอบ' : 'หมดเขตรับสมัครสอบ' }} !
|
||||||
|
</div>
|
||||||
|
{{
|
||||||
|
`ไม่สามารถทำรายการได้ ${
|
||||||
|
isBeforeToday && timeout
|
||||||
|
? 'เนื่องจากยังไม่ถึงรอบรับสมัครสอบ'
|
||||||
|
: 'เนื่องจากหมดเขตรับสมัครแล้ว'
|
||||||
|
}`
|
||||||
|
}}
|
||||||
<!-- {{ dateThaiRange([registerEndDate, registerStartDate]) }} -->
|
<!-- {{ dateThaiRange([registerEndDate, registerStartDate]) }} -->
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
@ -149,6 +169,7 @@ const candidateCheck = async () => {
|
||||||
.get(config.API.candidateCheckCreate(examId.value, positionId.value))
|
.get(config.API.candidateCheckCreate(examId.value, positionId.value))
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result
|
const data = res.data.result
|
||||||
|
storeExam.examInfo = data
|
||||||
storeExam.consend = data.consend
|
storeExam.consend = data.consend
|
||||||
editorCondition.value = data.editorCondition
|
editorCondition.value = data.editorCondition
|
||||||
editorConfirm.value = data.editorConfirm
|
editorConfirm.value = data.editorConfirm
|
||||||
|
|
@ -262,6 +283,7 @@ const fetchPeriodExam = async () => {
|
||||||
yearly.value = data.year
|
yearly.value = data.year
|
||||||
position.value = data.position
|
position.value = data.position
|
||||||
positionLevel.value = data.positionLevel
|
positionLevel.value = data.positionLevel
|
||||||
|
storeExam.educationLevel = data.educationLevel || ''
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e)
|
messageError($q, e)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue