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