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:
masoodafar-web
2026-02-03 00:02:16 +03:30
parent 26ce7fd2b6
commit eab978188a
40 changed files with 261 additions and 258 deletions
@@ -1,5 +1,5 @@
using DateTimeConverterCL;
using FrontOffice.BFF.ShopingCart.Protobuf.Protos.ShopingCart;
using CMSMicroservice.Protobuf.Protos.UserCarts;
using Google.Protobuf.WellKnownTypes;
using Blazored.LocalStorage;
@@ -16,7 +16,7 @@ public record CartItem(long cartId,long ProductId, string Title, string ImageUrl
public class CartService
{
private readonly ShopingCartContract.ShopingCartContractClient _client;
private readonly UserCartsContract.UserCartsContractClient _client;
private readonly ILocalStorageService _localStorage;
private readonly List<CartItem> _items = new();
private const string TokenStorageKey = "auth:token";
@@ -24,7 +24,7 @@ public class CartService
public event Action? OnChange;
public CartService(ShopingCartContract.ShopingCartContractClient client, ILocalStorageService localStorage)
public CartService(CMSMicroservice.Protobuf.Protos.UserCarts.UserCartsContract.UserCartsContractClient client, ILocalStorageService localStorage)
{
_client = client;
_localStorage = localStorage;
@@ -83,6 +83,7 @@ public class CartService
await _client.UpdateUserCartAsync(new UpdateUserCartRequest
{
UserCartId = existing.cartId,
Count = newQuantity
});
}
@@ -214,7 +215,7 @@ public class CartService
try
{
var response = await _client.GetAllUserCartAsync(new Empty());
var response = await _client.GetCustomerCartAsync(new GetUserCartForCustomerRequest());
_items.Clear();
foreach (var model in response.Models)
{