Update order system with new gRPC services and wallet integration
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using FrontOffice.BFF.UserOrder.Protobuf.Protos.UserOrder;
|
||||
using FrontOffice.Main.Utilities;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
@@ -7,7 +8,7 @@ public partial class Orders : ComponentBase
|
||||
{
|
||||
[Inject] private OrderService OrderService { get; set; } = default!;
|
||||
|
||||
private List<Order> _orders = new();
|
||||
private List<GetUserOrderResponse> _orders = new();
|
||||
private bool _loading;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
@@ -18,10 +19,17 @@ public partial class Orders : ComponentBase
|
||||
}
|
||||
|
||||
private static string FormatPrice(long price) => string.Format("{0:N0} تومان", price);
|
||||
private static string GetStatusText(OrderStatus status) => status switch
|
||||
|
||||
|
||||
private string GetStatusText(PaymentStatus contextPaymentStatus)
|
||||
{
|
||||
OrderStatus.Paid => "پرداختشده",
|
||||
_ => "در انتظار",
|
||||
};
|
||||
return contextPaymentStatus switch
|
||||
{
|
||||
PaymentStatus.Pending => "در انتظار پرداخت",
|
||||
PaymentStatus.Success => "پرداخت شده",
|
||||
PaymentStatus.Reject => "پرداخت ناموفق",
|
||||
_ => "نامشخص",
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user