Files
PowderCoatingLogix/src/PowderCoating.Web/Views/Equipment/Delete.cshtml
T
spouliot a0bdd2b5b4 Sweep all .cshtml files for encoding corruption; add pre-commit guard
Replace all corruption variants with HTML entities across 226 view files:
- 3-char UTF-8-as-Win1252 sequences (ae-corruption)
- Standalone smart/curly quotes that break C# Razor expressions
- Partially re-corrupted variants where the 3rd byte was normalised to ASCII

tools/Fix-Encoding.ps1: re-runnable sweep; uses [char] code points so the
script itself never contains a literal non-ASCII character; supports -DryRun

.githooks/pre-commit: blocks commits containing the ae-corruption byte
signature (xc3xa2xe2x82xac); git core.hooksPath = .githooks so the
hook is repo-committed and active for all future work on this machine.

Build clean; 225 unit tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 21:37:10 -04:00

109 lines
5.4 KiB
Plaintext

@model PowderCoating.Application.DTOs.Equipment.EquipmentDto
@{
ViewData["Title"] = "Delete Equipment";
ViewData["PageIcon"] = "bi-tools";
}
<div class="row justify-content-center">
<div class="col-lg-8">
<div class="d-flex justify-content-end align-items-center mb-4">
<a asp-action="Details" asp-route-id="@Model.Id" class="btn btn-outline-secondary">
<i class="bi bi-arrow-left me-2"></i>Back to Details
</a>
</div>
<!-- Warning Banner -->
<div class="alert alert-danger alert-permanent d-flex align-items-start mb-4">
<i class="bi bi-exclamation-triangle me-3" style="font-size: 1.5rem;"></i>
<div>
<strong>Warning: This action cannot be undone!</strong>
<p class="mb-0 mt-1">This equipment record will be marked as deleted. All associated maintenance records will be preserved but the equipment will no longer appear in the active list.</p>
</div>
</div>
<div class="card border-0 shadow-sm">
<div class="card-body p-4">
<!-- Equipment Summary -->
<div class="mb-4">
<h5 class="border-bottom pb-2 mb-3">Equipment Information</h5>
<div class="row g-3">
<div class="col-md-6">
<label class="text-muted small mb-1">Equipment Name</label>
<p class="fw-semibold mb-0">@Model.EquipmentName</p>
</div>
<div class="col-md-6">
<label class="text-muted small mb-1">Equipment Number</label>
<p class="mb-0">@(Model.EquipmentNumber ?? "Not assigned")</p>
</div>
<div class="col-md-6">
<label class="text-muted small mb-1">Type</label>
<p class="mb-0">@Model.EquipmentType</p>
</div>
<div class="col-md-6">
<label class="text-muted small mb-1">Location</label>
<p class="mb-0">@(Model.Location ?? "&mdash;")</p>
</div>
<div class="col-md-6">
<label class="text-muted small mb-1">Status</label>
<p class="mb-0">
@{
var statusClass = Model.Status switch
{
"Operational" => "success",
"NeedsMaintenance" => "warning",
"UnderMaintenance" => "info",
"OutOfService" => "danger",
_ => "secondary"
};
}
<span class="badge bg-@statusClass bg-opacity-10 text-@statusClass">
@Model.StatusDisplay
</span>
</p>
</div>
<div class="col-md-6">
<label class="text-muted small mb-1">Purchase Price</label>
<p class="mb-0">@Model.PurchasePrice.ToString("C")</p>
</div>
</div>
</div>
@if (!string.IsNullOrEmpty(Model.Manufacturer) || !string.IsNullOrEmpty(Model.Model))
{
<div class="mb-4">
<h5 class="border-bottom pb-2 mb-3">Manufacturer Information</h5>
<div class="row g-3">
<div class="col-md-4">
<label class="text-muted small mb-1">Manufacturer</label>
<p class="mb-0">@(Model.Manufacturer ?? "&mdash;")</p>
</div>
<div class="col-md-4">
<label class="text-muted small mb-1">Model</label>
<p class="mb-0">@(Model.Model ?? "&mdash;")</p>
</div>
<div class="col-md-4">
<label class="text-muted small mb-1">Serial Number</label>
<p class="mb-0">@(Model.SerialNumber ?? "&mdash;")</p>
</div>
</div>
</div>
}
<!-- Delete Confirmation Form -->
<form asp-action="Delete" method="post" class="mt-4">
<input type="hidden" asp-for="Id" />
<div class="d-flex gap-2 justify-content-end pt-3 border-top">
<a asp-action="Details" asp-route-id="@Model.Id" class="btn btn-outline-secondary px-4">
<i class="bi bi-x-circle me-2"></i>Cancel
</a>
<button type="submit" class="btn btn-danger px-4">
<i class="bi bi-trash me-2"></i>Delete Equipment
</button>
</div>
</form>
</div>
</div>
</div>
</div>