fix: admin courses
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
import useModal from '@/composables/useModal'
|
||||
import { computed, markRaw, watch } from 'vue'
|
||||
import { STUDENT_REGISTRATION } from '@/enums'
|
||||
import { useGetRegisterDataQuery } from '@/services/query/auth'
|
||||
import SideBarSteps from '@/features/auth/components/studentRegister/SideBarSteps.vue'
|
||||
import SuccessModal from '@/features/auth/components/studentRegister/SuccessModal.vue'
|
||||
import { useStudentRegistrationStore } from '@/features/auth/store/student-registration'
|
||||
@@ -40,6 +41,15 @@ import ProfessionalInformation from '@/features/auth/components/studentRegister/
|
||||
const store = useStudentRegistrationStore()
|
||||
const { isModal, openModal } = useModal()
|
||||
|
||||
const { data: registerData } = useGetRegisterDataQuery()
|
||||
watch(
|
||||
registerData,
|
||||
(list) => {
|
||||
if (Array.isArray(list) && list.length > 0) store.hydrateFromKeyValueList(list)
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
const STEP_TO_COMPONENT = {
|
||||
[STUDENT_REGISTRATION.PERSONAL_INFORMATION]: markRaw(PersonalInformation),
|
||||
[STUDENT_REGISTRATION.EDUCATIONAL_INFORMATION]: markRaw(EducationalInformation),
|
||||
|
||||
Reference in New Issue
Block a user