feat: Implement 'My Courses' dashboard, including course cards, classroom learning, and quiz pages.

This commit is contained in:
supalerk-ar66 2026-01-21 17:03:09 +07:00
parent fc3e2820cc
commit f6bbd60f2b
5 changed files with 111 additions and 74 deletions

View file

@ -50,13 +50,18 @@ const submitQuiz = (auto = false) => {
}
}
const route = useRoute()
const confirmExit = () => {
const courseId = route.query.course_id
const target = courseId ? `/classroom/learning?course_id=${courseId}` : '/classroom/learning'
if (currentScreen.value === 'taking') {
if (confirm('คุณกำลังทำแบบทดสอบอยู่ หากออกตอนนี้ความคืบหน้าจะหายไป ยืนยันที่จะออก?')) {
router.push('/classroom/learning')
router.push(target)
}
} else {
router.push('/classroom/learning')
router.push(target)
}
}