UI: Kinda fixed "Completed" button render issue
This commit is contained in:
parent
5611bf4e29
commit
86897b3cc8
@ -11,9 +11,6 @@ export default {
|
||||
className: 'btn-primary'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$root.$data.updateCompletedCourses()
|
||||
}
|
||||
computed: {
|
||||
getButtonName: function() {
|
||||
if(this.$root.$data.checkCourseCompletion(this.course)){
|
||||
|
@ -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}})
|
||||
}
|
||||
}
|
||||
|
@ -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: {
|
||||
|
Loading…
Reference in New Issue
Block a user