ดิง 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

@ -195,6 +195,7 @@ import Table from '@/components/Table.vue'
import DialogHeader from '@/components/DialogHeader.vue'
import DialogFooter from '@/components/DialogFooter.vue'
import Conference from '@/modules/01_exam/components/Conference.vue'
import { useRoute } from 'vue-router'
const props = defineProps({
loader: {
@ -209,6 +210,10 @@ const props = defineProps({
statusEdit: {
type: Boolean,
required: true
},
notiNoEdit: {
type: Function,
default: () => console.log('not function')
}
})
@ -236,7 +241,8 @@ const editRow = ref<boolean>(false) //เช็คมีการแก้ไข
const statusCode = ref<number>()
const checkValidate = ref<boolean>(false) //validate data
// const modalConsend = ref<boolean>(false)
const candidateId = ref<string>('2223ba53-2fb2-470b-8dc1-27e5471b0331')
const route = useRoute()
const examId = ref<string>(route.params.id.toString())
const rows = ref<RequestItemsObject[]>([])
const filter = ref<string>('') //search data table
@ -315,7 +321,7 @@ onMounted(async () => {
const fetchData = async () => {
loader.value = true
await http
.get(config.API.candidateCareer(candidateId.value))
.get(config.API.candidateCareer(examId.value))
.then((res) => {
const data = res.data.result
rows.value = []
@ -452,7 +458,7 @@ const clickSave = async () => {
const saveData = async () => {
loader.value = true
await http
.post(config.API.candidateCareer(candidateId.value), {
.post(config.API.candidateCareer(examId.value), {
name: location.value,
position: position.value,
salary: salary.value,