Add BatchId to GiftCertificate for persistent bulk batch tracking

BatchId (Guid?) is stamped on every certificate in a bulk run so the batch
is permanently addressable. BulkResult is now a bookmarkable GET by batchId
rather than TempData, so users can return to re-download at any time.
BatchDownloadPdf is a GET link (no form POST needed). Index shows a Batch
badge on bulk certs that links directly back to the batch result page.

Migration: AddGiftCertificateBatchId

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-14 20:32:56 -04:00
parent 4ec55e7290
commit 38748c2152
8 changed files with 10889 additions and 62 deletions
@@ -80,6 +80,14 @@ else
<a asp-action="Details" asp-route-id="@cert.Id" class="fw-semibold text-decoration-none font-monospace">
@cert.CertificateCode
</a>
@if (cert.BatchId.HasValue)
{
<a asp-action="BulkResult" asp-route-batchId="@cert.BatchId"
class="badge bg-primary-subtle text-primary text-decoration-none ms-1"
title="View &amp; download batch">
<i class="bi bi-collection me-1"></i>Batch
</a>
}
</td>
<td>
@if (!string.IsNullOrEmpty(cert.RecipientName))
@@ -88,7 +96,7 @@ else
}
else
{
<span class="text-muted"></span>
<span class="text-muted">&mdash;</span>
}
@if (!string.IsNullOrEmpty(cert.RecipientEmail))
{