UI: Kinda fixed "Completed" button render issue

This commit is contained in:
scmmishra 2018-11-05 14:54:40 +05:30 committed by Aditya Hase
parent 5611bf4e29
commit 86897b3cc8
3 changed files with 6 additions and 4 deletions

View File

@ -11,9 +11,6 @@ export default {
className: 'btn-primary'
}
},
mounted() {
this.$root.$data.updateCompletedCourses()
}
computed: {
getButtonName: function() {
if(this.$root.$data.checkCourseCompletion(this.course)){

View File

@ -41,6 +41,8 @@ export default {
enrollment: this.$root.$data.enrolledCourses[this.$route.params.course]
}
})
this.$root.$data.addCompletedCourses(this.$route.params.course)
this.$root.$data.updateCompletedCourses()
this.$router.push({ name: 'program', params: { code: this.$route.params.code}})
}
}

View File

@ -29,8 +29,11 @@ export default {
course_list: []
}
},
mounted() {
beforeMount(){
console.log("Before Mount")
if(this.$root.$data.isLogin) this.$root.$data.updateCompletedCourses()
},
mounted() {
frappe.call({
method: "erpnext.www.academy.get_program_details",
args: {