fix: Content Routing
This commit is contained in:
parent
7e1678e287
commit
90b503621b
@ -9,9 +9,8 @@ import './call';
|
|||||||
Vue.use(VueRouter)
|
Vue.use(VueRouter)
|
||||||
|
|
||||||
var store = {
|
var store = {
|
||||||
isLogin: false,
|
|
||||||
enrolledPrograms: [],
|
enrolledPrograms: [],
|
||||||
enrolledCourses: {}
|
enrolledCourses: []
|
||||||
}
|
}
|
||||||
|
|
||||||
frappe.ready(() => {
|
frappe.ready(() => {
|
||||||
|
@ -28,7 +28,8 @@ const routes = [{
|
|||||||
component: ContentPage,
|
component: ContentPage,
|
||||||
props: true,
|
props: true,
|
||||||
beforeEnter: (to, from, next) => {
|
beforeEnter: (to, from, next) => {
|
||||||
if (lms.store.checkProgramEnrollment(this.program_name)) {
|
console.log(from.params.program_name)
|
||||||
|
if (lms.store.checkProgramEnrollment(from.params.program_name)) {
|
||||||
next()
|
next()
|
||||||
} else {
|
} else {
|
||||||
next({
|
next({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user