fix: Content Routing

This commit is contained in:
scmmishra 2019-02-26 17:20:38 +05:30
parent 7e1678e287
commit 90b503621b
2 changed files with 3 additions and 3 deletions

View File

@ -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(() => {

View File

@ -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({