Compare commits
2 commits
cd6947bd7c
...
b1e292cefc
| Author | SHA1 | Date | |
|---|---|---|---|
| b1e292cefc | |||
| d5abc0ae1d |
1 changed files with 50 additions and 31 deletions
|
|
@ -95,8 +95,10 @@
|
||||||
/>
|
/>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
||||||
<q-card-section class="q-pt-none">
|
<q-separator />
|
||||||
<div class="col-12 q-pa-md">
|
|
||||||
|
<q-card-section>
|
||||||
|
<div class="col-12 q-pa-sm">
|
||||||
<div class="q-pt-xs row">
|
<div class="q-pt-xs row">
|
||||||
<div class="">ชื่อ :</div>
|
<div class="">ชื่อ :</div>
|
||||||
<div class="text-black text-bold q-pl-sm">
|
<div class="text-black text-bold q-pl-sm">
|
||||||
|
|
@ -112,9 +114,14 @@
|
||||||
<div class="">ตำแหน่งที่สมัคร :</div>
|
<div class="">ตำแหน่งที่สมัคร :</div>
|
||||||
<div class="text-black text-bold q-pl-sm">{{ position }}{{ positionLevel }}</div>
|
<div class="text-black text-bold q-pl-sm">{{ position }}{{ positionLevel }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="text-red q-mt-md q-px-sm text-cente">
|
||||||
|
***เมื่อส่งใบสมัครแล้วแก้ไขไม่ได้/สมัครใหม่ไม่ได้***
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
||||||
|
<q-separator />
|
||||||
|
|
||||||
<q-card-actions align="center">
|
<q-card-actions align="center">
|
||||||
<div class="col-12 row" align="center">
|
<div class="col-12 row" align="center">
|
||||||
<div class="col-6" align="center">
|
<div class="col-6" align="center">
|
||||||
|
|
@ -128,10 +135,9 @@
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog>
|
||||||
|
|
||||||
<q-dialog v-model="secondDialog" persistent transition-show="scale" transition-hide="scale">
|
<!-- <q-dialog v-model="secondDialog" persistent transition-show="scale" transition-hide="scale">
|
||||||
<q-card style="width: 400px">
|
<q-card style="width: 400px">
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
<!-- <div class="text-h6">เตือน</div> -->
|
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|
||||||
<q-card-section>
|
<q-card-section>
|
||||||
|
|
@ -156,7 +162,7 @@
|
||||||
</div>
|
</div>
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
</q-card>
|
</q-card>
|
||||||
</q-dialog>
|
</q-dialog> -->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|
@ -262,7 +268,7 @@ const dialogOpen = () => {
|
||||||
dialog.value = true
|
dialog.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
const okModalConfirm = () => {
|
const okModalConfirm = async () => {
|
||||||
if (statusEdit.value == true) {
|
if (statusEdit.value == true) {
|
||||||
modalError($q, 'ไม่สามารถสมัครสอบได้', 'มีข้อมูลที่ยังไม่ถูกบันทึกข้อมูล')
|
modalError($q, 'ไม่สามารถสมัครสอบได้', 'มีข้อมูลที่ยังไม่ถูกบันทึกข้อมูล')
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -286,17 +292,29 @@ const fetchStatus = async () => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const saveForm = async () => {
|
// ฟังก์ชั่นสำหรับส่งใบสมัคร
|
||||||
loaderPage(true)
|
const sendRegister = async () => {
|
||||||
await http
|
await http
|
||||||
.get(config.API.candidateRegister(examId.value, positionId.value))
|
.get(config.API.candidateRegister(examId.value, positionId.value))
|
||||||
.then(() => {})
|
.then(() => {
|
||||||
|
if (props.stepPayment) {
|
||||||
|
success($q, 'ส่งใบสมัครสำเร็จ')
|
||||||
|
}
|
||||||
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e)
|
messageError($q, e)
|
||||||
})
|
})
|
||||||
// .finally(async () => {
|
|
||||||
// // await props.fetchStep()
|
if (!props.stepPayment) {
|
||||||
// })
|
await http
|
||||||
|
.post(config.API.registerConfirm(examId.value, positionId.value))
|
||||||
|
.then(() => {
|
||||||
|
success($q, 'ส่งใบสมัครสำเร็จ')
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
messageError($q, e)
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const clickSave = async () => {
|
const clickSave = async () => {
|
||||||
|
|
@ -364,14 +382,15 @@ const saveData = async () => {
|
||||||
contacttel: defaultContact.value.contacttel
|
contacttel: defaultContact.value.contacttel
|
||||||
})
|
})
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
if (!props.stepPayment) {
|
// if (!props.stepPayment) {
|
||||||
secondDialog.value = true
|
// secondDialog.value = true
|
||||||
} else {
|
// } else {
|
||||||
success($q, 'บันทึกข้อมูลส่วนตัวสำเร็จ')
|
// success($q, 'บันทึกข้อมูลส่วนตัวสำเร็จ')
|
||||||
}
|
// }
|
||||||
await saveForm()
|
|
||||||
await props.fetchStep()
|
|
||||||
dialog.value = false
|
dialog.value = false
|
||||||
|
|
||||||
|
await sendRegister()
|
||||||
|
props.fetchStep()
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e)
|
messageError($q, e)
|
||||||
|
|
@ -446,18 +465,18 @@ const saveData = async () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function onSubmit() {
|
// async function onSubmit() {
|
||||||
try {
|
// try {
|
||||||
saveAuto.value = false
|
// saveAuto.value = false
|
||||||
await saveData()
|
// await saveData()
|
||||||
await http.post(config.API.registerConfirm(examId.value, positionId.value))
|
// await http.post(config.API.registerConfirm(examId.value, positionId.value))
|
||||||
success($q, 'ส่งใบสมัครสำเร็จ')
|
// success($q, 'ส่งใบสมัครสำเร็จ')
|
||||||
await props.fetchStep()
|
// await props.fetchStep()
|
||||||
// do something
|
// // do something
|
||||||
} catch (error) {
|
// } catch (error) {
|
||||||
console.error(error)
|
// console.error(error)
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped></style>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue