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