fix: org chart connectors not rendered when Employee Naming is set to Full Name (#29997)

This commit is contained in:
Rucha Mahabal
2022-02-25 23:01:32 +05:30
committed by GitHub
parent e8e9bc4daa
commit 71d33081aa
2 changed files with 13 additions and 10 deletions

View File

@@ -304,12 +304,13 @@ erpnext.HierarchyChart = class {
}
get_child_nodes(node_id) {
let me = this;
return new Promise(resolve => {
frappe.call({
method: this.method,
method: me.method,
args: {
parent: node_id,
company: this.company
company: me.company
}
}).then(r => resolve(r.message));
});
@@ -350,12 +351,13 @@ erpnext.HierarchyChart = class {
}
get_all_nodes() {
let me = this;
return new Promise(resolve => {
frappe.call({
method: 'erpnext.utilities.hierarchy_chart.get_all_nodes',
args: {
method: this.method,
company: this.company
method: me.method,
company: me.company
},
callback: (r) => {
resolve(r.message);
@@ -427,8 +429,8 @@ erpnext.HierarchyChart = class {
add_connector(parent_id, child_id) {
// using pure javascript for better performance
const parent_node = document.querySelector(`#${parent_id}`);
const child_node = document.querySelector(`#${child_id}`);
const parent_node = document.getElementById(`${parent_id}`);
const child_node = document.getElementById(`${child_id}`);
let path = document.createElementNS('http://www.w3.org/2000/svg', 'path');