fix: show created tab to users with moderator or instructor role

This commit is contained in:
Jannat Patel
2025-03-12 10:50:20 +05:30
parent 02edefc158
commit 619dc73bcb
2 changed files with 5 additions and 2 deletions

View File

@@ -81,7 +81,10 @@ const fetchEnrollmentDetails = () => {
if (data.purchased_certificate) {
certificate.reload()
} else {
router.push({ name: 'CourseDetail', params: { courseName: props.courseName } })
router.push({
name: 'CourseDetail',
params: { courseName: props.courseName },
})
}
})
}

View File

@@ -283,7 +283,7 @@ const courseType = computed(() => {
]
if (user.data?.is_student) {
types.push({ label: __('Enrolled'), value: 'Enrolled' })
}
}
if (user.data?.is_moderator || user.data?.is_instructor) {
types.push({ label: __('Created'), value: 'Created' })
}