brotherton-erpnext/erpnext/hr/page/organizational_chart/organizational_chart.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
702 B
JavaScript
Raw Normal View History

2021-06-20 07:12:06 +00:00
frappe.pages['organizational-chart'].on_page_load = function(wrapper) {
frappe.ui.make_app_page({
parent: wrapper,
title: __('Organizational Chart'),
single_column: true
});
$(wrapper).bind('show', () => {
frappe.require('hierarchy-chart.bundle.js', () => {
let organizational_chart = undefined;
let method = 'erpnext.hr.page.organizational_chart.organizational_chart.get_children';
if (frappe.is_mobile()) {
2021-06-29 16:21:21 +00:00
organizational_chart = new erpnext.HierarchyChartMobile('Employee', wrapper, method);
2021-06-21 16:25:50 +00:00
} else {
2021-06-29 16:21:21 +00:00
organizational_chart = new erpnext.HierarchyChart('Employee', wrapper, method);
2021-06-21 16:25:50 +00:00
}
frappe.breadcrumbs.add('HR');
organizational_chart.show();
});
});
};