Files
PowderCoatingLogix/src/PowderCoating.Web/ViewModels/PowderCatalog/PowderCatalogFormViewModel.cs
T
spouliot 11a1b91be1 Add platform powder catalog management UI with full CRUD and AI lookup
- PowderCatalogController: Create, Edit, ToggleDiscontinued actions; searchable/filterable/sortable Index with pagination; AiLookup and AiAugmentFromUrl endpoints backed by IInventoryAiLookupService
- New views: Create, Edit, _Form partial (with AI-assisted field population), overhauled Index grid with completeness quality badges and responsive mobile cards
- New ViewModels: PowderCatalogIndexViewModel, PowderCatalogFormViewModel, PowderCatalogListItemViewModel
- AI lookup improvements: SpecificGravity field added to InventoryAiLookupResult; ApplyPowderFallbacks derives CoverageSqFtPerLb from specific gravity when docs omit it; DefaultTransferEfficiency (65%) applied everywhere transfer efficiency is null
- powder-catalog-ai-lookup.js: client-side AI lookup and URL augment wiring for the catalog form

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 00:27:44 -04:00

86 lines
2.2 KiB
C#

using System.ComponentModel.DataAnnotations;
namespace PowderCoating.Web.ViewModels.PowderCatalog;
public class PowderCatalogFormViewModel
{
public int Id { get; set; }
[Required]
[StringLength(120)]
public string VendorName { get; set; } = string.Empty;
[Required]
[StringLength(100)]
[Display(Name = "SKU")]
public string Sku { get; set; } = string.Empty;
[Required]
[StringLength(160)]
[Display(Name = "Color Name")]
public string ColorName { get; set; } = string.Empty;
[StringLength(4000)]
public string? Description { get; set; }
[Range(0, 999999)]
[Display(Name = "Unit Price")]
public decimal UnitPrice { get; set; }
[Url]
[Display(Name = "Image URL")]
public string? ImageUrl { get; set; }
[Url]
[Display(Name = "SDS URL")]
public string? SdsUrl { get; set; }
[Url]
[Display(Name = "TDS URL")]
public string? TdsUrl { get; set; }
[Url]
[Display(Name = "Application Guide URL")]
public string? ApplicationGuideUrl { get; set; }
[Url]
[Display(Name = "Product URL")]
public string? ProductUrl { get; set; }
[Range(0, 1000)]
[Display(Name = "Cure Temperature (F)")]
public decimal? CureTemperatureF { get; set; }
[Range(0, 1000)]
[Display(Name = "Cure Time (Minutes)")]
public int? CureTimeMinutes { get; set; }
[StringLength(100)]
public string? Finish { get; set; }
[StringLength(300)]
[Display(Name = "Color Families")]
public string? ColorFamilies { get; set; }
[Display(Name = "Requires Clear Coat")]
public bool? RequiresClearCoat { get; set; }
[Range(0, 10000)]
[Display(Name = "Coverage (Sq Ft / Lb)")]
public decimal? CoverageSqFtPerLb { get; set; }
[Range(0, 100)]
[Display(Name = "Transfer Efficiency (%)")]
public decimal? TransferEfficiency { get; set; }
[Display(Name = "Discontinued")]
public bool IsDiscontinued { get; set; }
[Display(Name = "User Contributed")]
public bool IsUserContributed { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime? UpdatedAt { get; set; }
public DateTime? LastSyncedAt { get; set; }
}