Merge branch 'kub-stage' into production
Build and Deploy to Production / build-and-deploy (push) Successful in 2m23s

This commit is contained in:
masoodafar-web
2025-12-29 00:43:04 +03:30
3 changed files with 73 additions and 22 deletions
+1 -1
View File
@@ -114,7 +114,7 @@
<PackageReference Include="Blazored.LocalStorage" Version="4.5.0"/> <PackageReference Include="Blazored.LocalStorage" Version="4.5.0"/>
<PackageReference Include="Foursat.BackOffice.BFF.Category.Protobuf" Version="0.0.5"/> <PackageReference Include="Foursat.BackOffice.BFF.Category.Protobuf" Version="0.0.5"/>
<PackageReference Include="Foursat.BackOffice.BFF.ClubMembership.Protobuf" Version="0.0.7"/> <PackageReference Include="Foursat.BackOffice.BFF.ClubMembership.Protobuf" Version="0.0.7"/>
<PackageReference Include="Foursat.BackOffice.BFF.Commission.Protobuf" Version="0.0.13"/> <PackageReference Include="Foursat.BackOffice.BFF.Commission.Protobuf" Version="0.0.15"/>
<PackageReference Include="Foursat.BackOffice.BFF.Common.Protobuf" Version="0.0.3"/> <PackageReference Include="Foursat.BackOffice.BFF.Common.Protobuf" Version="0.0.3"/>
<PackageReference Include="Foursat.BackOffice.BFF.Configuration.Protobuf" Version="1.0.20"/> <PackageReference Include="Foursat.BackOffice.BFF.Configuration.Protobuf" Version="1.0.20"/>
<PackageReference Include="Foursat.BackOffice.BFF.DiscountCategory.Protobuf" Version="0.0.3"/> <PackageReference Include="Foursat.BackOffice.BFF.DiscountCategory.Protobuf" Version="0.0.3"/>
@@ -68,26 +68,62 @@
Filterable="true" Filterable="true"
Hover="true"> Hover="true">
<Columns> <Columns>
<PropertyColumn Property="x => x.UserId" Title="شناسه کاربر" /> <PropertyColumn Property="x => x.UserId" Title="شناسه" />
<PropertyColumn Property="x => x.UserFullName" Title="نام کاربر" />
<PropertyColumn Property="x => x.WeekDisplayName" Title="هفته" /> <PropertyColumn Property="x => x.WeekDisplayName" Title="هفته" />
<PropertyColumn Property="x => x.LeftBalance" Title="موجودی چپ">
<TemplateColumn Title="چپ (جدید + قبلی = مجموع)">
<CellTemplate> <CellTemplate>
<MudStack Row="true" Spacing="1" AlignItems="AlignItems.Center">
<MudTooltip Text="اعضای جدید این هفته">
<MudChip T="string" Color="Color.Success" Size="Size.Small"> <MudChip T="string" Color="Color.Success" Size="Size.Small">
@context.Item.LeftBalance.ToString("N0") @context.Item.LeftNewMembers
</MudChip> </MudChip>
</MudTooltip>
<MudText>+</MudText>
<MudTooltip Text="باقیمانده از هفته قبل">
<MudChip T="string" Color="Color.Default" Size="Size.Small">
@context.Item.LeftCarryover
</MudChip>
</MudTooltip>
<MudText>=</MudText>
<MudTooltip Text="مجموع موجودی چپ">
<MudChip T="string" Color="Color.Primary" Size="Size.Small">
<strong>@context.Item.LeftTotal</strong>
</MudChip>
</MudTooltip>
</MudStack>
</CellTemplate> </CellTemplate>
</PropertyColumn> </TemplateColumn>
<PropertyColumn Property="x => x.RightBalance" Title="موجودی راست">
<TemplateColumn Title="راست (جدید + قبلی = مجموع)">
<CellTemplate> <CellTemplate>
<MudStack Row="true" Spacing="1" AlignItems="AlignItems.Center">
<MudTooltip Text="اعضای جدید این هفته">
<MudChip T="string" Color="Color.Warning" Size="Size.Small"> <MudChip T="string" Color="Color.Warning" Size="Size.Small">
@context.Item.RightBalance.ToString("N0") @context.Item.RightNewMembers
</MudChip> </MudChip>
</MudTooltip>
<MudText>+</MudText>
<MudTooltip Text="باقیمانده از هفته قبل">
<MudChip T="string" Color="Color.Default" Size="Size.Small">
@context.Item.RightCarryover
</MudChip>
</MudTooltip>
<MudText>=</MudText>
<MudTooltip Text="مجموع موجودی راست">
<MudChip T="string" Color="Color.Primary" Size="Size.Small">
<strong>@context.Item.RightTotal</strong>
</MudChip>
</MudTooltip>
</MudStack>
</CellTemplate> </CellTemplate>
</PropertyColumn> </TemplateColumn>
<PropertyColumn Property="x => x.MatchedBalance" Title="موجودی تطبیق‌یافته">
<PropertyColumn Property="x => x.MatchedBalance" Title="تعادل">
<CellTemplate> <CellTemplate>
<MudChip T="string" Color="Color.Info" Size="Size.Small"> <MudChip T="string" Color="Color.Info" Size="Size.Small">
@context.Item.MatchedBalance.ToString("N0") <strong>@context.Item.MatchedBalance</strong>
</MudChip> </MudChip>
</CellTemplate> </CellTemplate>
</PropertyColumn> </PropertyColumn>
@@ -99,7 +135,7 @@
<PropertyColumn Property="x => x.IsExpired" Title="وضعیت"> <PropertyColumn Property="x => x.IsExpired" Title="وضعیت">
<CellTemplate> <CellTemplate>
<MudChip T="string" Color="@(context.Item.IsExpired ? Color.Error : Color.Success)" Size="Size.Small"> <MudChip T="string" Color="@(context.Item.IsExpired ? Color.Error : Color.Success)" Size="Size.Small">
@(context.Item.IsExpired ? "منقضی شده" : "فعال") @(context.Item.IsExpired ? "منقضی" : "فعال")
</MudChip> </MudChip>
</CellTemplate> </CellTemplate>
</PropertyColumn> </PropertyColumn>
@@ -188,9 +224,14 @@ private MudDataGrid <UserWeeklyBalanceModel> _grid { get; set; }
var items = response.Models.Select(b => new UserWeeklyBalanceModel var items = response.Models.Select(b => new UserWeeklyBalanceModel
{ {
UserId = b.UserId, UserId = b.UserId,
UserFullName = b.UserFullName,
WeekDisplayName = b.WeekDisplayName, WeekDisplayName = b.WeekDisplayName,
LeftBalance = b.LeftLegBalances, LeftNewMembers = b.LeftLegNewMembers,
RightBalance = b.RightLegBalances, LeftCarryover = b.LeftLegCarryover,
LeftTotal = b.LeftLegTotal,
RightNewMembers = b.RightLegNewMembers,
RightCarryover = b.RightLegCarryover,
RightTotal = b.RightLegTotal,
MatchedBalance = b.TotalBalances, MatchedBalance = b.TotalBalances,
PoolContribution = b.WeeklyPoolContribution, PoolContribution = b.WeeklyPoolContribution,
CalculatedAt = b.CalculatedAt?.ToDateTime(), CalculatedAt = b.CalculatedAt?.ToDateTime(),
@@ -228,8 +269,8 @@ private MudDataGrid <UserWeeklyBalanceModel> _grid { get; set; }
private void CalculateTotals(List<UserWeeklyBalanceModel> items) private void CalculateTotals(List<UserWeeklyBalanceModel> items)
{ {
_totalLeftBalance = items.Sum(b => (long)b.LeftBalance); _totalLeftBalance = items.Sum(b => (long)b.LeftTotal);
_totalRightBalance = items.Sum(b => (long)b.RightBalance); _totalRightBalance = items.Sum(b => (long)b.RightTotal);
_totalMatchedBalance = items.Sum(b => (long)b.MatchedBalance); _totalMatchedBalance = items.Sum(b => (long)b.MatchedBalance);
} }
@@ -247,9 +288,19 @@ private MudDataGrid <UserWeeklyBalanceModel> _grid { get; set; }
private class UserWeeklyBalanceModel private class UserWeeklyBalanceModel
{ {
public long UserId { get; set; } public long UserId { get; set; }
public string UserFullName { get; set; } = string.Empty;
public string WeekDisplayName { get; set; } public string WeekDisplayName { get; set; }
public int LeftBalance { get; set; }
public int RightBalance { get; set; } // چپ
public int LeftNewMembers { get; set; }
public int LeftCarryover { get; set; }
public int LeftTotal { get; set; }
// راست
public int RightNewMembers { get; set; }
public int RightCarryover { get; set; }
public int RightTotal { get; set; }
public int MatchedBalance { get; set; } public int MatchedBalance { get; set; }
public long PoolContribution { get; set; } public long PoolContribution { get; set; }
public DateTime? CalculatedAt { get; set; } public DateTime? CalculatedAt { get; set; }