76 lines
2.6 KiB
Plaintext
76 lines
2.6 KiB
Plaintext
@model AdminFeatureRequestIndexViewModel
|
|
@{
|
|
ViewData["Title"] = "Feature Requests";
|
|
}
|
|
|
|
<div class="page-heading compact">
|
|
<div>
|
|
<p class="eyebrow">Admin</p>
|
|
<h1>Feature Requests</h1>
|
|
</div>
|
|
<form method="get" class="d-flex gap-2 align-items-end">
|
|
<div>
|
|
<label class="form-label" for="status">Status</label>
|
|
<select class="form-select" id="status" name="status">
|
|
<option value="">All statuses</option>
|
|
@foreach (var status in Model.StatusOptions)
|
|
{
|
|
<option value="@status" selected="@(string.Equals(Model.Status, status, StringComparison.OrdinalIgnoreCase))">@status</option>
|
|
}
|
|
</select>
|
|
</div>
|
|
<button class="btn btn-outline-primary" type="submit">Filter</button>
|
|
</form>
|
|
</div>
|
|
|
|
@if (TempData["AdminMessage"] is string adminMessage)
|
|
{
|
|
<div class="alert alert-info">@adminMessage</div>
|
|
}
|
|
|
|
@if (!Model.Requests.Any())
|
|
{
|
|
<section class="empty-panel">
|
|
<h2>No feature requests found</h2>
|
|
<p class="muted mb-0">New suggestions will appear here once users submit them.</p>
|
|
</section>
|
|
}
|
|
else
|
|
{
|
|
<section class="edit-panel">
|
|
<div class="table-responsive">
|
|
<table class="table table-sm align-middle">
|
|
<thead>
|
|
<tr>
|
|
<th>Title</th>
|
|
<th>User</th>
|
|
<th>Status</th>
|
|
<th>Area</th>
|
|
<th>Updated</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var request in Model.Requests)
|
|
{
|
|
<tr>
|
|
<td>@request.Title</td>
|
|
<td>@(request.UserDisplayName ?? request.UserEmail)</td>
|
|
<td><span class="badge text-bg-secondary">@request.Status</span></td>
|
|
<td>@(request.AppArea ?? "Not set")</td>
|
|
<td>@FormatDate(request.UpdatedUtc)</td>
|
|
<td class="text-end">
|
|
<a class="btn btn-outline-primary btn-sm" asp-action="FeatureRequestDetails" asp-route-id="@request.FeatureRequestID">Open</a>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
}
|
|
|
|
@functions {
|
|
private static string FormatDate(DateTime value) => value.ToLocalTime().ToString("yyyy-MM-dd HH:mm");
|
|
}
|