2
0
mirror of https://github.com/frappe/books.git synced 2025-01-27 00:58:35 +00:00
books/client/view/index.js

16 lines
578 B
JavaScript
Raw Normal View History

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