Skip to content

Commit

Permalink
Added new today and new this week badges to orders and quotes in Ops …
Browse files Browse the repository at this point in the history
…in support of #390.
  • Loading branch information
uncheckederror committed Aug 31, 2023
1 parent d73dd1b commit 824b69a
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
3 changes: 2 additions & 1 deletion NumberSearch.Ops/Views/Orders/InstallDates.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*@
@{
}
<h3 class="pt-3 pb-3">Orders and Quotes by Date</h3>
<div class="table-responsive">
<table class="table table-striped table-borderless table-hover" id="table">
<thead>
Expand All @@ -25,7 +26,7 @@
string name = string.IsNullOrWhiteSpace(order.BusinessName) ? $"{order.FirstName} {order.LastName}" : order.BusinessName;
<tr>
<td data-order='@order.DateSubmitted.Ticks'>@order.DateSubmitted.ToShortDateString()</td>
<td>@name</td>
<td><a href="../Home/Order/{@order.OrderId}" target="_blank">@name</a></td>
<td>@converted</td>
<td>@installed</td>
<td>@completed</td>
Expand Down
26 changes: 25 additions & 1 deletion NumberSearch.Ops/Views/Orders/Orders.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,18 @@
@order?.Order?.DateSubmitted.ToString("MM/dd hh:mm tt") <span class="badge bg-@pillColor">
@nextStep
</span>
@if (order?.Order is not null && order.Order.DateSubmitted > DateTime.Now.AddDays(-1))
{
<span class="badge bg-danger">
New Today
</span>
}
else if (order?.Order is not null && order.Order.DateSubmitted > DateTime.Now.AddDays(-7))
{
<span class="badge bg-primary">
🔍 This Week
</span>
}
</p>
@if (order?.PortRequest is not null && order?.Order is not null && order.PortRequest.OrderId == order.Order.OrderId)
{
Expand Down Expand Up @@ -129,7 +141,7 @@
</a>
}
@if (!string.IsNullOrWhiteSpace(order?.Order?.ReoccuringInvoiceLink))
{
{
<a href="@order?.Order?.ReoccuringInvoiceLink" class="btn btn-outline-primary" target="_blank" rel="noopener noreferrer">
View Recurring Quote
</a>
Expand Down Expand Up @@ -370,6 +382,18 @@
@order?.Order?.DateSubmitted.ToString("MM/dd hh:mm tt") <span class="badge bg-@pillColor">
@nextStep
</span>
@if (order?.Order is not null && order.Order.DateSubmitted > DateTime.Now.AddDays(-1))
{
<span class="badge bg-danger">
New Today
</span>
}
else if (order?.Order is not null && order.Order.DateSubmitted > DateTime.Now.AddDays(-7))
{
<span class="badge bg-primary">
🔍 This Week
</span>
}
</p>
<p>
@order?.Order?.FirstName
Expand Down
24 changes: 24 additions & 0 deletions NumberSearch.Ops/Views/Orders/Quotes.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@
@order?.Order?.DateSubmitted.ToString("MM/dd hh:mm tt") <span class="badge bg-@pillColor">
@nextStep
</span>
@if (order?.Order is not null && order.Order.DateSubmitted > DateTime.Now.AddDays(-1))
{
<span class="badge bg-danger">
New Today
</span>
}
else if (order?.Order is not null && order.Order.DateSubmitted > DateTime.Now.AddDays(-7))
{
<span class="badge bg-primary">
🔍 This Week
</span>
}
</p>
<p>
<div class="btn-group mt-2" role="group" aria-label="Basic example">
Expand Down Expand Up @@ -299,6 +311,18 @@
@order?.Order?.DateSubmitted.ToString("MM/dd hh:mm tt") <span class="badge bg-@pillColor">
@nextStep
</span>
@if (order?.Order is not null && order.Order.DateSubmitted > DateTime.Now.AddDays(-1))
{
<span class="badge bg-danger">
New Today
</span>
}
else if (order?.Order is not null && order.Order.DateSubmitted > DateTime.Now.AddDays(-7))
{
<span class="badge bg-primary">
🔍 This Week
</span>
}
</p>
<p>
@order?.Order?.FirstName
Expand Down

0 comments on commit 824b69a

Please sign in to comment.