2
0
mirror of https://github.com/frappe/books.git synced 2024-11-14 09:24:04 +00:00
books/client/view/index.js

16 lines
578 B
JavaScript
Raw Normal View History

2018-01-30 12:03:04 +00:00
const BaseList = require('frappejs/client/view/list');
const BaseTree = require('frappejs/client/view/tree');
2018-01-30 12:03:04 +00:00
const BaseForm = require('frappejs/client/view/form');
const frappe = require('frappejs');
2018-01-30 12:03:04 +00:00
module.exports = {
getFormClass(doctype) {
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) {
return (frappe.views['List'] && frappe.views['List'][doctype]) || BaseList;
},
getTreeClass(doctype) {
return (frappe.views['Tree'] && frappe.views['Tree'][doctype] || BaseTree);
2018-01-30 12:03:04 +00:00
}
}