feat: Implement core e-learning pages for My Courses, Classroom, and Course Detail.
This commit is contained in:
parent
90a8cb6509
commit
7eafa0f79e
4 changed files with 25 additions and 14 deletions
|
|
@ -36,7 +36,7 @@ const handleEnroll = async () => {
|
|||
|
||||
if (res.success) {
|
||||
// ถ้าสำเร็จ ให้เปลี่ยนหน้าไปที่ "คอร์สของฉัน" พร้อม params enrolled=true
|
||||
return navigateTo('/dashboard/my-courses?enrolled=true')
|
||||
return navigateTo(`/dashboard/my-courses?enrolled=true&course_id=${course.value.id}`)
|
||||
} else {
|
||||
// กรณี error แสดง alert (อนาคตอาจเปลี่ยนเป็น Toast notification)
|
||||
alert(res.error || 'Failed to enroll')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue