2
0
mirror of https://github.com/frappe/books.git synced 2024-09-20 11:29:00 +00:00
books/client/desk/listpage.js

17 lines
406 B
JavaScript
Raw Normal View History

2018-01-30 12:03:04 +00:00
const Page = require('frappejs/client/view/page');
const view = require('frappejs/client/view');
module.exports = class FormPage extends Page {
constructor(doctype) {
let meta = frappe.get_meta(doctype);
super(`List ${meta.name}`);
this.list = new (view.get_list_class(doctype))({
doctype: doctype,
parent: this.body
});
2018-01-30 13:25:48 +00:00
this.on('show', async () => {
await this.list.run();
2018-01-30 12:03:04 +00:00
});
}
}