feat: implement My Courses page with course listing, progress/completion filtering, and certificate download functionality.
This commit is contained in:
parent
ab9e948fd1
commit
4e0191ed1f
1 changed files with 3 additions and 1 deletions
|
|
@ -55,9 +55,11 @@ const loadEnrolledCourses = async () => {
|
|||
if (res.success) {
|
||||
let courses = (res.data || [])
|
||||
|
||||
// Local filter for 'progress' tab to exclude completed
|
||||
// Local filter to ensure UI consistency regardless of backend filtering
|
||||
if (activeFilter.value === 'progress') {
|
||||
courses = courses.filter(c => c.status !== 'COMPLETED')
|
||||
} else if (activeFilter.value === 'completed') {
|
||||
courses = courses.filter(c => c.status === 'COMPLETED')
|
||||
}
|
||||
|
||||
enrolledCourses.value = courses.map(item => ({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue