Add OtpDialogService for mobile-friendly OTP authentication dialog
This commit is contained in:
29
src/FrontOffice.Main/Pages/Store/OrderDetail.razor.cs
Normal file
29
src/FrontOffice.Main/Pages/Store/OrderDetail.razor.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using FrontOffice.Main.Utilities;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace FrontOffice.Main.Pages.Store;
|
||||
|
||||
public partial class OrderDetail : ComponentBase
|
||||
{
|
||||
[Inject] private OrderService OrderService { get; set; } = default!;
|
||||
|
||||
[Parameter] public long id { get; set; }
|
||||
|
||||
private Order? _order;
|
||||
private bool _loading;
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
_loading = true;
|
||||
_order = await OrderService.GetOrderAsync(id);
|
||||
_loading = false;
|
||||
}
|
||||
|
||||
private static string FormatPrice(long price) => string.Format("{0:N0} تومان", price);
|
||||
private static string GetStatusText(OrderStatus status) => status switch
|
||||
{
|
||||
OrderStatus.Paid => "پرداختشده",
|
||||
_ => "در انتظار",
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user