From 69d1c11f7d80329dfa4950be0b2652d684e27d80 Mon Sep 17 00:00:00 2001 From: romanskijdev Date: Tue, 4 Aug 2026 13:28:07 +0300 Subject: [PATCH] Updated flows tree --- src/features/hierarchies/utils.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/features/hierarchies/utils.ts b/src/features/hierarchies/utils.ts index e72178e..2680b16 100644 --- a/src/features/hierarchies/utils.ts +++ b/src/features/hierarchies/utils.ts @@ -36,14 +36,13 @@ export function groupHierarchiesIntoChains( const scopeObjectId = scopeType === 'topic' ? h.topic_id : scopeType === 'category' ? h.topic_category_id : null - // Формируем ключ группы - const key = `${h.subordinate_id}-${h.department_id}-${scopeType}-${scopeObjectId || 'null'}` + // Формируем ключ группы (добавляем target_system) + const targetSystemPart = h.target_system || 'all' + const key = `${h.subordinate_id}-${h.department_id}-${scopeType}-${scopeObjectId || 'null'}-${targetSystemPart}` if (!groups.has(key)) { - // Определяем название объекта области действия let scopeObjectName = 'Все темы' if (scopeType === 'category' && h.subordinate) { - // Будет заполнено позже из categories scopeObjectName = `Категория #${scopeObjectId}` } else if (scopeType === 'topic') { scopeObjectName = `Тема #${scopeObjectId}`