feat: update commission protobuf version; enhance weekly balance display with new member counts and carryover logic
Build and Deploy / build (push) Successful in 1m26s
Build and Deploy / build (push) Successful in 1m26s
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<PackageReference Include="DateTimeConverterCL" Version="1.0.0" />
|
||||
<PackageReference Include="Foursat.FrontOffice.BFF.City.Protobuf" Version="0.0.2" />
|
||||
<PackageReference Include="Foursat.FrontOffice.BFF.ClubMembership.Protobuf" Version="0.0.4" />
|
||||
<PackageReference Include="Foursat.FrontOffice.BFF.Commission.Protobuf" Version="0.0.4" />
|
||||
<PackageReference Include="Foursat.FrontOffice.BFF.Commission.Protobuf" Version="0.0.6" />
|
||||
<PackageReference Include="Foursat.FrontOffice.BFF.Configuration.Protobuf" Version="0.0.4" />
|
||||
<!-- <PackageReference Include="Foursat.FrontOffice.BFF.ClubMembership.Protobuf" Version="0.0.3" /> -->
|
||||
<!-- <PackageReference Include="Foursat.FrontOffice.BFF.Commission.Protobuf" Version="0.0.2" /> -->
|
||||
|
||||
@@ -117,12 +117,24 @@
|
||||
<MudSimpleTable Dense="true" Hover="true" Style="background: transparent;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><MudText Typo="Typo.body2">حداقل تعادل (پایه کمیسیون):</MudText></td>
|
||||
<td class="text-end"><MudText Typo="Typo.body1" Color="Color.Warning"><strong>@_weeklyBalance.MinBalanceFormatted</strong></MudText></td>
|
||||
<td><MudText Typo="Typo.body2">اعضای جدید چپ:</MudText></td>
|
||||
<td class="text-end"><MudText Typo="Typo.body1" Color="Color.Info"><strong>@_weeklyBalance.LeftNewMembersFormatted</strong></MudText></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><MudText Typo="Typo.body2">تعداد تعادل (دفعات):</MudText></td>
|
||||
<td class="text-end"><MudText Typo="Typo.body1" Color="Color.Secondary"><strong>@_weeklyBalance.BalanceCount</strong></MudText></td>
|
||||
<td><MudText Typo="Typo.body2">اعضای جدید راست:</MudText></td>
|
||||
<td class="text-end"><MudText Typo="Typo.body1" Color="Color.Success"><strong>@_weeklyBalance.RightNewMembersFormatted</strong></MudText></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><MudText Typo="Typo.body2">انتقال از هفته قبل (چپ):</MudText></td>
|
||||
<td class="text-end"><MudText Typo="Typo.body1" Color="Color.Info"><strong>@_weeklyBalance.LeftCarryoverFormatted</strong></MudText></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><MudText Typo="Typo.body2">انتقال از هفته قبل (راست):</MudText></td>
|
||||
<td class="text-end"><MudText Typo="Typo.body1" Color="Color.Success"><strong>@_weeklyBalance.RightCarryoverFormatted</strong></MudText></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><MudText Typo="Typo.body2">حداقل تعادل (پایه کمیسیون):</MudText></td>
|
||||
<td class="text-end"><MudText Typo="Typo.body1" Color="Color.Warning"><strong>@_weeklyBalance.MinBalanceFormatted</strong></MudText></td>
|
||||
</tr>
|
||||
<tr style="background-color: var(--mud-palette-primary-lighten);">
|
||||
<td><MudText Typo="Typo.subtitle1"><strong>کمیسیون محاسبه شده:</strong></MudText></td>
|
||||
@@ -130,13 +142,6 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</MudSimpleTable>
|
||||
|
||||
@if (_weeklyBalance.LeftCarryover > 0 || _weeklyBalance.RightCarryover > 0)
|
||||
{
|
||||
<MudAlert Severity="Severity.Info" Variant="Variant.Text" Dense="true" Class="mt-2">
|
||||
<strong>انتقال به هفته بعد:</strong> چپ: @_weeklyBalance.LeftCarryoverFormatted | راست: @_weeklyBalance.RightCarryoverFormatted
|
||||
</MudAlert>
|
||||
}
|
||||
</MudPaper>
|
||||
}
|
||||
else if (_hasError)
|
||||
|
||||
@@ -21,10 +21,8 @@
|
||||
</div>
|
||||
</MudStack>
|
||||
<MudSpacer/>
|
||||
@* <MudButton Variant="Variant.Filled"
|
||||
Color="Color.Primary"
|
||||
StartIcon="@Icons.Material.Filled.ShoppingCart"
|
||||
OnClick="OpenPurchaseOptions">تامین اعتبار</MudButton> *@
|
||||
|
||||
<MudButton Variant="Variant.Outlined" Href="https://dayadiamond.ir/" >سامانه دایا</MudButton>
|
||||
</MudStack>
|
||||
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
Variant="Variant.Outlined"
|
||||
Disabled="_withdrawMethod == WithdrawalMethodClient.Diamond"
|
||||
Placeholder="IRxxxxxxxxxxxx"
|
||||
Adornment="Adornment.Start"
|
||||
Adornment="Adornment.End"
|
||||
AdornmentText="IR" />
|
||||
|
||||
<MudText Typo="Typo.caption" Class="mud-text-secondary">
|
||||
|
||||
@@ -58,7 +58,8 @@ public partial class WithdrawalRequests : ComponentBase
|
||||
try
|
||||
{
|
||||
_isSubmittingWithdrawal = true;
|
||||
await WalletService.RequestWithdrawalAsync(_selectedPayout.Id, _withdrawMethod, _withdrawIban);
|
||||
_withdrawIban=_withdrawIban!.Trim().ToUpper().Replace("IR", "").Replace(" ", "");
|
||||
await WalletService.RequestWithdrawalAsync(_selectedPayout.Id, _withdrawMethod, "IR"+_withdrawIban);
|
||||
Snackbar.Add("درخواست برداشت ثبت شد.", Severity.Success);
|
||||
|
||||
// بروزرسانی لیست
|
||||
|
||||
@@ -63,8 +63,10 @@ public class WeeklyBalanceDto
|
||||
public long MinBalance { get; set; }
|
||||
public int BalanceCount { get; set; }
|
||||
public long CalculatedCommission { get; set; }
|
||||
public long LeftCarryover { get; set; }
|
||||
public long RightCarryover { get; set; }
|
||||
public int LeftCarryover { get; set; }
|
||||
public int RightCarryover { get; set; }
|
||||
public int LeftNewMembers { get; set; }
|
||||
public int RightNewMembers { get; set; }
|
||||
public DateTime StartDate { get; set; }
|
||||
public DateTime EndDate { get; set; }
|
||||
|
||||
@@ -75,6 +77,8 @@ public class WeeklyBalanceDto
|
||||
public string CalculatedCommissionFormatted => $"{CalculatedCommission:N0} ";
|
||||
public string LeftCarryoverFormatted => $"{LeftCarryover:N0} ";
|
||||
public string RightCarryoverFormatted => $"{RightCarryover:N0} ";
|
||||
public string LeftNewMembersFormatted => $"{LeftNewMembers:N0}";
|
||||
public string RightNewMembersFormatted => $"{RightNewMembers:N0}";
|
||||
public string StartDatePersian => StartDate.MiladiToJalali();
|
||||
public string EndDatePersian => EndDate.MiladiToJalali();
|
||||
}
|
||||
|
||||
@@ -159,6 +159,9 @@ public class CommissionService
|
||||
if (weekDefinitionId.HasValue)
|
||||
{
|
||||
request.WeekDefinitionId = weekDefinitionId.Value;
|
||||
}else
|
||||
{
|
||||
request.WeekDefinitionId=7;
|
||||
}
|
||||
|
||||
var response = await _client.GetMyWeeklyBalancesAsync(request);
|
||||
@@ -175,8 +178,10 @@ public class CommissionService
|
||||
MinBalance = Math.Min(balance.LeftLegBalances, balance.RightLegBalances),
|
||||
BalanceCount = balance.TotalBalances,
|
||||
CalculatedCommission = balance.WeeklyPoolContribution,
|
||||
LeftCarryover = Math.Max(0, balance.LeftLegBalances - balance.RightLegBalances),
|
||||
RightCarryover = Math.Max(0, balance.RightLegBalances - balance.LeftLegBalances),
|
||||
LeftCarryover = balance.LeftLegCarryover,
|
||||
RightCarryover = balance.RightLegCarryover,
|
||||
LeftNewMembers = balance.LeftLegNewMembers,
|
||||
RightNewMembers = balance.RightLegNewMembers,
|
||||
StartDate = balance.CalculatedAt?.ToDateTime().AddDays(-7) ?? DateTime.Now.AddDays(-7),
|
||||
EndDate = balance.CalculatedAt?.ToDateTime() ?? DateTime.Now
|
||||
};
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
// "GwUrl": "https://localhost:34781",
|
||||
"GwUrl": "https://frontoffice-bff.foursat.afrino.co",
|
||||
"DownloadUrl": "https://dl.afrino.co",
|
||||
"EncryptionSettings": {
|
||||
|
||||
Reference in New Issue
Block a user