เพิม่ปุ่มลบ ประวัติการศึกษา
This commit is contained in:
parent
e7198525a2
commit
6b78719b59
16 changed files with 432 additions and 147 deletions
|
|
@ -18,18 +18,22 @@
|
|||
<q-tab-panels v-model="tab" animated class="bg-white">
|
||||
<!-- ข้อมูลส่วนบุคคล -->
|
||||
<q-tab-panel name="profile">
|
||||
<Profile :loader="loader" v-model:statusEdit="statusEditProfile" :step="step" />
|
||||
<Profile :loader="loader" v-model:statusEdit="statusEdit" :step="step" />
|
||||
</q-tab-panel>
|
||||
|
||||
<!-- ประวัติการศีกษา -->
|
||||
<q-tab-panel name="education"><Education :loader="loader" :step="step" /></q-tab-panel>
|
||||
<q-tab-panel name="education"
|
||||
><Education :loader="loader" v-model:statusEdit="statusEdit" :step="step"
|
||||
/></q-tab-panel>
|
||||
|
||||
<!-- ประวัติการทำงาน/ฝึกงาน -->
|
||||
<q-tab-panel name="career"><Career :loader="loader" :step="step" /></q-tab-panel>
|
||||
<q-tab-panel name="career"
|
||||
><Career :loader="loader" v-model:statusEdit="statusEdit" :step="step"
|
||||
/></q-tab-panel>
|
||||
|
||||
<!-- ไฟล์ -->
|
||||
<q-tab-panel name="document">
|
||||
<Document :loader="loader" v-model:statusEdit="statusEditDocument" :step="step" />
|
||||
<Document :loader="loader" v-model:statusEdit="statusEdit" :step="step" />
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
|
||||
|
|
@ -37,17 +41,34 @@
|
|||
<q-checkbox
|
||||
v-model="acceptTermOfUse"
|
||||
:disable="step !== 2"
|
||||
v-if="step !== 2 || tab == 'document'"
|
||||
label="ข้าพเจ้ารับรองว่า ข้าพเจ้ามีคุณสมบัติครบถ้วนตามประกาศรับสมัคร ข้อความข้างต้นตรงตามความจริงทุกประการ"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="row justify-center q-pa-md">
|
||||
<q-btn
|
||||
color="primary"
|
||||
class="q-ml-md"
|
||||
label="กลับ"
|
||||
@click="clickPreview(tab)"
|
||||
v-if="step === 2 && (tab == 'education' || tab == 'career' || tab == 'document')"
|
||||
icon="mdi-chevron-left"
|
||||
/>
|
||||
<q-btn
|
||||
color="primary"
|
||||
class="q-ml-md"
|
||||
label="ต่อไป"
|
||||
@click="clickNext(tab)"
|
||||
v-if="step === 2 && (tab == 'profile' || tab == 'education' || tab == 'career')"
|
||||
icon-right="mdi-chevron-right"
|
||||
/>
|
||||
<q-btn
|
||||
color="primary"
|
||||
class="q-ml-md"
|
||||
label="สมัครสอบ"
|
||||
@click="okModalComfirm"
|
||||
v-if="step === 2"
|
||||
v-if="step === 2 && tab == 'document'"
|
||||
:disable="!acceptTermOfUse"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -90,8 +111,7 @@ const props = defineProps({
|
|||
const tab = ref<string>('profile')
|
||||
const tabRaw = ref<string>('profile')
|
||||
const loader = ref<boolean>(false)
|
||||
const statusEditProfile = ref<boolean>(false)
|
||||
const statusEditDocument = ref<boolean>(false)
|
||||
const statusEdit = ref<boolean>(false)
|
||||
const acceptTermOfUse = ref<boolean>(false)
|
||||
const modalComfirm = ref<boolean>(false)
|
||||
const modalComfirmTittle = ref<string>('ยืนยันการสมัครสอบ?')
|
||||
|
|
@ -107,7 +127,7 @@ onMounted(async () => {
|
|||
})
|
||||
|
||||
const okModalComfirm = () => {
|
||||
if (statusEditProfile.value == true || statusEditDocument.value == true) {
|
||||
if (statusEdit.value == true) {
|
||||
modalNoEditTittle.value = 'ไม่สามารถสมัครสอบได้?'
|
||||
modalNoEditDetail.value = 'มีข้อมูลที่ยังไม่ถูกบันทึกข้อมูล'
|
||||
modalNoEdit.value = true
|
||||
|
|
@ -128,8 +148,39 @@ const applyCandidate = () => {
|
|||
props.fetchStep()
|
||||
}
|
||||
|
||||
const clickPreview = (val: string) => {
|
||||
console.log(val)
|
||||
switch (val) {
|
||||
case 'profile':
|
||||
return (tab.value = 'profile')
|
||||
case 'education':
|
||||
return (tab.value = 'profile')
|
||||
case 'career':
|
||||
return (tab.value = 'education')
|
||||
case 'document':
|
||||
return (tab.value = 'career')
|
||||
default:
|
||||
return (tab.value = 'profile')
|
||||
}
|
||||
}
|
||||
|
||||
const clickNext = (val: string) => {
|
||||
switch (val) {
|
||||
case 'profile':
|
||||
return (tab.value = 'education')
|
||||
case 'education':
|
||||
return (tab.value = 'career')
|
||||
case 'career':
|
||||
return (tab.value = 'document')
|
||||
case 'document':
|
||||
return (tab.value = 'profile')
|
||||
default:
|
||||
return (tab.value = 'profile')
|
||||
}
|
||||
}
|
||||
|
||||
const changeTab = () => {
|
||||
if (statusEditProfile.value == true || statusEditDocument.value == true) {
|
||||
if (statusEdit.value == true) {
|
||||
modalNoEditTittle.value = 'ไม่สามารถเปลี่ยนแท็ปได้?'
|
||||
modalNoEditDetail.value = 'มีข้อมูลที่ยังไม่ถูกบันทึกข้อมูล'
|
||||
tab.value = tabRaw.value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue