feat: Implement core e-learning pages for My Courses, Classroom, and Course Detail.

This commit is contained in:
supalerk-ar66 2026-01-29 17:52:52 +07:00
parent 90a8cb6509
commit 7eafa0f79e
4 changed files with 25 additions and 14 deletions

View file

@ -412,6 +412,9 @@ const onVideoEnded = async () => {
await performSaveProgress(true, false)
// Call explicit complete endpoint if exists
// Call explicit complete endpoint if exists
// REMOVED: User requested to remove explicit complete call
/*
if (currentLesson.value) {
const res = await markLessonComplete(courseId.value, currentLesson.value.id)
if (res.success) {
@ -422,13 +425,15 @@ const onVideoEnded = async () => {
// Refresh course data to update certificate status
await loadCourseData()
alert(t('course.completed') || "ยินดีด้วย! คุณเรียนจบหลักสูตรแล้ว")
} else if (res.data.next_lesson_id) {
// Auto-advance removed as per request.
// User will manually select the next lesson from the sidebar.
}
}
}
*/
// Just refresh local state assuming server handles completion via progress
if (currentLesson.value) {
markLessonAsCompletedLocally(currentLesson.value.id)
}
}
const formatTime = (time: number) => {