Initial commit
This commit is contained in:
@@ -0,0 +1,216 @@
|
||||
@model PowderCoating.Application.DTOs.Vendor.VendorDto
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete Vendor";
|
||||
ViewData["PageIcon"] = "bi-truck";
|
||||
var hasInventoryItems = ViewBag.InventoryItemCount > 0;
|
||||
}
|
||||
|
||||
<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 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 vendor?</h5>
|
||||
<p class="mb-0">This action will mark the vendor as deleted. All related records will be preserved but the vendor will no longer appear in active listings.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (hasInventoryItems)
|
||||
{
|
||||
<div class="alert alert-warning d-flex align-items-start mb-4">
|
||||
<i class="bi bi-exclamation-circle-fill me-3" style="font-size: 1.5rem;"></i>
|
||||
<div>
|
||||
<h5 class="alert-heading mb-2">Warning: This vendor has inventory items</h5>
|
||||
<p class="mb-0">This vendor has <strong>@ViewBag.InventoryItemCount inventory item(s)</strong> associated with it. Deleting this vendor will not affect the inventory items, but the vendor reference will be maintained for historical records.</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-truck me-2"></i>Vendor to be Deleted
|
||||
</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<!-- Vendor Information -->
|
||||
<div class="mb-4">
|
||||
<h6 class="text-muted small text-uppercase mb-2">Vendor Information</h6>
|
||||
<div class="row g-3">
|
||||
<div class="col-md-8">
|
||||
<label class="text-muted small mb-1">Vendor Name</label>
|
||||
<p class="fw-semibold mb-0">@Model.CompanyName</p>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label class="text-muted small mb-1">Status</label>
|
||||
<p class="mb-0">
|
||||
@if (Model.IsActive)
|
||||
{
|
||||
<span class="badge bg-success">Active</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="badge bg-secondary">Inactive</span>
|
||||
}
|
||||
@if (Model.IsPreferred)
|
||||
{
|
||||
<span class="badge bg-warning text-dark ms-1">
|
||||
<i class="bi bi-star-fill"></i> Preferred
|
||||
</span>
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<!-- Contact Information -->
|
||||
<div class="mb-4">
|
||||
<h6 class="text-muted small text-uppercase mb-2">Contact Information</h6>
|
||||
<div class="row g-3">
|
||||
<div class="col-md-6">
|
||||
<label class="text-muted small mb-1">Contact Name</label>
|
||||
<p class="mb-0">@(Model.ContactName ?? "Not provided")</p>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="text-muted small mb-1">Email</label>
|
||||
<p class="mb-0">@(Model.Email ?? "Not provided")</p>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="text-muted small mb-1">Phone</label>
|
||||
<p class="mb-0">@(Model.Phone ?? "Not provided")</p>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="text-muted small mb-1">Website</label>
|
||||
<p class="mb-0">
|
||||
@if (!string.IsNullOrEmpty(Model.Website))
|
||||
{
|
||||
<a href="@Model.Website" target="_blank">@Model.Website</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="text-muted">Not provided</span>
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<!-- Address -->
|
||||
<div class="mb-4">
|
||||
<h6 class="text-muted small text-uppercase mb-2">Address</h6>
|
||||
@if (!string.IsNullOrEmpty(Model.Address))
|
||||
{
|
||||
<p class="mb-1">@Model.Address</p>
|
||||
<p class="mb-0">
|
||||
@if (!string.IsNullOrEmpty(Model.City))
|
||||
{
|
||||
<span>@Model.City</span>
|
||||
}
|
||||
@if (!string.IsNullOrEmpty(Model.State))
|
||||
{
|
||||
<span>, @Model.State</span>
|
||||
}
|
||||
@if (!string.IsNullOrEmpty(Model.ZipCode))
|
||||
{
|
||||
<span> @Model.ZipCode</span>
|
||||
}
|
||||
</p>
|
||||
@if (!string.IsNullOrEmpty(Model.Country))
|
||||
{
|
||||
<p class="mb-0 text-muted">@Model.Country</p>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<p class="text-muted mb-0">No address provided</p>
|
||||
}
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<!-- Business Information -->
|
||||
<div class="mb-4">
|
||||
<h6 class="text-muted small text-uppercase mb-2">Business Information</h6>
|
||||
<div class="row g-3">
|
||||
<div class="col-md-6">
|
||||
<label class="text-muted small mb-1">Account Number</label>
|
||||
<p class="mb-0">@(Model.AccountNumber ?? "Not provided")</p>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="text-muted small mb-1">Tax ID / EIN</label>
|
||||
<p class="mb-0">@(Model.TaxId ?? "Not provided")</p>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="text-muted small mb-1">Payment Terms</label>
|
||||
<p class="mb-0">@(Model.PaymentTerms ?? "Not set")</p>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="text-muted small mb-1">Credit Limit</label>
|
||||
<p class="mb-0 fw-semibold">
|
||||
@if (Model.CreditLimit.HasValue)
|
||||
{
|
||||
@Model.CreditLimit.Value.ToString("C")
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="text-muted">Not set</span>
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (hasInventoryItems)
|
||||
{
|
||||
<div class="alert alert-info d-flex align-items-center">
|
||||
<i class="bi bi-info-circle me-2"></i>
|
||||
<div>
|
||||
<strong>Inventory Items:</strong> This vendor has @ViewBag.InventoryItemCount inventory item(s) on record.
|
||||
</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 Vendor
|
||||
</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 a vendor?
|
||||
</h6>
|
||||
<ul class="mb-0">
|
||||
<li>The vendor will be marked as deleted (soft delete)</li>
|
||||
<li>They will no longer appear in active vendor listings</li>
|
||||
<li>All related inventory items will be preserved</li>
|
||||
<li>Historical records and reports will still include this vendor</li>
|
||||
<li>Administrators can restore deleted vendors if needed</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user