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 });