feat(organization-chart): update statistics display and improve layout
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 4m44s
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 4m44s
- Updated the organization chart to include additional statistics such as left and right leg counts, tree depth, and weaker leg identification for enhanced user insights. - Improved the layout and styling of the statistics bar for better visibility and user experience. - Adjusted the CSS for the organization chart to refine the overall presentation and responsiveness. These changes enhance the clarity and usability of the organization chart, providing users with essential metrics at a glance.
This commit is contained in:
@@ -52,29 +52,47 @@
|
||||
<div id="org-chart-container" class="org-chart-container"></div>
|
||||
}
|
||||
|
||||
@* Stats Bar *@
|
||||
@* Stats Bar — فقط آمار خود کاربر (نه نودهای درخت) *@
|
||||
@if (_statistics != null && !_isLoading)
|
||||
{
|
||||
<div class="org-chart-stats">
|
||||
<div class="stat-item">
|
||||
<span class="stat-label">کل اعضا:</span>
|
||||
<span class="stat-value">@_statistics.TotalMembers</span>
|
||||
<div class="org-chart-stats-row">
|
||||
<div class="stat-item">
|
||||
<span class="stat-label">کل اعضا:</span>
|
||||
<span class="stat-value">@_statistics.TotalMembers</span>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<span class="stat-label">سازمان چپ:</span>
|
||||
<span class="stat-value left">@_statistics.LeftLegCount</span>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<span class="stat-label">سازمان راست:</span>
|
||||
<span class="stat-value right">@_statistics.RightLegCount</span>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<span class="stat-label">عمق:</span>
|
||||
<span class="stat-value">@_statistics.TreeDepth</span>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<span class="stat-label">پای ضعیف:</span>
|
||||
<span class="stat-value">@(_statistics.WeakerLeg == "Left" ? "چپ" : "راست")</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<span class="stat-label">سازمان چپ:</span>
|
||||
<span class="stat-value left">@_statistics.LeftLegCount</span>
|
||||
<div class="org-chart-stats-row leg-scores">
|
||||
<div class="stat-item leg-score-gold">
|
||||
<span class="stat-label">امتیاز طلایی:</span>
|
||||
<span class="stat-value left">چپ @_statistics.GoldLeftLegTotal</span>
|
||||
<span class="stat-sep">·</span>
|
||||
<span class="stat-value right">راست @_statistics.GoldRightLegTotal</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<span class="stat-label">سازمان راست:</span>
|
||||
<span class="stat-value right">@_statistics.RightLegCount</span>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<span class="stat-label">عمق:</span>
|
||||
<span class="stat-value">@_statistics.TreeDepth</span>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<span class="stat-label">پای ضعیف:</span>
|
||||
<span class="stat-value">@(_statistics.WeakerLeg == "Left" ? "چپ" : "راست")</span>
|
||||
<div class="org-chart-stats-row leg-scores">
|
||||
<div class="stat-item leg-score-silver">
|
||||
<span class="stat-label">امتیاز نقرهای:</span>
|
||||
<span class="stat-value left">چپ @_statistics.SilverLeftLegTotal</span>
|
||||
<span class="stat-sep">·</span>
|
||||
<span class="stat-value right">راست @_statistics.SilverRightLegTotal</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -110,11 +110,7 @@ public partial class OrganizationChart : IAsyncDisposable
|
||||
activationWeekNumber = n.ActivationWeekNumber,
|
||||
joinedAt = n.JoinedAt,
|
||||
referralCode = n.ReferralCode,
|
||||
packageName = n.PackageName ?? string.Empty,
|
||||
goldLeftLegTotal = n.GoldLeftLegTotal,
|
||||
goldRightLegTotal = n.GoldRightLegTotal,
|
||||
silverLeftLegTotal = n.SilverLeftLegTotal,
|
||||
silverRightLegTotal = n.SilverRightLegTotal
|
||||
packageName = n.PackageName ?? string.Empty
|
||||
}).ToArray();
|
||||
|
||||
await JSRuntime.InvokeVoidAsync("OrgChart.init", "org-chart-container", flatData, _dotNetHelper);
|
||||
|
||||
Reference in New Issue
Block a user