From 2fd4bd3a68879c4c6c1c48504d3ce3903e25aa67 Mon Sep 17 00:00:00 2001 From: ValueOn AG Date: Sun, 12 Apr 2026 18:34:00 +0200 Subject: [PATCH] fix instance label --- src/pages/IntegrationsOverviewPage.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/pages/IntegrationsOverviewPage.tsx b/src/pages/IntegrationsOverviewPage.tsx index c97c875..1ad7f9a 100644 --- a/src/pages/IntegrationsOverviewPage.tsx +++ b/src/pages/IntegrationsOverviewPage.tsx @@ -131,12 +131,15 @@ function _groupCorporateByInstance(items: DataLayerItem[]): _CorporateInstanceGr let group = map.get(iid); if (!group) { const code = item.featureCode || item.connectorType || ''; - const instLabel = item.instanceLabel || code; + const instLabel = (item.instanceLabel || '').trim(); group = { instanceId: iid, instanceLabel: instLabel, featureCode: code, systems: [] }; map.set(iid, group); } - if (item.instanceLabel && !group.instanceLabel) { - group.instanceLabel = item.instanceLabel; + if (item.instanceLabel && (!group.instanceLabel || group.instanceLabel === group.featureCode)) { + group.instanceLabel = item.instanceLabel.trim(); + } + if (item.featureCode && !group.featureCode) { + group.featureCode = item.featureCode; } const sysLabel = (item.displayLabel || item.label || item.connectorType || item.id).trim(); group.systems.push({ key: `${item.kind}-${item.id}`, label: sysLabel });