learning flow UI fixes
This commit is contained in:
parent
3614244029
commit
85d4199dd7
|
|
@ -41,6 +41,7 @@ import type {
|
|||
GetSubCoursePrerequisitesResponse,
|
||||
AddSubCoursePrerequisiteRequest,
|
||||
GetLearningPathResponse,
|
||||
GetSubCourseEntryAssessmentResponse,
|
||||
ReorderItem,
|
||||
GetRatingsResponse,
|
||||
GetRatingsParams,
|
||||
|
|
@ -217,6 +218,11 @@ export const removeSubCoursePrerequisite = (subCourseId: number, prerequisiteId:
|
|||
export const getLearningPath = (courseId: number) =>
|
||||
http.get<GetLearningPathResponse>(`/course-management/courses/${courseId}/learning-path`)
|
||||
|
||||
export const getSubCourseEntryAssessment = (subCourseId: number) =>
|
||||
http.get<GetSubCourseEntryAssessmentResponse>(
|
||||
`/question-sets/sub-courses/${subCourseId}/entry-assessment`,
|
||||
)
|
||||
|
||||
const buildReorderPayload = (items: ReorderItem[]) => {
|
||||
const normalized = items.map((item, idx) => ({
|
||||
id: Number(item.id),
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -470,12 +470,29 @@ export interface LearningPathSubCourse {
|
|||
thumbnail: string
|
||||
display_order: number
|
||||
level: string
|
||||
sub_level?: string
|
||||
prerequisite_count: number
|
||||
video_count: number
|
||||
practice_count: number
|
||||
prerequisites: { sub_course_id: number; title: string; level: string }[]
|
||||
videos: unknown[]
|
||||
practices: unknown[]
|
||||
videos: LearningPathVideo[]
|
||||
practices: LearningPathPractice[]
|
||||
}
|
||||
|
||||
export interface LearningPathVideo {
|
||||
id: number
|
||||
title: string
|
||||
display_order: number
|
||||
duration: number
|
||||
video_url: string
|
||||
}
|
||||
|
||||
export interface LearningPathPractice {
|
||||
id: number
|
||||
title: string
|
||||
status: string
|
||||
question_count: number
|
||||
display_order?: number
|
||||
}
|
||||
|
||||
export interface LearningPath {
|
||||
|
|
@ -497,6 +514,14 @@ export interface GetLearningPathResponse {
|
|||
metadata: unknown
|
||||
}
|
||||
|
||||
export interface GetSubCourseEntryAssessmentResponse {
|
||||
message: string
|
||||
data: QuestionSet | null
|
||||
success: boolean
|
||||
status_code: number
|
||||
metadata: unknown
|
||||
}
|
||||
|
||||
export interface ReorderItem {
|
||||
id: number
|
||||
position: number
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user