ดิง id สมัครสอบจาก path

This commit is contained in:
Kittapath 2023-03-29 12:54:32 +07:00
parent d8e47aad92
commit b5c6c83d62
11 changed files with 75 additions and 31 deletions

View file

@ -106,6 +106,7 @@ import Profile from '@/modules/01_exam/components/Form/Profile.vue'
import Education from '@/modules/01_exam/components/Form/Education.vue'
import Career from '@/modules/01_exam/components/Form/Career.vue'
import Document from '@/modules/01_exam/components/Form/Document.vue'
import { useRoute } from 'vue-router'
const props = defineProps({
fetchStep: {
@ -126,7 +127,8 @@ const { modalConfirm, modalError, success } = mixin
const loader = ref<boolean>(false)
const statusEdit = ref<boolean>(false)
const acceptTermOfUse = ref<boolean>(false)
const candidateId = ref<string>('2223ba53-2fb2-470b-8dc1-27e5471b0331')
const route = useRoute()
const examId = ref<string>(route.params.id.toString())
onMounted(async () => {
if (props.status !== 'register') {
@ -151,7 +153,7 @@ const saveForm = async () => {
//saveform
loader.value = true
await http
.get(config.API.candidateRegister(candidateId.value))
.get(config.API.candidateRegister(examId.value))
.then(() => {
success($q, 'สมัครสอบสำเร็จสำเร็จ')
})