Skip to content

Commit

Permalink
Section 11 - Toggle UI For Status based on Selection
Browse files Browse the repository at this point in the history
  • Loading branch information
bhrugen committed Sep 26, 2021
1 parent 36bd638 commit fe454f6
Showing 1 changed file with 30 additions and 5 deletions.
35 changes: 30 additions & 5 deletions BulkyBookWeb/Areas/Admin/Views/Order/Index.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
<div class="p-3">
@{
var status = Context.Request.Query["status"];
var pending="text-primary";
var inprocess="text-primary";
var completed="text-primary";
var all="text-primary";

switch (status)
{
case "pending":
pending = "active text-white";
break;
case "inprocess":
inprocess = "active text-white";
break;
case "completed":
completed = "active text-white";
break;
default :
all = "active text-white";
break;
}

}

<div class="p-3">
<div class="d-flex justify-content-between pt-4">
<div class="p-2">
<h2 class="text-primary">Order List</h2>
Expand All @@ -7,19 +32,19 @@
<ul class="list-group list-group-horizontal-sm">
<a style="text-decoration:none;" asp-controller="Order"
asp-action="Index" asp-route-status="inprocess">
<li class="list-group-item">In Process</li>
<li class="list-group-item @inprocess">In Process</li>
</a>
<a style="text-decoration:none;" asp-controller="Order"
asp-action="Index" asp-route-status="pending">
<li class="list-group-item">Payment Pending</li>
<li class="list-group-item @pending">Payment Pending</li>
</a>
<a style="text-decoration:none;" asp-controller="Order"
asp-action="Index" asp-route-status="completed">
<li class="list-group-item">Completed</li>
<li class="list-group-item @completed">Completed</li>
</a>
<a style="text-decoration:none;" asp-controller="Order"
asp-action="Index" asp-route-status="all">
<li class="list-group-item">All</li>
<li class="list-group-item @all">All</li>
</a>
</ul>
</div>
Expand Down

0 comments on commit fe454f6

Please sign in to comment.