brotherton-erpnext/erpnext/hr/page/organizational_chart/organizational_chart.js
Rucha Mahabal f828d853e3
fix: Org Chart fixes (#27290)
* fix(org chart): multiple root nodes not expanding on clicking Expand All

* fix: unstable filter inserts duplicate nodes
2021-09-01 23:07:26 +05:30

24 lines
702 B
JavaScript

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()) {
organizational_chart = new erpnext.HierarchyChartMobile('Employee', wrapper, method);
} else {
organizational_chart = new erpnext.HierarchyChart('Employee', wrapper, method);
}
frappe.breadcrumbs.add('HR');
organizational_chart.show();
});
});
};