Initial commit

This commit is contained in:
2026-04-23 21:38:24 -04:00
commit 63e12a9636
1762 changed files with 1672620 additions and 0 deletions
@@ -0,0 +1,92 @@
@using PowderCoating.Core.Entities
@model ManufacturerLookupPattern
@{
ViewData["Title"] = "Edit Pattern";
}
<div class="container-fluid py-3">
<div class="d-flex align-items-center mb-3">
<a asp-action="Index" class="btn btn-outline-secondary btn-sm me-3">
<i class="bi bi-arrow-left"></i>
</a>
<h4 class="mb-0"><i class="bi bi-pencil me-2 text-primary"></i>Edit Pattern</h4>
</div>
<div class="row justify-content-center">
<div class="col-lg-7">
<div class="card border-0 shadow-sm">
<div class="card-body p-4">
<form asp-action="Edit" method="post">
@Html.AntiForgeryToken()
<input asp-for="Id" type="hidden" />
<div asp-validation-summary="ModelOnly" class="alert alert-danger mb-3 small"></div>
<div class="mb-3">
<label asp-for="ManufacturerName" class="form-label fw-medium">Manufacturer Name <span class="text-danger">*</span></label>
<input asp-for="ManufacturerName" class="form-control" placeholder="e.g. Prismatic Powders" />
<span asp-validation-for="ManufacturerName" class="text-danger small"></span>
</div>
<div class="mb-3">
<label asp-for="Domain" class="form-label fw-medium">Domain</label>
<input asp-for="Domain" class="form-control" placeholder="e.g. prismaticpowders.com" />
<div class="form-text">Used by the AI to match search result URLs to this manufacturer, even when no URL template is configured.</div>
<span asp-validation-for="Domain" class="text-danger small"></span>
</div>
<div class="mb-3">
<label asp-for="ProductUrlTemplate" class="form-label fw-medium">Product URL Template</label>
<input asp-for="ProductUrlTemplate" class="form-control" placeholder="e.g. https://www.prismaticpowders.com/shop/powder-coating-colors/{partNumber}/{slug}" />
<div class="form-text">
Supported placeholders:
<code>{partNumber}</code> — manufacturer part number (slashes normalized to hyphens),
<code>{slug}</code> — color name transformed by Slug Transform below,
<code>{colorCode}</code> — color code as-is.
If a required placeholder is missing at runtime the template is skipped and the system falls back to a search URL.
</div>
<span asp-validation-for="ProductUrlTemplate" class="text-danger small"></span>
</div>
<div class="mb-3">
<label asp-for="SlugTransform" class="form-label fw-medium">Slug Transform</label>
<select asp-for="SlugTransform" class="form-select">
<option value="LowerHyphen">LowerHyphen — e.g. "jet-black"</option>
<option value="LowerUnderscore">LowerUnderscore — e.g. "jet_black"</option>
<option value="TitleHyphen">TitleHyphen — e.g. "Jet-Black"</option>
<option value="AsIs">AsIs — color name unchanged</option>
</select>
<div class="form-text">How the color name is converted to a URL slug when building the product URL.</div>
<span asp-validation-for="SlugTransform" class="text-danger small"></span>
</div>
<div class="mb-3">
<div class="form-check form-switch">
<input asp-for="IsActive" class="form-check-input" type="checkbox" />
<label asp-for="IsActive" class="form-check-label">Active</label>
</div>
<div class="form-text">Inactive patterns are ignored by the AI lookup service.</div>
</div>
<div class="mb-4">
<label asp-for="Notes" class="form-label fw-medium">Notes</label>
<textarea asp-for="Notes" class="form-control" rows="2" placeholder="Optional notes about this pattern or known quirks"></textarea>
<span asp-validation-for="Notes" class="text-danger small"></span>
</div>
<div class="d-flex gap-2">
<button type="submit" class="btn btn-primary">
<i class="bi bi-check-lg me-1"></i>Save Changes
</button>
<a asp-action="Index" class="btn btn-outline-secondary">Cancel</a>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}