2018-11-09 12:55:19 +00:00
|
|
|
frappe.ready(() => {
|
2018-11-13 11:17:46 +00:00
|
|
|
frappe.provide('lms');
|
2018-11-09 06:17:09 +00:00
|
|
|
|
2018-11-13 11:17:46 +00:00
|
|
|
lms.call = (method, args) => {
|
2018-11-13 11:05:34 +00:00
|
|
|
const method_path = 'erpnext.www.lms.' + method;
|
2018-11-09 12:55:19 +00:00
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
return frappe.call({
|
|
|
|
method: method_path,
|
|
|
|
args,
|
|
|
|
})
|
|
|
|
.then(r => resolve(r.message))
|
|
|
|
.fail(reject)
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|