2018-01-30 12:03:04 +00:00
|
|
|
const BaseList = require('frappejs/client/view/list');
|
2018-04-08 18:32:44 +00:00
|
|
|
const BaseTree = require('frappejs/client/view/tree');
|
2018-01-30 12:03:04 +00:00
|
|
|
const BaseForm = require('frappejs/client/view/form');
|
2018-02-16 13:13:46 +00:00
|
|
|
const frappe = require('frappejs');
|
2018-01-30 12:03:04 +00:00
|
|
|
|
|
|
|
module.exports = {
|
2018-02-13 10:42:44 +00:00
|
|
|
getFormClass(doctype) {
|
2018-02-16 13:13:46 +00:00
|
|
|
return (frappe.views['Form'] && frappe.views['Form'][doctype]) || BaseForm;
|
2018-01-30 12:03:04 +00:00
|
|
|
},
|
2018-02-20 06:39:41 +00:00
|
|
|
getListClass(doctype) {
|
2018-02-16 13:13:46 +00:00
|
|
|
return (frappe.views['List'] && frappe.views['List'][doctype]) || BaseList;
|
2018-04-08 18:32:44 +00:00
|
|
|
},
|
|
|
|
getTreeClass(doctype) {
|
|
|
|
return (frappe.views['Tree'] && frappe.views['Tree'][doctype] || BaseTree);
|
2018-01-30 12:03:04 +00:00
|
|
|
}
|
|
|
|
}
|