a0bdd2b5b4
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>
121 lines
5.9 KiB
Plaintext
121 lines
5.9 KiB
Plaintext
@model PowderCoating.Application.DTOs.Maintenance.MaintenanceRecordDto
|
|
|
|
@{
|
|
ViewData["Title"] = "Delete Maintenance Record";
|
|
ViewData["PageIcon"] = "bi-wrench";
|
|
var seriesDeletableCount = ViewBag.SeriesDeletableCount as int?;
|
|
}
|
|
|
|
<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>
|
|
|
|
<div class="alert alert-danger alert-permanent" role="alert">
|
|
<i class="bi bi-exclamation-triangle me-2"></i>
|
|
<strong>Warning:</strong> This action cannot be undone.
|
|
</div>
|
|
|
|
<div class="card border-0 shadow-sm mb-4">
|
|
<div class="card-header bg-danger bg-opacity-10 border-0 py-3">
|
|
<h5 class="mb-0 text-danger">
|
|
<i class="bi bi-wrench me-2"></i>@Model.MaintenanceType — @Model.EquipmentName
|
|
</h5>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="row g-3">
|
|
<div class="col-md-6">
|
|
<small class="text-muted d-block">Status</small>
|
|
<strong>@Model.StatusDisplay</strong>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<small class="text-muted d-block">Priority</small>
|
|
<strong>@Model.PriorityDisplay</strong>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<small class="text-muted d-block">Scheduled Date</small>
|
|
<strong>@Model.ScheduledDate.ToString("MMMM dd, yyyy")</strong>
|
|
</div>
|
|
@if (Model.IsRecurring)
|
|
{
|
|
<div class="col-md-6">
|
|
<small class="text-muted d-block">Recurrence</small>
|
|
<span class="badge bg-info text-dark">
|
|
<i class="bi bi-arrow-repeat me-1"></i>@Model.RecurrenceFrequency
|
|
</span>
|
|
</div>
|
|
}
|
|
@if (!string.IsNullOrEmpty(Model.Description))
|
|
{
|
|
<div class="col-12">
|
|
<small class="text-muted d-block">Description</small>
|
|
<span>@Model.Description</span>
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@if (Model.IsRecurring && seriesDeletableCount.HasValue && seriesDeletableCount.Value > 0)
|
|
{
|
|
<!-- Recurring series options -->
|
|
<div class="card border-warning shadow-sm mb-4">
|
|
<div class="card-header bg-warning bg-opacity-10 border-0 py-3">
|
|
<h5 class="mb-0">
|
|
<i class="bi bi-arrow-repeat me-2 text-warning"></i>This is Part of a Recurring Series
|
|
</h5>
|
|
</div>
|
|
<div class="card-body">
|
|
<p class="mb-3">
|
|
There are <strong>@seriesDeletableCount</strong> other future scheduled/overdue occurrence@(seriesDeletableCount == 1 ? "" : "s") in this series.
|
|
Completed occurrences will not be affected.
|
|
</p>
|
|
<div class="d-flex flex-column gap-3">
|
|
<form asp-action="Delete" method="post">
|
|
@Html.AntiForgeryToken()
|
|
<input type="hidden" name="id" value="@Model.Id" />
|
|
<input type="hidden" name="deleteMode" value="single" />
|
|
<button type="submit" class="btn btn-outline-danger w-100 text-start">
|
|
<i class="bi bi-trash me-2"></i>
|
|
<strong>Delete this occurrence only</strong>
|
|
<br /><small class="ms-4">Removes only this record. The other @seriesDeletableCount occurrence@(seriesDeletableCount == 1 ? "" : "s") remain.</small>
|
|
</button>
|
|
</form>
|
|
<form asp-action="Delete" method="post">
|
|
@Html.AntiForgeryToken()
|
|
<input type="hidden" name="id" value="@Model.Id" />
|
|
<input type="hidden" name="deleteMode" value="series" />
|
|
<button type="submit" class="btn btn-danger w-100 text-start">
|
|
<i class="bi bi-collection me-2"></i>
|
|
<strong>Delete entire series</strong>
|
|
<br /><small class="ms-4">Removes this record and all @seriesDeletableCount future scheduled/overdue occurrences. Completed records are preserved.</small>
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="text-end">
|
|
<a asp-action="Details" asp-route-id="@Model.Id" class="btn btn-outline-secondary">Cancel</a>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<!-- Simple single delete -->
|
|
<div class="d-flex gap-2 justify-content-end">
|
|
<a asp-action="Details" asp-route-id="@Model.Id" class="btn btn-outline-secondary">Cancel</a>
|
|
<form asp-action="Delete" method="post">
|
|
@Html.AntiForgeryToken()
|
|
<input type="hidden" name="id" value="@Model.Id" />
|
|
<input type="hidden" name="deleteMode" value="single" />
|
|
<button type="submit" class="btn btn-danger">
|
|
<i class="bi bi-trash me-2"></i>Delete Maintenance Record
|
|
</button>
|
|
</form>
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|