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,6 +1,5 @@
|
||||
using Blazored.LocalStorage;
|
||||
using FrontOffice.BFF.User.Protobuf.Protos.User;
|
||||
using FrontOffice.BFF.User.Protobuf.Validator;
|
||||
using CMSMicroservice.Protobuf.Protos.User;
|
||||
using FrontOffice.Main.Utilities;
|
||||
using Grpc.Core;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
@@ -25,11 +24,9 @@ public partial class AuthDialog : IDisposable
|
||||
|
||||
public AuthStep _currentStep = AuthStep.Phone;
|
||||
|
||||
private readonly CreateNewOtpTokenRequestValidator _phoneRequestValidator = new();
|
||||
private readonly CreateNewOtpTokenRequest _phoneRequest = new();
|
||||
private MudForm? _phoneForm;
|
||||
|
||||
private readonly VerifyOtpTokenRequestValidator _verifyRequestValidator = new();
|
||||
private readonly VerifyOtpTokenRequest _verifyRequest = new();
|
||||
private MudForm? _verifyForm;
|
||||
|
||||
@@ -105,10 +102,10 @@ public partial class AuthDialog : IDisposable
|
||||
|
||||
try
|
||||
{
|
||||
var validationResult = _phoneRequestValidator.Validate(_phoneRequest);
|
||||
if (!validationResult.IsValid)
|
||||
var validationResult = true; // _phoneRequestValidator.Validate(_phoneRequest);
|
||||
if (!validationResult)
|
||||
{
|
||||
_errorMessage = string.Join(" ", validationResult.Errors.Select(e => e.ErrorMessage).Distinct());
|
||||
_errorMessage = "لطفاً شماره تلفن معتبر وارد کنید."; // string.Join(" ", validationResult.Errors.Select(e => e.ErrorMessage).Distinct());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -189,10 +186,10 @@ public partial class AuthDialog : IDisposable
|
||||
_verifyRequest.ParentReferralCode = storedReferralCode;
|
||||
}
|
||||
|
||||
var validationResult = _verifyRequestValidator.Validate(_verifyRequest);
|
||||
if (!validationResult.IsValid)
|
||||
var validationResult = true; // _verifyRequestValidator.Validate(_verifyRequest);
|
||||
if (!validationResult)
|
||||
{
|
||||
_errorMessage = string.Join(" ", validationResult.Errors.Select(e => e.ErrorMessage).Distinct());
|
||||
_errorMessage = "لطفاً کد تأیید معتبر وارد کنید."; // string.Join(" ", validationResult.Errors.Select(e => e.ErrorMessage).Distinct());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user