Files
PowderCoatingLogix/src/PowderCoating.Web/Views/Contact/Index.cshtml
T
spouliot 4ec55e7290 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>
2026-05-14 20:09:22 -04:00

176 lines
8.3 KiB
Plaintext

@using PowderCoating.Web.Controllers
@model ContactViewModel
@{
ViewData["Title"] = "Contact Us";
ViewData["PageIcon"] = "bi-envelope";
}
<div class="d-flex align-items-center gap-2 mb-4">
<h1 class="h3 mb-0"><i class="bi bi-envelope text-primary me-2"></i>Contact Us</h1>
</div>
@if (TempData["Success"] != null)
{
<div class="alert alert-success alert-permanent alert-dismissible fade show mb-4" role="alert">
<i class="bi bi-check-circle me-2"></i>@TempData["Success"]
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
</div>
}
@if (TempData["Error"] != null)
{
<div class="alert alert-danger alert-permanent alert-dismissible fade show mb-4" role="alert">
<i class="bi bi-exclamation-triangle me-2"></i>@TempData["Error"]
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
</div>
}
<div class="row g-4">
@* ── Left column: Resources ── *@
<div class="col-lg-4">
<h2 class="h6 fw-semibold text-muted text-uppercase mb-3" style="letter-spacing:.05em;font-size:.7rem;">
Self-Service Resources
</h2>
@* Help Center *@
<a asp-controller="Help" asp-action="Index" class="card border-0 shadow-sm mb-3 text-decoration-none text-reset d-block">
<div class="card-body d-flex align-items-center gap-3 py-3">
<div class="rounded-3 bg-primary bg-opacity-10 p-2 flex-shrink-0">
<i class="bi bi-book-half text-primary fs-4"></i>
</div>
<div>
<div class="fw-semibold">Help Center</div>
<div class="text-muted small">Step-by-step articles for every part of the system.</div>
</div>
<i class="bi bi-arrow-right ms-auto text-muted"></i>
</div>
</a>
@* AI Assistant *@
<div class="card border-0 shadow-sm mb-3">
<div class="card-body d-flex align-items-center gap-3 py-3">
<div class="rounded-3 bg-success bg-opacity-10 p-2 flex-shrink-0">
<i class="bi bi-robot text-success fs-4"></i>
</div>
<div class="flex-grow-1">
<div class="fw-semibold">AI Assistant</div>
<div class="text-muted small">Ask anything — available 24/7 in the bottom-right corner.</div>
</div>
<button type="button" class="btn btn-sm btn-outline-success flex-shrink-0"
onclick="document.getElementById('aiHelpTrigger')?.click()">
Ask Now
</button>
</div>
</div>
@* Facebook Community *@
<a href="https://www.facebook.com/share/g/19CtDWf61N/" target="_blank" rel="noopener noreferrer"
class="card border-0 shadow-sm mb-3 text-decoration-none text-reset d-block">
<div class="card-body d-flex align-items-center gap-3 py-3">
<div class="rounded-3 p-2 flex-shrink-0" style="background:rgba(24,119,242,.1);">
<i class="bi bi-facebook fs-4" style="color:#1877F2;"></i>
</div>
<div>
<div class="fw-semibold">Community Group</div>
<div class="text-muted small">Connect with other users, share tips, and get peer support.</div>
</div>
<i class="bi bi-box-arrow-up-right ms-auto text-muted small"></i>
</div>
</a>
<div class="card border-0 bg-body-secondary rounded-3 p-3 mt-2">
<p class="small text-muted mb-1">
<i class="bi bi-clock me-1"></i><strong>Response time:</strong> We typically reply within 1 business day.
</p>
<p class="small text-muted mb-0">
<i class="bi bi-envelope me-1"></i>You can also email us directly at
<a href="mailto:support@powdercoatinglogix.com">support@powdercoatinglogix.com</a>.
</p>
</div>
</div>
@* ── Right column: Contact form ── *@
<div class="col-lg-8">
<h2 class="h6 fw-semibold text-muted text-uppercase mb-3" style="letter-spacing:.05em;font-size:.7rem;">
Send Us a Message
</h2>
<div class="card border-0 shadow-sm">
<div class="card-body p-4">
<form asp-action="Submit" method="post">
@Html.AntiForgeryToken()
<div class="row g-3 mb-3">
<div class="col-md-6">
<label asp-for="Form.Name" class="form-label fw-semibold"></label>
<input asp-for="Form.Name" class="form-control" />
<span asp-validation-for="Form.Name" class="text-danger small"></span>
</div>
<div class="col-md-6">
<label asp-for="Form.Email" class="form-label fw-semibold"></label>
<input asp-for="Form.Email" class="form-control" type="email" />
<span asp-validation-for="Form.Email" class="text-danger small"></span>
</div>
<div class="col-md-6">
<label asp-for="Form.CompanyName" class="form-label fw-semibold"></label>
<input asp-for="Form.CompanyName" class="form-control" />
<span asp-validation-for="Form.CompanyName" class="text-danger small"></span>
</div>
<div class="col-md-6">
<label asp-for="Form.Category" class="form-label fw-semibold"></label>
<select asp-for="Form.Category" class="form-select">
<option value="">— Select a Category —</option>
@foreach (var cat in ContactFormModel.Categories)
{
<option value="@cat" selected="@(Model.Form.Category == cat)">@cat</option>
}
</select>
<span asp-validation-for="Form.Category" class="text-danger small"></span>
</div>
<div class="col-12">
<label asp-for="Form.Subject" class="form-label fw-semibold"></label>
<input asp-for="Form.Subject" class="form-control" placeholder="Brief summary of your question or issue" />
<span asp-validation-for="Form.Subject" class="text-danger small"></span>
</div>
<div class="col-12">
<label asp-for="Form.Message" class="form-label fw-semibold"></label>
<textarea asp-for="Form.Message" class="form-control" rows="6"
placeholder="Describe your question or issue in detail. The more context you provide, the faster we can help."></textarea>
<div class="d-flex justify-content-between">
<span asp-validation-for="Form.Message" class="text-danger small"></span>
<span class="text-muted small mt-1" id="msgCount">0 / 4000</span>
</div>
</div>
</div>
<div class="d-flex justify-content-end gap-2">
<a asp-controller="Help" asp-action="Index" class="btn btn-outline-secondary">
<i class="bi bi-book-half me-1"></i>Browse Help First
</a>
<button type="submit" class="btn btn-primary">
<i class="bi bi-send me-1"></i>Send Message
</button>
</div>
</form>
</div>
</div>
</div>
</div>
@section Scripts {
<script>
(function () {
const ta = document.querySelector('textarea[name="Form.Message"]');
const counter = document.getElementById('msgCount');
if (!ta || !counter) return;
function update() { counter.textContent = ta.value.length + ' / 4000'; }
ta.addEventListener('input', update);
update();
})();
</script>
}