Using lms.call across the Vue app

This commit is contained in:
scmmishra
2018-11-19 15:12:39 +05:30
committed by Aditya Hase
parent 0a4902f8b5
commit 80ecc56cbe
5 changed files with 68 additions and 70 deletions

View File

@@ -34,18 +34,23 @@ export default {
},
},
mounted() {
frappe.call({
method: "erpnext.www.lms.get_next_content",
args:{
content: this.content,
content_type: this.type,
course: this.course
}
}).then(r => {
this.getNextContent().then(data => {
this.nextContent = r.message.content,
this.nextContentType = r.message.content_type
});
},
methods: {
getNextContent(){
return lms.call({
method: "get_next_content",
args:{
content: this.content,
content_type: this.type,
course: this.course
}
});
}
},
components: {
Article,
Video,