From 0760ae1981f0a7fe1654fdf24780df290a15c96c Mon Sep 17 00:00:00 2001 From: Kittapath Date: Fri, 24 Mar 2023 20:47:01 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=95=E0=B9=88=E0=B8=AD=20api=20=E0=B8=9B?= =?UTF-8?q?=E0=B8=A3=E0=B8=B0=E0=B8=A7=E0=B8=B1=E0=B8=95=E0=B8=B4=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=E0=B8=A8=E0=B8=B6=E0=B8=81=E0=B8=A9=E0=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/exam/api.candidate.ts | 7 + src/modules/01_exam/components/ExamForm.vue | 18 +- .../01_exam/components/ExamPayment.vue | 28 ++- .../01_exam/components/Form/Career.vue | 155 ++++++++----- .../01_exam/components/Form/Education.vue | 215 +++++++++--------- .../components/Form/Profile/Family.vue | 114 +++++++--- src/modules/01_exam/interface/index/Main.ts | 2 +- .../01_exam/interface/request/Education.ts | 4 +- src/modules/01_exam/views/ExamDetail.vue | 36 +-- 9 files changed, 357 insertions(+), 222 deletions(-) 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 @@