fix: edit permission and other issues

This commit is contained in:
Jannat Patel
2024-05-17 18:03:04 +05:30
parent 36c7c10d94
commit 76ea4fc1ae
8 changed files with 58 additions and 12 deletions

View File

@@ -18,12 +18,16 @@
}}
</p>
<router-link
v-if="user.data"
:to="{ name: 'CourseDetail', params: { courseName: courseName } }"
>
<Button variant="solid">
{{ __('Start Learning') }}
</Button>
</router-link>
<Button v-else @click="redirectToLogin()">
{{ __('Login') }}
</Button>
</div>
<div v-else class="border-r container pt-5 pb-10 px-5">
<div class="flex flex-col md:flex-row md:items-center justify-between">
@@ -332,6 +336,10 @@ const allowInstructorContent = () => {
if (lesson.data?.instructors.includes(user.data?.name)) return true
return false
}
const redirectToLogin = () => {
window.location.href = `/login?redirect-to=/lms/courses/${props.courseName}`
}
</script>
<style>
.avatar-group {