@model PowderCoating.Application.DTOs.Scheduling.OvenBatchDto @{ var statusClass = Model.Status switch { "Planned" => "status-planned", "Loading" => "status-loading", "InProgress" => "status-inprogress", "Completed" => "status-completed", _ => "" }; var capPct = Model.MaxLoadSqFt.HasValue ? (double)Model.CapacityPct : 0; var capClass = capPct >= 100 ? "cap-over" : capPct >= 80 ? "cap-warn" : "cap-ok"; var isEditable = Model.Status == "Planned" || Model.Status == "Loading"; }
@Model.BatchNumber @if (Model.AiSuggested) { AI } @Model.Status
@if (Model.ScheduledStartTime.HasValue) {
@Model.ScheduledStartTime.Value.ToString("h:mm tt") @if (Model.EstimatedEndTime.HasValue) { – @Model.EstimatedEndTime.Value.ToString("h:mm tt") } (@Model.CycleMinutes min)
} else {
@Model.CycleMinutes min cycle
}
@if (!string.IsNullOrEmpty(Model.PrimaryColorName)) {
@Model.PrimaryColorName @if (!string.IsNullOrEmpty(Model.PrimaryColorCode)) { (@Model.PrimaryColorCode) } @if (Model.CureTemperatureF.HasValue) { @Model.CureTemperatureF°F }
}
Capacity @Model.TotalSurfaceAreaSqFt.ToString("F1") @if (Model.MaxLoadSqFt.HasValue) { / @Model.MaxLoadSqFt.Value.ToString("F0") sqft } else { sqft }
@if (Model.MaxLoadSqFt.HasValue) {
}
@foreach (var item in Model.Items.OrderBy(i => i.CoatPassNumber)) {
Pass @item.CoatPassNumber @if (!string.IsNullOrEmpty(item.ColorName)) { @item.ColorName } @item.ItemDescription
@item.JobNumber · @item.SurfaceAreaContribution.ToString("F1") sqft @if (!string.IsNullOrEmpty(item.Priority) && item.Priority != "Normal") { @item.Priority }
@if (isEditable) {
}
} @if (isEditable) {
@(Model.Items.Any() ? "Drop more here" : "Drag coats here")
}
@if (Model.Status == "Planned" || Model.Status == "Loading") { } else if (Model.Status == "InProgress") { } else if (Model.Status == "Completed") {
Completed @Model.ActualEndTime?.ToString("h:mm tt")
}
@functions { string GetStatusBadge(string status) => status switch { "Planned" => "bg-secondary", "Loading" => "bg-primary", "InProgress" => "bg-warning text-dark", "Completed" => "bg-success", "Cancelled" => "bg-danger", _ => "bg-light text-dark" }; string GetPriorityBadge(string priority) => priority switch { "Rush" => "bg-danger", "Urgent" => "bg-warning text-dark", "High" => "bg-primary", _ => "bg-secondary" }; }