fix: org chart connectors not rendered when Employee Naming is set to Full Name (#29997)
This commit is contained in:
parent
e8e9bc4daa
commit
71d33081aa
@ -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');
|
||||
|
||||
|
@ -235,7 +235,7 @@ erpnext.HierarchyChartMobile = class {
|
||||
let me = this;
|
||||
return new Promise(resolve => {
|
||||
frappe.call({
|
||||
method: this.method,
|
||||
method: me.method,
|
||||
args: {
|
||||
parent: node_id,
|
||||
company: me.company,
|
||||
@ -286,8 +286,8 @@ erpnext.HierarchyChartMobile = class {
|
||||
}
|
||||
|
||||
add_connector(parent_id, child_id) {
|
||||
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}`);
|
||||
|
||||
const path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
|
||||
|
||||
@ -518,7 +518,8 @@ erpnext.HierarchyChartMobile = class {
|
||||
level.nextAll('li').remove();
|
||||
|
||||
let node_object = this.nodes[node.id];
|
||||
let current_node = level.find(`#${node.id}`).detach();
|
||||
let current_node = level.find(`[id="${node.id}"]`).detach();
|
||||
|
||||
current_node.removeClass('active-child active-path');
|
||||
|
||||
node_object.expanded = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user