This commit is contained in:
Chris Rosenau 2025-11-08 16:35:32 -07:00
parent acef61c43d
commit c5b8a0452d
1 changed files with 2 additions and 2 deletions

View File

@ -1431,7 +1431,7 @@ function createTreeNode(node, source = 'm2') {
const labelText = document.createElement('span');
labelText.className = 'tree-label-text';
const productCount = node.product_count !== undefined ? node.product_count : 0;
labelText.textContent = `${node.name || 'Unnamed Category'} (${productCount})`;
labelText.textContent = `[${node.id}] ${node.name || 'Unnamed Category'} (${productCount})`;
const badge = document.createElement('span');
badge.className = `tree-badge ${node.is_active ? 'active' : 'inactive'}`;
@ -1614,7 +1614,7 @@ function saveRenameCategory(nodeDiv, node, newName, source) {
// Update the label text
const labelText = label.querySelector('.tree-label-text');
const productCount = node.product_count !== undefined ? node.product_count : 0;
labelText.textContent = `${data.new_name} (${productCount})`;
labelText.textContent = `[${node.id}] ${data.new_name} (${productCount})`;
// Restore display
labelText.style.display = '';