diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/MyOrders.cshtml b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/MyOrders.cshtml new file mode 100644 index 00000000..d340cf92 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/MyOrders.cshtml @@ -0,0 +1,39 @@ +@page +@using EShopOnAbp.Localization +@using Microsoft.Extensions.Localization +@model EShopOnAbp.PublicWeb.Pages.MyOrdersModel + +@inject IStringLocalizer L + +@section scripts { + +} + +

Hello

+ +@foreach (var item in Model.MyOrders) +{ + + +
@item.OrderDate
+

@item.OrderStatus

+

@item.Buyer.Name

+ + @foreach (var product in item.Items) + { + + + + + + +

@product.ProductName x @product.Units

+
+
+
+ } +
+
+
+
+} \ No newline at end of file diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/MyOrders.cshtml.cs b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/MyOrders.cshtml.cs new file mode 100644 index 00000000..710c5d84 --- /dev/null +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/MyOrders.cshtml.cs @@ -0,0 +1,22 @@ +using System.Collections.Generic; +using System.Threading.Tasks; +using EShopOnAbp.OrderingService.Orders; +using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; + +namespace EShopOnAbp.PublicWeb.Pages; + +public class MyOrdersModel : AbpPageModel +{ + private readonly IOrderAppService _orderAppService; + public List MyOrders { get; set; } + + public MyOrdersModel(IOrderAppService orderAppService) + { + _orderAppService = orderAppService; + } + + public async Task OnGet() + { + MyOrders = await _orderAppService.GetMyOrdersAsync(new GetMyOrdersInput()); + } +} \ No newline at end of file diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/myOrders.js b/apps/public-web/src/EShopOnAbp.PublicWeb/Pages/myOrders.js new file mode 100644 index 00000000..e69de29b