2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00
books/client/desk/listpage.js
2018-02-08 15:08:47 +05:30

19 lines
468 B
JavaScript

const frappe = require('frappejs');
const Page = require('frappejs/client/view/page');
const view = require('frappejs/client/view');
module.exports = class ListPage extends Page {
constructor(doctype) {
let meta = frappe.getMeta(doctype);
super(frappe._("List: {0}", meta.name));
this.list = new (view.getList_class(doctype))({
doctype: doctype,
parent: this.body,
page: this
});
this.on('show', async () => {
await this.list.run();
});
}
}