mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 21:59:13 +00:00
* fix(org chart): multiple root nodes not expanding on clicking Expand All
* fix: unstable filter inserts duplicate nodes
(cherry picked from commit f828d853e3)
Co-authored-by: Rucha Mahabal <ruchamahabal2@gmail.com>
24 lines
710 B
JavaScript
24 lines
710 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('/assets/js/hierarchy-chart.min.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();
|
|
});
|
|
});
|
|
};
|