Add Expires column with Expired badge to Meows list
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle">
|
||||
<thead>
|
||||
<tr><th>Name</th><th>Type</th><th>Assigned To</th><th>Updated</th><th class="text-end">Actions</th></tr>
|
||||
<tr><th>Name</th><th>Type</th><th>Assigned To</th><th>Expires</th><th>Updated</th><th class="text-end">Actions</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var slide in Model)
|
||||
@@ -31,6 +31,20 @@
|
||||
@if (slide.DeviceSlides.Any()) { @foreach (var ds in slide.DeviceSlides) { <span class="badge bg-secondary me-1">@ds.Device.Name</span> } }
|
||||
else { <span class="text-muted">Unassigned</span> }
|
||||
</td>
|
||||
<td>
|
||||
@if (!slide.ExpiresAt.HasValue)
|
||||
{
|
||||
<span class="text-muted">—</span>
|
||||
}
|
||||
else if (slide.ExpiresAt.Value <= DateTime.Now)
|
||||
{
|
||||
<span class="badge bg-danger" title="@slide.ExpiresAt.Value.ToString("dd MMM yyyy HH:mm")"><i class="bi bi-clock-history me-1"></i>Expired</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="badge bg-secondary"><i class="bi bi-clock me-1"></i>@slide.ExpiresAt.Value.ToString("dd MMM yyyy HH:mm")</span>
|
||||
}
|
||||
</td>
|
||||
<td><small class="text-muted">@slide.UpdatedAt.ToString("dd MMM yyyy HH:mm")</small></td>
|
||||
<td class="text-end">
|
||||
<div class="btn-group btn-group-sm">
|
||||
|
||||
Reference in New Issue
Block a user