F6+F7: مقادیر داینامیک کیف‌پول جادویی، اصلاح rename، افزایش سقف تخفیفی
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 2m34s

F6: MagicWallet.razor — جایگزینی ×2.5 و سقف‌های ثابت با مقادیر از API
    - WalletService: MagicMultiplier + MagicMaxCredit از gRPC response
    - Index.razor.cs: 'شارژ ×2.5' → 'شارژ چند‌برابری' (تایل داشبورد)
F7: ChargeDiscountWallet.razor — Max از 100M تومان به 1B تومان
اصلاح rename:
    - ConfigureServices: UserWalletChangeLog → UserWalletHistory
    - WalletService: اصلاح تمام رفرنس‌ها
NuGet: v0.0.189
This commit is contained in:
masoodafar-web
2026-02-27 09:01:12 +03:30
parent 474d364a25
commit ecc4f447ba
6 changed files with 23 additions and 20 deletions
@@ -1,6 +1,5 @@
using DateTimeConverterCL;
using CMSMicroservice.Protobuf.Protos.UserWallet;
using CMSMicroservice.Protobuf.Protos.UserWalletChangeLog;
using Google.Protobuf.WellKnownTypes;
namespace FrontOffice.Main.Utilities;
@@ -33,7 +32,9 @@ public record MagicWalletStatus(
long MagicRemainingDeposit,
long Balance,
DateTime? MagicActivatedAt,
int PurchaseCycleCount
int PurchaseCycleCount,
double MagicMultiplier = 2.5,
long MagicMaxCredit = 2_500_000_000
);
public class WalletService
@@ -63,7 +64,7 @@ public class WalletService
{
try
{
var request = new GetCustomerWalletChangeLogRequest();
var request = new GetCustomerWalletHistoryRequest();
if (referenceId.HasValue)
{
request.ReferenceId = referenceId.Value;
@@ -72,7 +73,7 @@ public class WalletService
{
request.IsIncrease = isIncrease.Value;
}
var response = await _client.GetCustomerWalletChangeLogAsync(request);
var response = await _client.GetCustomerWalletHistoryAsync(request);
return response.Models
.Select(log => new WalletTransaction(
@@ -96,7 +97,7 @@ public class WalletService
}
}
private static string ResolveTransactionDate(CustomerWalletChangeLogModel model)
private static string ResolveTransactionDate(CustomerWalletHistoryModel model)
{
if (model.CreatedAt is not null)
{
@@ -114,7 +115,7 @@ public class WalletService
return DateTime.Now.MiladiToJalaliWithTime();
}
private static string ResolveDescription(CustomerWalletChangeLogModel model)
private static string ResolveDescription(CustomerWalletHistoryModel model)
{
var parts = new List<string>();
@@ -214,7 +215,9 @@ public class WalletService
response.MagicRemainingDeposit,
response.Balance,
activatedAt,
response.PurchaseCycleCount
response.PurchaseCycleCount,
response.MagicMultiplier > 0 ? response.MagicMultiplier : 2.5,
response.MagicMaxCredit > 0 ? response.MagicMaxCredit : 2_500_000_000
);
}
catch