UI fixes
This commit is contained in:
parent
082e3c94ef
commit
9229f4fc92
@ -45,7 +45,7 @@ export default {
|
|||||||
program_name: this.program.name,
|
program_name: this.program.name,
|
||||||
}).then(data => {
|
}).then(data => {
|
||||||
console.log(data)
|
console.log(data)
|
||||||
lms.store.enrolledPrograms.add(data),
|
lms.store.updateEnrolledPrograms()
|
||||||
this.$router.push(this.programRoute)
|
this.$router.push(this.programRoute)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,17 +23,19 @@ frappe.ready(() => {
|
|||||||
updateEnrolledPrograms() {
|
updateEnrolledPrograms() {
|
||||||
if(this.isLogin) {
|
if(this.isLogin) {
|
||||||
lms.call("get_program_enrollments").then(data => {
|
lms.call("get_program_enrollments").then(data => {
|
||||||
if(data) this.enrolledPrograms = data
|
this.enrolledPrograms = data
|
||||||
});
|
});
|
||||||
if (lms.debug) console.log('Updated Enrolled Programs', this.enrolledPrograms)
|
if (lms.debug) console.log('Updated Enrolled Programs', this.enrolledPrograms)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
updateEnrolledCourses() {
|
updateEnrolledCourses() {
|
||||||
lms.call("get_all_course_enrollments").then(data => {
|
if(this.isLogin) {
|
||||||
if(data) this.enrolledCourses = data
|
lms.call("get_all_course_enrollments").then(data => {
|
||||||
})
|
this.enrolledCourses = data
|
||||||
if (lms.debug) console.log('Updated Enrolled Courses', this.enrolledCourses)
|
})
|
||||||
|
if (lms.debug) console.log('Updated Enrolled Courses', this.enrolledCourses)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
checkLogin() {
|
checkLogin() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user