fix (linting): codacy fixes
This commit is contained in:
parent
5b9df676a4
commit
823d89cf66
@ -35,7 +35,7 @@ frappe.ready(() => {
|
||||
if(this.checkLogin()) {
|
||||
lms.call("get_all_course_enrollments").then(data => {
|
||||
this.enrolledCourses = data;
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
checkLogin() {
|
||||
@ -50,18 +50,18 @@ frappe.ready(() => {
|
||||
if(this.checkLogin()){
|
||||
if(this.enrolledPrograms) {
|
||||
if(this.enrolledPrograms.includes(programName)) {
|
||||
return true
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
return false
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
return false
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -72,11 +72,10 @@ frappe.ready(() => {
|
||||
template: "<lms-root/>",
|
||||
components: { lmsRoot },
|
||||
mounted() {
|
||||
lms.store.updateState()
|
||||
lms.store.updateState();
|
||||
}
|
||||
});
|
||||
lms.view.$router.afterEach((to, from) => {
|
||||
window.scrollTo(0,0)
|
||||
window.scrollTo(0,0);
|
||||
});
|
||||
lms.debug = true
|
||||
});
|
@ -29,14 +29,14 @@ const routes = [{
|
||||
props: true,
|
||||
beforeRouteUpdate (to, from, next) {
|
||||
if (lms.store.checkProgramEnrollment(to.params.program_name)) {
|
||||
next()
|
||||
next();
|
||||
} else {
|
||||
next({
|
||||
name: 'program',
|
||||
params: {
|
||||
program_name: to.params.program_name
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user