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
|
|
|
|
});
|
|
|
|
|
2021-06-29 13:45:08 +00:00
|
|
|
$(wrapper).bind('show', () => {
|
2021-08-10 14:43:28 +00:00
|
|
|
frappe.require('hierarchy-chart.bundle.js', () => {
|
2021-06-29 13:45:08 +00:00
|
|
|
let organizational_chart = undefined;
|
2021-06-29 15:56:47 +00:00
|
|
|
let method = 'erpnext.hr.page.organizational_chart.organizational_chart.get_children';
|
|
|
|
|
2021-06-29 13:45:08 +00:00
|
|
|
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
|
|
|
}
|
2021-09-01 17:37:26 +00:00
|
|
|
|
|
|
|
frappe.breadcrumbs.add('HR');
|
2021-06-29 13:45:08 +00:00
|
|
|
organizational_chart.show();
|
2021-06-29 05:42:47 +00:00
|
|
|
});
|
2021-06-29 13:45:08 +00:00
|
|
|
});
|
|
|
|
};
|