Files
PowderCoatingLogix/src/PowderCoating.Web/Views/Inventory/Delete.cshtml
T
spouliot 328b195127 Design consistency audit fixes: alerts, cards, dark mode, utilities
Alert sweep (113 alerts, 79 files):
  All persistent static banners now carry alert-permanent so the
  layout's 5-second auto-dismiss cannot swallow guidance, warnings,
  or validation errors. Transient dismissible toasts left untouched.

CSS fixes (site.css):
  .card.shadow-sm      — strips rogue border from ~40 drifted cards
  .card-header.bg-white — rebinds to var(--bs-body-bg) so card
                          headers follow dark/light theme correctly
  Typography utilities  — .text-2xs (.68rem), .text-xs (.73rem)
  Token color classes   — .text-ember, .text-ok, .text-bad,
                          .text-warn, .text-cool, .bg-paper-2
  Layout utilities      — .mw-xs/sm/md/lg replace inline max-width
  Comment              — documents text-ember vs text-primary intent

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

186 lines
9.1 KiB
Plaintext

@model PowderCoating.Application.DTOs.Inventory.InventoryItemDto
@{
ViewData["Title"] = "Delete Inventory Item";
ViewData["PageIcon"] = "bi-box-seam";
}
<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="Index" class="btn btn-outline-secondary">
<i class="bi bi-arrow-left me-2"></i>Back to List
</a>
</div>
<!-- Warning Banner -->
<div class="alert alert-danger alert-permanent d-flex align-items-start mb-4">
<i class="bi bi-exclamation-triangle-fill me-3" style="font-size: 1.5rem;"></i>
<div>
<h5 class="alert-heading mb-2">Are you sure you want to delete this inventory item?</h5>
<p class="mb-0">This action will mark the item as deleted. All related records will be preserved but the item will no longer appear in active listings.</p>
</div>
</div>
<div class="card border-danger shadow-sm">
<div class="card-header bg-danger bg-opacity-10 border-danger">
<h5 class="mb-0 text-danger">
<i class="bi bi-box-seam me-2"></i>Item to be Deleted
</h5>
</div>
<div class="card-body">
<!-- Basic Information -->
<div class="mb-4">
<h6 class="text-muted small text-uppercase mb-2">Basic Information</h6>
<div class="row g-3">
<div class="col-md-6">
<label class="text-muted small mb-1">SKU</label>
<p class="fw-semibold mb-0">@Model.SKU</p>
</div>
<div class="col-md-6">
<label class="text-muted small mb-1">Category</label>
<p class="mb-0">
<span class="badge bg-secondary">@Model.Category</span>
</p>
</div>
<div class="col-12">
<label class="text-muted small mb-1">Name</label>
<p class="fw-semibold mb-0">@Model.Name</p>
</div>
@if (!string.IsNullOrEmpty(Model.Description))
{
<div class="col-12">
<label class="text-muted small mb-1">Description</label>
<p class="mb-0">@Model.Description</p>
</div>
}
</div>
</div>
<hr />
<!-- Product Details -->
@if (!string.IsNullOrEmpty(Model.ColorName) || !string.IsNullOrEmpty(Model.Manufacturer))
{
<div class="mb-4">
<h6 class="text-muted small text-uppercase mb-2">Product Details</h6>
<div class="row g-3">
@if (!string.IsNullOrEmpty(Model.ColorName))
{
<div class="col-md-4">
<label class="text-muted small mb-1">Color</label>
<p class="mb-0">@Model.ColorName @(!string.IsNullOrEmpty(Model.ColorCode) ? $"({Model.ColorCode})" : "")</p>
</div>
}
@if (!string.IsNullOrEmpty(Model.Finish))
{
<div class="col-md-4">
<label class="text-muted small mb-1">Finish</label>
<p class="mb-0">@Model.Finish</p>
</div>
}
@if (!string.IsNullOrEmpty(Model.Manufacturer))
{
<div class="col-md-4">
<label class="text-muted small mb-1">Manufacturer</label>
<p class="mb-0">@Model.Manufacturer</p>
</div>
}
</div>
</div>
<hr />
}
<!-- Stock Information -->
<div class="mb-4">
<h6 class="text-muted small text-uppercase mb-2">Stock Information</h6>
<div class="row g-3">
<div class="col-md-4">
<label class="text-muted small mb-1">Quantity on Hand</label>
<p class="mb-0 fw-semibold @(Model.IsOutOfStock ? "text-dark" : Model.IsLowStock ? "text-danger" : "")">
@Model.QuantityOnHand.ToString("N2") @Model.UnitOfMeasure
@if (Model.IsOutOfStock)
{
<i class="bi bi-x-circle"></i>
}
else if (Model.IsLowStock)
{
<i class="bi bi-exclamation-triangle"></i>
}
</p>
</div>
<div class="col-md-4">
<label class="text-muted small mb-1">Reorder Point</label>
<p class="mb-0">@Model.ReorderPoint.ToString("N2") @Model.UnitOfMeasure</p>
</div>
<div class="col-md-4">
<label class="text-muted small mb-1">Location</label>
<p class="mb-0">@(Model.Location ?? "Not specified")</p>
</div>
</div>
</div>
<hr />
<!-- Pricing Information -->
<div class="mb-4">
<h6 class="text-muted small text-uppercase mb-2">Pricing Information</h6>
<div class="row g-3">
<div class="col-md-4">
<label class="text-muted small mb-1">Unit Cost</label>
<p class="mb-0 fw-semibold">@Model.UnitCost.ToString("C")</p>
</div>
<div class="col-md-4">
<label class="text-muted small mb-1">Stock Value</label>
<p class="mb-0 fw-semibold text-primary">@((Model.QuantityOnHand * Model.UnitCost).ToString("C"))</p>
</div>
<div class="col-md-4">
<label class="text-muted small mb-1">Average Cost</label>
<p class="mb-0">@Model.AverageCost.ToString("C")</p>
</div>
</div>
</div>
@if (Model.QuantityOnHand > 0)
{
<div class="alert alert-warning alert-permanent d-flex align-items-center">
<i class="bi bi-exclamation-circle me-2"></i>
<div>
<strong>Warning:</strong> This item still has @Model.QuantityOnHand.ToString("N2") @Model.UnitOfMeasure in stock (value: @((Model.QuantityOnHand * Model.UnitCost).ToString("C"))). Consider transferring or adjusting inventory before deletion.
</div>
</div>
}
<!-- Delete Form -->
<div class="d-flex gap-2 justify-content-end pt-3 border-top mt-4">
<a asp-action="Index" class="btn btn-outline-secondary px-4">
<i class="bi bi-x-circle me-2"></i>Cancel
</a>
<form asp-action="Delete" method="post" class="d-inline">
<input type="hidden" asp-for="Id" />
<button type="submit" class="btn btn-danger px-4">
<i class="bi bi-trash me-2"></i>Delete Item
</button>
</form>
</div>
</div>
</div>
<!-- Additional Information -->
<div class="card border-0 shadow-sm mt-4">
<div class="card-body">
<h6 class="mb-3">
<i class="bi bi-info-circle me-2 text-info"></i>What happens when you delete an inventory item?
</h6>
<ul class="mb-0">
<li>The item will be marked as deleted (soft delete)</li>
<li>It will no longer appear in active inventory listings</li>
<li>All related transactions and job items will be preserved</li>
<li>Historical records and reports will still include this item</li>
<li>Administrators can restore deleted items if needed</li>
</ul>
</div>
</div>
</div>
</div>