2021-06-20 12:42:06 +05:30
|
|
|
frappe.pages['organizational-chart'].on_page_load = function(wrapper) {
|
|
|
|
frappe.ui.make_app_page({
|
|
|
|
parent: wrapper,
|
|
|
|
title: __('Organizational Chart'),
|
|
|
|
single_column: true
|
|
|
|
});
|
|
|
|
|
2021-06-29 19:15:08 +05:30
|
|
|
$(wrapper).bind('show', () => {
|
2021-08-10 20:13:28 +05:30
|
|
|
frappe.require('hierarchy-chart.bundle.js', () => {
|
2021-06-29 19:15:08 +05:30
|
|
|
let organizational_chart = undefined;
|
2021-06-29 21:26:47 +05:30
|
|
|
let method = 'erpnext.hr.page.organizational_chart.organizational_chart.get_children';
|
|
|
|
|
2021-06-29 19:15:08 +05:30
|
|
|
if (frappe.is_mobile()) {
|
2021-06-29 21:51:21 +05:30
|
|
|
organizational_chart = new erpnext.HierarchyChartMobile('Employee', wrapper, method);
|
2021-06-21 21:55:50 +05:30
|
|
|
} else {
|
2021-06-29 21:51:21 +05:30
|
|
|
organizational_chart = new erpnext.HierarchyChart('Employee', wrapper, method);
|
2021-06-21 21:55:50 +05:30
|
|
|
}
|
2021-06-29 19:15:08 +05:30
|
|
|
organizational_chart.show();
|
2021-06-29 11:12:47 +05:30
|
|
|
});
|
2021-06-29 19:15:08 +05:30
|
|
|
});
|
|
|
|
};
|