feat: enhance organization chart data mapping for improved clarity
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 17m19s

Updated the organization chart component to explicitly map network node properties to a flat array with camelCase keys. This change aligns the data structure with the BackOffice admin chart, enhancing consistency and clarity in the displayed information.
This commit is contained in:
masoodafar-web
2026-06-19 01:56:54 +03:30
parent 8766c29a5a
commit 7f8f99d4eb
@@ -95,7 +95,23 @@ public partial class OrganizationChart : IAsyncDisposable
try try
{ {
_dotNetHelper = DotNetObjectReference.Create(this); _dotNetHelper = DotNetObjectReference.Create(this);
var flatData = _networkTree.ToFlatArray(); // Explicit camelCase mapping (same pattern as BackOffice admin chart)
var flatData = _networkTree.ToFlatArray().Select(n => new
{
id = n.Id,
parentId = n.ParentId,
fullName = n.FullName,
mobile = n.Mobile,
avatar = n.Avatar,
position = n.Position,
level = n.Level,
isActive = n.IsActive,
isClubActive = n.IsClubActive,
activationWeekNumber = n.ActivationWeekNumber,
joinedAt = n.JoinedAt,
referralCode = n.ReferralCode,
packageName = n.PackageName ?? string.Empty
}).ToArray();
await JSRuntime.InvokeVoidAsync("OrgChart.init", "org-chart-container", flatData, _dotNetHelper); await JSRuntime.InvokeVoidAsync("OrgChart.init", "org-chart-container", flatData, _dotNetHelper);
} }