fix: showEducationName

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-11-20 09:32:34 +07:00
parent 40f10e30cc
commit 472de80c3e

View file

@ -252,14 +252,16 @@ watch(defaultEducation, async (count: Education, prevCount: Education) => {
onMounted(async () => { onMounted(async () => {
await fetchData() await fetchData()
await checkInputName()
}) })
const fetchData = async () => { const fetchData = async () => {
loaderPage(true) loaderPage(true)
await http await http
.get(config.API.candidateEducation(examId.value, positionId.value)) .get(config.API.candidateEducation(examId.value, positionId.value))
.then((res) => { .then(async (res) => {
const data = res.data.result const data = res.data.result
defaultEducation.value.educationLevelExamId = data.educationLevelExamId defaultEducation.value.educationLevelExamId = data.educationLevelExamId
defaultEducation.value.educationName = data.educationName defaultEducation.value.educationName = data.educationName
defaultEducation.value.educationMajor = data.educationMajor defaultEducation.value.educationMajor = data.educationMajor
@ -269,7 +271,7 @@ const fetchData = async () => {
data.educationEndDate == null ? null : new Date(data.educationEndDate) data.educationEndDate == null ? null : new Date(data.educationEndDate)
defaultEducation.value.educationScores = data.educationScores defaultEducation.value.educationScores = data.educationScores
defaultEducation.value.educationLevelHighId = data.educationLevelHighId defaultEducation.value.educationLevelHighId = data.educationLevelHighId
checkInputName() await checkInputName()
}) })
.catch((e) => { .catch((e) => {
// messageError($q, e) // messageError($q, e)
@ -279,7 +281,7 @@ const fetchData = async () => {
}) })
} }
const checkInputName = () => { const checkInputName = async () => {
showEducationName.value = showEducationName.value =
props.educationLevelOptions.filter( props.educationLevelOptions.filter(
(x) => (x) =>