feat: Implement Commission and Network Statistics Pages with DTOs and Services

- Added CommissionDashboardPage and CommissionHistoryPage for displaying commission payouts and history.
- Implemented WeeklyBalancePage to show weekly balance details.
- Created NetworkStatisticsPage to display network statistics and tree structure.
- Developed corresponding services (CommissionService, NetworkMembershipService) for data retrieval.
- Introduced DTOs for Commission and Network data structures (CommissionPayoutDto, WeeklyBalanceDto, NetworkStatisticsDto).
- Added mock data generation for testing purposes in services.
- Enhanced UI with MudBlazor components for better user experience.
This commit is contained in:
masoodafar-web
2025-12-04 17:29:16 +03:30
parent a8e6693c70
commit 95c6bf5efa
25 changed files with 1882 additions and 26 deletions
@@ -0,0 +1,50 @@
namespace FrontOffice.Main.Utilities;
/// <summary>
/// DTO for Network Tree node
/// </summary>
public class NetworkNodeDto
{
public long UserId { get; set; }
public string FullName { get; set; } = string.Empty;
public string Mobile { get; set; } = string.Empty;
public string? Avatar { get; set; }
public string Position { get; set; } = string.Empty; // "Left" or "Right"
public NetworkNodeDto? LeftChild { get; set; }
public NetworkNodeDto? RightChild { get; set; }
public int Level { get; set; }
}
/// <summary>
/// DTO for Network Tree response
/// </summary>
public class NetworkTreeDto
{
public NetworkNodeDto? RootNode { get; set; }
public int TotalMembers { get; set; }
public int CurrentDepth { get; set; }
}
/// <summary>
/// DTO for Last Member info
/// </summary>
public class LastMemberDto
{
public long UserId { get; set; }
public string FullName { get; set; } = string.Empty;
public string Position { get; set; } = string.Empty;
public DateTime JoinedAt { get; set; }
}
/// <summary>
/// DTO for Network Statistics
/// </summary>
public class NetworkStatisticsDto
{
public int LeftLegCount { get; set; }
public int RightLegCount { get; set; }
public int TotalMembers { get; set; }
public int TreeDepth { get; set; }
public string WeakerLeg { get; set; } = string.Empty; // "Left" or "Right"
public LastMemberDto? LastMember { get; set; }
}