Restore all zeroed views + add bulk gift certificate creation
The HTML entity sweep script had a bug where it wrote empty files for any
view that contained no target Unicode characters, zeroing out 215 view files.
All views restored from the pre-sweep commit (cefdf3e).
Bulk gift certificate feature:
- BulkCreateGiftCertificateDto with Quantity (1-500), Amount, Reason, Expiry, Notes
- GenerateBulkGiftCertificatePdfAsync on IPdfService / PdfService: one Letter page
per cert, reusing the same purple/gold branded ComposeGiftCertificateContent helper
- GiftCertificatesController: BulkCreate GET/POST, BulkResult GET, BulkDownloadPdf POST
- Views: BulkCreate.cshtml (form with live total preview), BulkResult.cshtml (table +
Download All PDF button that POSTs cert IDs to avoid URL length limits)
- gift-certificate-bulk.js: live preview + spinner/disable on submit
- Index.cshtml: Bulk Create button added alongside New Certificate
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,172 @@
|
||||
@using PowderCoating.Web.Controllers
|
||||
@model SystemInfoViewModel
|
||||
@{
|
||||
ViewData["Title"] = "System Info";
|
||||
ViewData["PageIcon"] = "bi-cpu";
|
||||
}
|
||||
|
||||
@section Styles {
|
||||
<style>
|
||||
/* Dark mode: bg-warning text-dark badge — keep text readable */
|
||||
[data-bs-theme="dark"] .badge.bg-warning.text-dark {
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
<div class="mb-2">
|
||||
<a asp-controller="PlatformAdmin" asp-action="Observability" class="text-muted small text-decoration-none">
|
||||
<i class="bi bi-arrow-left me-1"></i>Observability
|
||||
</a>
|
||||
</div>
|
||||
<div class="d-flex justify-content-end align-items-center mb-4">
|
||||
<span class="badge bg-secondary">Read-only diagnostics</span>
|
||||
</div>
|
||||
|
||||
<div class="row g-3">
|
||||
<!-- Application -->
|
||||
<div class="col-lg-6">
|
||||
<div class="card border-0 shadow-sm h-100">
|
||||
<div class="card-header border-0 py-3">
|
||||
<h5 class="mb-0 fw-semibold"><i class="bi bi-box me-2"></i>Application</h5>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<table class="table table-hover mb-0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="ps-4" style="width:45%">App Version</th>
|
||||
<td><code>@Model.AppVersion</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="ps-4">Environment</th>
|
||||
<td>
|
||||
@{
|
||||
var envBadge = Model.EnvironmentName switch
|
||||
{
|
||||
"Production" => "bg-danger",
|
||||
"Staging" => "bg-warning text-dark",
|
||||
_ => "bg-success"
|
||||
};
|
||||
}
|
||||
<span class="badge @envBadge">@Model.EnvironmentName</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="ps-4">.NET Runtime</th>
|
||||
<td><small class="text-muted">@Model.RuntimeVersion</small></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="ps-4">OS</th>
|
||||
<td><small class="text-muted">@Model.OsDescription</small></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="ps-4">Machine Name</th>
|
||||
<td><code>@Model.MachineName</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Database -->
|
||||
<div class="col-lg-6">
|
||||
<div class="card border-0 shadow-sm h-100">
|
||||
<div class="card-header border-0 py-3">
|
||||
<h5 class="mb-0 fw-semibold"><i class="bi bi-database me-2"></i>Database</h5>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<table class="table table-hover mb-0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="ps-4" style="width:45%">Connection Status</th>
|
||||
<td>
|
||||
@if (Model.DatabaseConnected)
|
||||
{
|
||||
<span class="badge bg-success"><i class="bi bi-check-circle me-1"></i>@Model.DatabaseStatus</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="badge bg-danger"><i class="bi bi-x-circle me-1"></i>@Model.DatabaseStatus</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="ps-4">Migrations Applied</th>
|
||||
<td><span class="badge bg-secondary">@Model.MigrationCount</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="ps-4">Last Migration</th>
|
||||
<td><small class="text-muted font-monospace">@(Model.LastAppliedMigration ?? "—")</small></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="ps-4">Last Seed Run</th>
|
||||
<td>
|
||||
@if (Model.LastSeedRun.HasValue)
|
||||
{
|
||||
<span title="@Model.LastSeedRun.Value.ToString("u")">@Model.LastSeedRun.Value.ToString("MMM d, yyyy h:mm tt") <small class="text-muted">UTC</small></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="text-muted">Not run this session</span>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Server -->
|
||||
<div class="col-lg-6">
|
||||
<div class="card border-0 shadow-sm h-100">
|
||||
<div class="card-header border-0 py-3">
|
||||
<h5 class="mb-0 fw-semibold"><i class="bi bi-server me-2"></i>Server Time</h5>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<table class="table table-hover mb-0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="ps-4" style="width:45%">Local Time</th>
|
||||
<td><code>@Model.ServerTime.ToString("MMM d, yyyy h:mm:ss tt")</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="ps-4">UTC Time</th>
|
||||
<td><code>@Model.ServerTimeUtc.ToString("MMM d, yyyy HH:mm:ss") UTC</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="ps-4">Time Zone</th>
|
||||
<td><small class="text-muted">@Model.ServerTimeZone</small></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Users -->
|
||||
<div class="col-lg-6">
|
||||
<div class="card border-0 shadow-sm h-100">
|
||||
<div class="card-header border-0 py-3">
|
||||
<h5 class="mb-0 fw-semibold"><i class="bi bi-people me-2"></i>Users</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row text-center g-3">
|
||||
<div class="col-6">
|
||||
<div class="rounded p-3" style="background:var(--bs-tertiary-bg);">
|
||||
<h2 class="fw-bold mb-0 text-success">@Model.ActiveUserCount</h2>
|
||||
<small class="text-muted">Active Users</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="rounded p-3" style="background:var(--bs-tertiary-bg);">
|
||||
<h2 class="fw-bold mb-0">@Model.TotalUserCount</h2>
|
||||
<small class="text-muted">Total Users</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user