diff --git a/src/api/exam/api.candidate.ts b/src/api/exam/api.candidate.ts index 018db96..521446a 100644 --- a/src/api/exam/api.candidate.ts +++ b/src/api/exam/api.candidate.ts @@ -4,5 +4,12 @@ const candidate = `${env.API_URI}/candidate/` export default { candidateInformation: (examId: string) => `${candidate}information/${examId}`, candidateAddress: (examId: string) => `${candidate}address/${examId}`, + candidateFamily: (examId: string) => `${candidate}family/${examId}`, + candidateOccupation: (examId: string) => `${candidate}occupation/${examId}`, + candidateEducation: (examId: string) => `${candidate}education/${examId}`, + candidateCareer: (examId: string) => `${candidate}career/${examId}`, + candidateCheckCreate: (examId: string) => `${candidate}check/${examId}`, + candidateRegister: (examId: string) => `${candidate}register/${examId}`, + candidatePayment: (examId: string) => `${candidate}payment/${examId}`, candidate } diff --git a/src/modules/01_exam/components/ExamForm.vue b/src/modules/01_exam/components/ExamForm.vue index 24df920..22a25f4 100644 --- a/src/modules/01_exam/components/ExamForm.vue +++ b/src/modules/01_exam/components/ExamForm.vue @@ -90,6 +90,8 @@ import Career from '@/modules/01_exam/components/Form/Career.vue' import Document from '@/modules/01_exam/components/Form/Document.vue' import { useQuasar } from 'quasar' import { useCounterMixin } from '@/stores/mixin' +import http from '@/plugins/http' +import config from '@/app.config' const props = defineProps({ fetchStep: { @@ -110,6 +112,7 @@ const splitterModel = ref(90) const loader = ref(false) const statusEdit = ref(false) const acceptTermOfUse = ref(false) +const candidateId = ref('2223ba53-2fb2-470b-8dc1-27e5471b0331') onMounted(async () => { if (props.step > 2) { @@ -130,10 +133,19 @@ const okModalConfirm = () => { } } -const saveForm = () => { +const saveForm = async () => { //saveform - success($q, 'บันทึกข้อมูลสำเร็จ') - props.fetchStep() + loader.value = true + await http + .get(config.API.candidateRegister(candidateId.value)) + .then(() => { + success($q, 'สมัครสอบสำเร็จสำเร็จ') + }) + .catch(() => {}) + .finally(async () => { + await props.fetchStep() + loader.value = false + }) } const clickPreview = (val: string) => { diff --git a/src/modules/01_exam/components/ExamPayment.vue b/src/modules/01_exam/components/ExamPayment.vue index b3d7808..5cc88f9 100644 --- a/src/modules/01_exam/components/ExamPayment.vue +++ b/src/modules/01_exam/components/ExamPayment.vue @@ -18,7 +18,7 @@
- +
***ถ้าต้องการเเก้ไขหลักฐานการโอนเงินกรุณาอัปโหลดซ้ำ*** @@ -31,6 +31,10 @@