Refactor: Update Protobuf references to CMSMicroservice across multiple components
- Changed Protobuf imports from FrontOffice.BFF to CMSMicroservice in Profile components (EditAddressDialog, Index, PaymentCallback, Personal, Settings). - Updated CheckoutSummary, OrderDetail, OrderTracking, and Orders pages to use new UserOrder Protobuf definitions. - Refactored WalletService, PackageService, and other utility services to align with new Protobuf structure. - Adjusted appsettings.json for local development URL. - Removed unused validators and simplified validation logic in AuthDialog. - Enhanced ClubMembershipContractDialog to utilize new OtpToken service for OTP handling.
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
@page "/profile/payment-callback"
|
||||
@attribute [Authorize]
|
||||
@using Blazored.LocalStorage
|
||||
@using FrontOffice.BFF.Package.Protobuf.Protos.Package
|
||||
@using FrontOffice.BFF.User.Protobuf.Protos.User
|
||||
@using CMSMicroservice.Protobuf.Protos.Package
|
||||
@using CMSMicroservice.Protobuf.Protos.User
|
||||
|
||||
|
||||
<PageTitle>نتیجه پرداخت | کارا بازار سلامت</PageTitle>
|
||||
|
||||
@@ -112,13 +113,14 @@
|
||||
{
|
||||
OrderId = OrderId,
|
||||
TransactionId = TransactionId,
|
||||
Authority = Authority,
|
||||
Status = Status ?? "NOK"
|
||||
PaymentSuccess = Status == "OK",
|
||||
RefId = !string.IsNullOrEmpty(Authority) ? Authority : null,
|
||||
Message = !string.IsNullOrEmpty(Status) ? Status : null
|
||||
});
|
||||
|
||||
_isSuccess = response.Success;
|
||||
_message = response.Message;
|
||||
_refId = response.RefId;
|
||||
_refId = response.ReferenceCode ?? "";
|
||||
_walletBalance = response.WalletBalance;
|
||||
_discountBalance = response.DiscountBalance;
|
||||
|
||||
@@ -153,7 +155,7 @@
|
||||
{
|
||||
try
|
||||
{
|
||||
var userResponse = await UserContractClient.GetUserAsync(new Google.Protobuf.WellKnownTypes.Empty());
|
||||
var userResponse = await UserContractClient.GetUserForCustomerAsync(new CMSMicroservice.Protobuf.Protos.User.GetUserForCustomerRequest());
|
||||
if (!string.IsNullOrWhiteSpace(userResponse.Token))
|
||||
{
|
||||
// ذخیره توکن جدید در localStorage
|
||||
|
||||
Reference in New Issue
Block a user