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>
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
ViewData["Title"] = $"{Model.Name}";
|
||||
ViewData["PageIcon"] = "bi-box-seam";
|
||||
ViewData["PageHelpTitle"] = "Inventory Item";
|
||||
ViewData["PageHelpContent"] = "Full detail for this inventory item. Stock Information shows current quantity and reorder thresholds — a Low Stock banner appears when quantity is at or below the Reorder Point. Pricing shows Unit Cost (what you paid), Average Cost (weighted average across purchases), and Total Stock Value. Use the Actions panel to edit, view jobs using this powder, or delete the item.";
|
||||
ViewData["PageHelpContent"] = "Full detail for this inventory item. Stock Information shows current quantity and reorder thresholds — a Low Stock banner appears when quantity is at or below the Reorder Point. Pricing shows Unit Cost (what you paid), Average Cost (weighted average across purchases), and Total Stock Value. Use the Actions panel to edit, view jobs using this powder, or delete the item.";
|
||||
}
|
||||
|
||||
@section Styles {
|
||||
@@ -293,14 +293,14 @@
|
||||
{
|
||||
<div class="col-md-6">
|
||||
<label class="text-muted small mb-1">Inventory Account</label>
|
||||
<p class="mb-0">@(Model.InventoryAccountName ?? "—")</p>
|
||||
<p class="mb-0">@(Model.InventoryAccountName ?? "—")</p>
|
||||
</div>
|
||||
}
|
||||
@if (Model.CogsAccountId.HasValue)
|
||||
{
|
||||
<div class="col-md-6">
|
||||
<label class="text-muted small mb-1">COGS Account</label>
|
||||
<p class="mb-0">@(Model.CogsAccountName ?? "—")</p>
|
||||
<p class="mb-0">@(Model.CogsAccountName ?? "—")</p>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -375,7 +375,7 @@
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<label class="text-muted small mb-1">Location</label>
|
||||
<p class="mb-0">@(Model.Location ?? "—")</p>
|
||||
<p class="mb-0">@(Model.Location ?? "—")</p>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<label class="text-muted small mb-1">Reorder Point</label>
|
||||
@@ -526,15 +526,15 @@
|
||||
<div class="mb-3">
|
||||
<label for="adjReason" class="form-label fw-semibold">Reason <span class="text-danger">*</span></label>
|
||||
<select class="form-select" id="adjReason" name="reason" required>
|
||||
<option value="">— Select a reason —</option>
|
||||
<option value="">— Select a reason —</option>
|
||||
<optgroup label="Adding Stock">
|
||||
<option value="Received from purchase order">Received from purchase order</option>
|
||||
<option value="Physical count — found extra">Physical count — found extra</option>
|
||||
<option value="Physical count — found extra">Physical count — found extra</option>
|
||||
<option value="Returned unused product">Returned unused product</option>
|
||||
<option value="Transfer in from another location">Transfer in from another location</option>
|
||||
</optgroup>
|
||||
<optgroup label="Removing Stock">
|
||||
<option value="Physical count — shortage found">Physical count — shortage found</option>
|
||||
<option value="Physical count — shortage found">Physical count — shortage found</option>
|
||||
<option value="Damaged / unusable product">Damaged / unusable product</option>
|
||||
<option value="Waste or spillage">Waste or spillage</option>
|
||||
<option value="Transfer out to another location">Transfer out to another location</option>
|
||||
@@ -551,7 +551,7 @@
|
||||
<div class="mb-1">
|
||||
<label for="adjNotes" class="form-label fw-semibold">Notes <span class="text-muted fw-normal">(optional)</span></label>
|
||||
<textarea class="form-control" id="adjNotes" name="notes" rows="2"
|
||||
placeholder="Any additional details about this adjustment…" maxlength="500"></textarea>
|
||||
placeholder="Any additional details about this adjustment…" maxlength="500"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
@@ -697,7 +697,7 @@
|
||||
if (!confirm('This will reduce stock below zero. Continue?')) { e.preventDefault(); return; }
|
||||
}
|
||||
document.getElementById('adjSubmitBtn').disabled = true;
|
||||
document.getElementById('adjSubmitBtn').innerHTML = '<span class="spinner-border spinner-border-sm me-1"></span>Saving…';
|
||||
document.getElementById('adjSubmitBtn').innerHTML = '<span class="spinner-border spinner-border-sm me-1"></span>Saving…';
|
||||
});
|
||||
|
||||
qtyInput.addEventListener('input', function () { qtyInput.classList.remove('is-invalid'); });
|
||||
@@ -815,7 +815,7 @@
|
||||
|
||||
var from = (page - 1) * pageSize + 1;
|
||||
var to = Math.min(page * pageSize, total);
|
||||
rangeEl.textContent = 'Showing ' + from + '–' + to + ' of ' + total + ' photos';
|
||||
rangeEl.textContent = 'Showing ' + from + '–' + to + ' of ' + total + ' photos';
|
||||
|
||||
paginationEl.innerHTML = '';
|
||||
if (page > 1) addPageBtn(paginationEl, '‹', page - 1);
|
||||
|
||||
Reference in New Issue
Block a user