F4: ستون پکیج در CSV، اصلاح rename UserWalletChangeLog→UserWalletHistory
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 3m8s
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 3m8s
- WithdrawalRequests: اضافه شدن PackageName به مدل و CSV - ManualPayments: اضافه شدن ستون پکیج به CSV - ConfigureService: اصلاح using و DI برای UserWalletHistory - WalletManagementPage: اصلاح تمام رفرنسهای UserWalletChangeLog - NuGet: v0.0.189
This commit is contained in:
@@ -138,7 +138,7 @@
|
||||
|
||||
<!-- CMS Protobuf NuGet package (used for both local dev and Docker builds) -->
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Foursat.CMSMicroservice.Protobuf" Version="0.0.188" />
|
||||
<PackageReference Include="Foursat.CMSMicroservice.Protobuf" Version="0.0.189" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
|
||||
@@ -30,7 +30,7 @@ using CMSMicroservice.Protobuf.Protos.SitePage;
|
||||
using CMSMicroservice.Protobuf.Protos.SitePageSettings;
|
||||
using CMSMicroservice.Protobuf.Protos.UserContract;
|
||||
using CMSMicroservice.Protobuf.Protos.UserWallet;
|
||||
using CMSMicroservice.Protobuf.Protos.UserWalletChangeLog;
|
||||
using CMSMicroservice.Protobuf.Protos.UserWalletHistory;
|
||||
using BackOffice.Common.Utilities;
|
||||
using BackOffice.Services.DiscountProduct;
|
||||
using BackOffice.Services.DiscountCategory;
|
||||
@@ -167,7 +167,7 @@ public static class ConfigureServices
|
||||
|
||||
// User Wallet Services
|
||||
services.AddTransient(sp => new UserWalletContract.UserWalletContractClient(sp.GetRequiredService<CallInvoker>()));
|
||||
services.AddTransient(sp => new UserWalletChangeLogContract.UserWalletChangeLogContractClient(sp.GetRequiredService<CallInvoker>()));
|
||||
services.AddTransient(sp => new UserWalletHistoryContract.UserWalletHistoryContractClient(sp.GetRequiredService<CallInvoker>()));
|
||||
|
||||
return services;
|
||||
}
|
||||
|
||||
@@ -19,4 +19,5 @@ public class WithdrawalRequestModel
|
||||
public string? BankTrackingCode { get; set; }
|
||||
public string? PaymentFailureReason { get; set; }
|
||||
public string? IbanNumber { get; set; }
|
||||
public string? PackageName { get; set; }
|
||||
}
|
||||
|
||||
@@ -87,7 +87,8 @@ public partial class WithdrawalRequests
|
||||
BankReferenceId = grpcModel.BankReferenceId,
|
||||
BankTrackingCode = grpcModel.BankTrackingCode,
|
||||
PaymentFailureReason = grpcModel.PaymentFailureReason,
|
||||
IbanNumber = grpcModel.IbanNumber
|
||||
IbanNumber = grpcModel.IbanNumber,
|
||||
PackageName = grpcModel.PackageName
|
||||
};
|
||||
}
|
||||
|
||||
@@ -269,7 +270,7 @@ public partial class WithdrawalRequests
|
||||
}
|
||||
|
||||
var sb = new StringBuilder();
|
||||
sb.AppendLine("شناسه,کاربر,نام کاربر,مبلغ,وضعیت,روش,شماره شبا,تاریخ درخواست,تاریخ پردازش,شماره مرجع بانکی");
|
||||
sb.AppendLine("شناسه,کاربر,نام کاربر,پکیج,مبلغ,وضعیت,روش,شماره شبا,تاریخ درخواست,تاریخ پردازش,شماره مرجع بانکی");
|
||||
|
||||
foreach (var r in result.Models)
|
||||
{
|
||||
@@ -278,6 +279,7 @@ public partial class WithdrawalRequests
|
||||
mapped.Id,
|
||||
mapped.UserId,
|
||||
EscapeCsv(mapped.UserName),
|
||||
EscapeCsv(mapped.PackageName ?? "-"),
|
||||
mapped.Amount,
|
||||
EscapeCsv(GetStatusText(mapped.Status)),
|
||||
EscapeCsv(GetMethodText(mapped.Method)),
|
||||
|
||||
@@ -37,7 +37,7 @@ public partial class ManualPayments
|
||||
}
|
||||
|
||||
var sb = new StringBuilder();
|
||||
sb.AppendLine("شناسه,شناسه کاربر,نام کاربر,مبلغ,نوع,وضعیت,تاریخ ایجاد");
|
||||
sb.AppendLine("شناسه,شناسه کاربر,نام کاربر,پکیج,مبلغ,نوع,وضعیت,تاریخ ایجاد");
|
||||
|
||||
foreach (var m in response.Models)
|
||||
{
|
||||
@@ -45,6 +45,7 @@ public partial class ManualPayments
|
||||
m.Id,
|
||||
m.UserId,
|
||||
EscapeCsv(m.UserFullName),
|
||||
EscapeCsv(m.PackageName ?? "-"),
|
||||
m.Amount.ToString("N0"),
|
||||
EscapeCsv(GetTypeText((int)m.Type)),
|
||||
EscapeCsv(GetStatusText((int)m.Status)),
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
@attribute [Authorize(Roles = "Administrator")]
|
||||
|
||||
@using CMSMicroservice.Protobuf.Protos.UserWallet
|
||||
@using CMSMicroservice.Protobuf.Protos.UserWalletChangeLog
|
||||
@using CMSMicroservice.Protobuf.Protos.UserWalletHistory
|
||||
@using BackOffice.Pages.AutoComplete
|
||||
|
||||
@inject UserWalletContract.UserWalletContractClient WalletClient
|
||||
@inject UserWalletChangeLogContract.UserWalletChangeLogContractClient ChangeLogClient
|
||||
@inject UserWalletHistoryContract.UserWalletHistoryContractClient ChangeLogClient
|
||||
|
||||
<div>
|
||||
<MudText Typo="Typo.h5" Class="mb-3">مدیریت کیفپول کاربران</MudText>
|
||||
@@ -85,7 +85,7 @@
|
||||
OnClick="ApplyLogFilter">جستجو</MudButton>
|
||||
</MudStack>
|
||||
|
||||
<MudDataGrid T="GetAllUserWalletChangeLogByFilterResponseModel" @ref="_logGrid"
|
||||
<MudDataGrid T="GetAllUserWalletHistoryByFilterResponseModel" @ref="_logGrid"
|
||||
ServerData="LoadChangeLogs"
|
||||
Hover="true" Dense="true"
|
||||
Height="calc(100vh - 340px)">
|
||||
@@ -135,7 +135,7 @@
|
||||
<MudAlert Severity="Severity.Info" Dense="true" Variant="Variant.Text" Class="my-4">موردی یافت نشد.</MudAlert>
|
||||
</NoRecordsContent>
|
||||
<PagerContent>
|
||||
<MudDataGridPager T="GetAllUserWalletChangeLogByFilterResponseModel" PageSizeOptions="@(new int[] { 20, 50, 100 })"
|
||||
<MudDataGridPager T="GetAllUserWalletHistoryByFilterResponseModel" PageSizeOptions="@(new int[] { 20, 50, 100 })"
|
||||
InfoFormat="سطر {first_item} تا {last_item} از {all_items}"
|
||||
RowsPerPageString="تعداد در صفحه" />
|
||||
</PagerContent>
|
||||
@@ -147,7 +147,7 @@
|
||||
@code {
|
||||
private int _activeTab;
|
||||
private MudDataGrid<GetAllUserWalletByFilterResponseModel>? _walletGrid;
|
||||
private MudDataGrid<GetAllUserWalletChangeLogByFilterResponseModel>? _logGrid;
|
||||
private MudDataGrid<GetAllUserWalletHistoryByFilterResponseModel>? _logGrid;
|
||||
|
||||
// Wallet filters
|
||||
private long? _filterUserId;
|
||||
@@ -183,14 +183,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
private async Task<GridData<GetAllUserWalletChangeLogByFilterResponseModel>> LoadChangeLogs(GridState<GetAllUserWalletChangeLogByFilterResponseModel> state)
|
||||
private async Task<GridData<GetAllUserWalletHistoryByFilterResponseModel>> LoadChangeLogs(GridState<GetAllUserWalletHistoryByFilterResponseModel> state)
|
||||
{
|
||||
try
|
||||
{
|
||||
var request = new GetAllUserWalletChangeLogByFilterRequest
|
||||
var request = new GetAllUserWalletHistoryByFilterRequest
|
||||
{
|
||||
PaginationState = new() { PageNumber = state.Page + 1, PageSize = state.PageSize },
|
||||
Filter = new GetAllUserWalletChangeLogByFilterFilter()
|
||||
Filter = new GetAllUserWalletHistoryByFilterFilter()
|
||||
};
|
||||
|
||||
if (_logFilterUserId.HasValue && _logFilterUserId.Value > 0)
|
||||
@@ -199,8 +199,8 @@
|
||||
if (_logFilterIsIncrease.HasValue)
|
||||
request.Filter.IsIncrease = _logFilterIsIncrease.Value;
|
||||
|
||||
var result = await ChangeLogClient.GetAllUserWalletChangeLogByFilterAsync(request);
|
||||
return new GridData<GetAllUserWalletChangeLogByFilterResponseModel>
|
||||
var result = await ChangeLogClient.GetAllUserWalletHistoryByFilterAsync(request);
|
||||
return new GridData<GetAllUserWalletHistoryByFilterResponseModel>
|
||||
{
|
||||
Items = result?.Models?.ToList() ?? new(),
|
||||
TotalItems = (int)(result?.MetaData?.TotalCount ?? 0)
|
||||
@@ -209,7 +209,7 @@
|
||||
catch (Exception ex)
|
||||
{
|
||||
Snackbar.Add($"خطا: {ex.Message}", Severity.Error);
|
||||
return new GridData<GetAllUserWalletChangeLogByFilterResponseModel>();
|
||||
return new GridData<GetAllUserWalletHistoryByFilterResponseModel>();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user