diff --git a/src/FrontOffice.Main/FrontOffice.Main.csproj b/src/FrontOffice.Main/FrontOffice.Main.csproj index 081ff3b..f1f685c 100644 --- a/src/FrontOffice.Main/FrontOffice.Main.csproj +++ b/src/FrontOffice.Main/FrontOffice.Main.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/FrontOffice.Main/Pages/Commission/WeeklyBalancePage.razor b/src/FrontOffice.Main/Pages/Commission/WeeklyBalancePage.razor index a279d1b..251a791 100644 --- a/src/FrontOffice.Main/Pages/Commission/WeeklyBalancePage.razor +++ b/src/FrontOffice.Main/Pages/Commission/WeeklyBalancePage.razor @@ -117,12 +117,24 @@ - حداقل تعادل (پایه کمیسیون): - @_weeklyBalance.MinBalanceFormatted + اعضای جدید چپ: + @_weeklyBalance.LeftNewMembersFormatted - تعداد تعادل (دفعات): - @_weeklyBalance.BalanceCount + اعضای جدید راست: + @_weeklyBalance.RightNewMembersFormatted + + + انتقال از هفته قبل (چپ): + @_weeklyBalance.LeftCarryoverFormatted + + + انتقال از هفته قبل (راست): + @_weeklyBalance.RightCarryoverFormatted + + + حداقل تعادل (پایه کمیسیون): + @_weeklyBalance.MinBalanceFormatted کمیسیون محاسبه شده: @@ -130,13 +142,6 @@ - - @if (_weeklyBalance.LeftCarryover > 0 || _weeklyBalance.RightCarryover > 0) - { - - انتقال به هفته بعد: چپ: @_weeklyBalance.LeftCarryoverFormatted | راست: @_weeklyBalance.RightCarryoverFormatted - - } } else if (_hasError) diff --git a/src/FrontOffice.Main/Pages/Profile/Index.razor b/src/FrontOffice.Main/Pages/Profile/Index.razor index 1bf983b..0f85052 100644 --- a/src/FrontOffice.Main/Pages/Profile/Index.razor +++ b/src/FrontOffice.Main/Pages/Profile/Index.razor @@ -21,10 +21,8 @@ - @* تامین اعتبار *@ + + سامانه دایا diff --git a/src/FrontOffice.Main/Pages/Profile/WithdrawalRequests.razor b/src/FrontOffice.Main/Pages/Profile/WithdrawalRequests.razor index abea33f..6703628 100644 --- a/src/FrontOffice.Main/Pages/Profile/WithdrawalRequests.razor +++ b/src/FrontOffice.Main/Pages/Profile/WithdrawalRequests.razor @@ -62,7 +62,7 @@ Variant="Variant.Outlined" Disabled="_withdrawMethod == WithdrawalMethodClient.Diamond" Placeholder="IRxxxxxxxxxxxx" - Adornment="Adornment.Start" + Adornment="Adornment.End" AdornmentText="IR" /> diff --git a/src/FrontOffice.Main/Pages/Profile/WithdrawalRequests.razor.cs b/src/FrontOffice.Main/Pages/Profile/WithdrawalRequests.razor.cs index abd9568..5866666 100644 --- a/src/FrontOffice.Main/Pages/Profile/WithdrawalRequests.razor.cs +++ b/src/FrontOffice.Main/Pages/Profile/WithdrawalRequests.razor.cs @@ -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); // بروزرسانی لیست diff --git a/src/FrontOffice.Main/Utilities/CommissionDtos.cs b/src/FrontOffice.Main/Utilities/CommissionDtos.cs index f82fe79..b546ed3 100644 --- a/src/FrontOffice.Main/Utilities/CommissionDtos.cs +++ b/src/FrontOffice.Main/Utilities/CommissionDtos.cs @@ -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(); } diff --git a/src/FrontOffice.Main/Utilities/CommissionService.cs b/src/FrontOffice.Main/Utilities/CommissionService.cs index 10a3f4b..25e7a1a 100644 --- a/src/FrontOffice.Main/Utilities/CommissionService.cs +++ b/src/FrontOffice.Main/Utilities/CommissionService.cs @@ -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 }; diff --git a/src/FrontOffice.Main/appsettings.json b/src/FrontOffice.Main/appsettings.json index 548a9eb..8d57fbd 100644 --- a/src/FrontOffice.Main/appsettings.json +++ b/src/FrontOffice.Main/appsettings.json @@ -1,4 +1,5 @@ { +// "GwUrl": "https://localhost:34781", "GwUrl": "https://frontoffice-bff.foursat.afrino.co", "DownloadUrl": "https://dl.afrino.co", "EncryptionSettings": {