mirror of
https://github.com/frappe/books.git
synced 2024-11-14 01:14:03 +00:00
16 lines
578 B
JavaScript
16 lines
578 B
JavaScript
const BaseList = require('frappejs/client/view/list');
|
|
const BaseTree = require('frappejs/client/view/tree');
|
|
const BaseForm = require('frappejs/client/view/form');
|
|
const frappe = require('frappejs');
|
|
|
|
module.exports = {
|
|
getFormClass(doctype) {
|
|
return (frappe.views['Form'] && frappe.views['Form'][doctype]) || BaseForm;
|
|
},
|
|
getListClass(doctype) {
|
|
return (frappe.views['List'] && frappe.views['List'][doctype]) || BaseList;
|
|
},
|
|
getTreeClass(doctype) {
|
|
return (frappe.views['Tree'] && frappe.views['Tree'][doctype] || BaseTree);
|
|
}
|
|
} |