-
Notifications
You must be signed in to change notification settings - Fork 528
Expand file tree
/
Copy pathCustomerOrders.cshtml
More file actions
95 lines (91 loc) · 4.02 KB
/
CustomerOrders.cshtml
File metadata and controls
95 lines (91 loc) · 4.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
@model CustomerOrderListModel
@inject IPageHeadBuilder pagebuilder
@inject IWorkContext workContext
@{
Layout = "_TwoColumns";
var supportRtl = workContext.WorkingLanguage.Rtl;
//title
pagebuilder.AddTitleParts(Loc["Title.Account"]);
}
@section left
{
@await Component.InvokeAsync("CustomerNavigation", new { selectedTabId = AccountNavigationEnum.Orders })
}
<div class="page account-page order-list-page pl-lg-3 pt-lg-0 pt-3">
<h1 class="generalTitle h2">@Loc["Account.CustomerOrders"]</h1>
<!-- Search Bar
<div class="order-search-bar mb-3">
<form method="get" action="@Url.Action("CustomerOrders")">
<div class="input-group">
<input type="text" class="form-control" name="searchOrderNumber" placeholder="@Loc["Account.CustomerOrders.SearchOrderNumber"]" />
<div class="input-group-append">
<button type="submit" class="btn btn-primary">@Loc["Account.CustomerOrders.Search"]</button>
</div>
</div>
</form>
</div> -->
@using (Html.BeginForm("Search", "Order", FormMethod.Post))
{
<label for="orderNumber">Order Number:</label>
<input type="text" name="orderNumber" required />
<button type="submit">Search</button>
}
@if (Model.Orders.Any())
{
<div class="account-order table-responsive">
<table class="table hover-table">
<thead>
<tr>
<th scope="col">@Loc["Account.CustomerOrders.OrderNumber"]</th>
<th scope="col">@Loc["Account.CustomerOrders.OrderStatus"]</th>
<th scope="col">@Loc["Account.CustomerOrders.OrderDate"]</th>
<th scope="col">@Loc["Account.CustomerOrders.OrderTotal"]</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
@foreach (var order in Model.Orders)
{
<tr>
<td>
<span>@order.OrderNumber</span>
</td>
<td>
<span class="@order.OrderStatus.ToLower() badge status order-status">@order.OrderStatus</span>
</td>
@if (supportRtl)
{
<td>
<span>@Convert.ToDateTime(order.CreatedOn).ToString("tt HH:mm yyyy/MM/dd")</span>
</td>
} else {
<td>
<span>@order.CreatedOn.ToString("g")</span>
</td>
}
<td>
<span class="order-total">@order.OrderTotal</span>
</td>
<td>
<div class="buttons d-flex flex-column">
<input type="button" value="@Loc["Account.CustomerOrders.OrderDetails"]" class="btn btn-sm btn-info order-details-button" onclick="location = ('@Url.RouteUrl("OrderDetails", new { orderId = order.Id })')" />
@if (order.IsMerchandiseReturnAllowed)
{
<input type="button" value="@Loc["Account.CustomerOrders.ReturnItems"]" class="btn btn-sm btn-warning text-white return-items-button mt-1" onclick="location = ('@Url.RouteUrl("MerchandiseReturn", new { orderId = order.Id })')" />
}
</div>
</td>
</tr>
}
</tbody>
</table>
</div>
<page-navigation asp-query-param="pagenumber" asp-pagination="Model.PagingContext" />
}
else
{
<div class="no-data alert alert-info">
@Loc["Account.CustomerOrders.NoOrders"]
</div>
}
</div>