@model IEnumerable @using PowderCoating.Application.DTOs.Job @using PowderCoating.Core.Entities @using PowderCoating.Core.Enums @{ ViewData["Title"] = "Daily Board"; ViewData["PageIcon"] = "bi-kanban"; ViewData["PageHelpTitle"] = "Daily Board"; ViewData["PageHelpContent"] = "Day-by-day view of jobs scheduled for shop work. Drag rows to reorder processing order. Click any Priority badge or Worker cell to quick-edit inline without leaving the page. Navigate between days with Previous/Next. Overdue due dates show in red. The Scheduled Maintenance section at the bottom shows equipment tasks due on the same day."; var scheduledDate = ViewBag.ScheduledDate as DateTime? ?? DateTime.Today; var maintenanceItems = ViewBag.MaintenanceItems as IEnumerable ?? Enumerable.Empty(); var overdueJobs = ViewBag.OverdueJobs as List ?? new List(); }

Scheduled for @scheduledDate.ToString("MMMM dd, yyyy") @if (scheduledDate.Date == DateTime.Today) { Today } else if (scheduledDate.Date == DateTime.Today.AddDays(1)) { Tomorrow } else if (scheduledDate.Date == DateTime.Today.AddDays(-1)) { Yesterday }

@* ── Carried-Over (Overdue) Jobs ──────────────────────────────────────── *@ @if (overdueJobs.Any()) {
Carried Over — Not Yet Completed
@overdueJobs.Count job@(overdueJobs.Count == 1 ? "" : "s")
@foreach (var job in overdueJobs) { }
Job Number Customer Status Priority Assigned Worker Scheduled Date Due Date
@job.JobNumber @job.CustomerName @job.StatusDisplayName @job.PriorityDisplayName @if (!string.IsNullOrEmpty(job.AssignedWorkerName)) { @job.AssignedWorkerName } else { Unassigned } @if (job.ScheduledDate.HasValue) { @job.ScheduledDate.Value.ToString("MMM dd, yyyy") } @if (job.DueDate.HasValue) { var isOverdue = job.DueDate.Value.Date < DateTime.Today; @job.DueDate.Value.ToString("MMM dd, yyyy") @if (isOverdue) { } } else { Not set }
} @if (!Model.Any()) {
No jobs scheduled for @scheduledDate.ToString("MMMM dd, yyyy").
} else {
Drag and drop to reorder jobs
@foreach (var job in Model) { }
Job Number Customer Status Priority Assigned Worker Scheduled Date Due Date
@job.JobNumber @job.CustomerName @job.StatusDisplayName @job.PriorityDisplayName @if (!string.IsNullOrEmpty(job.AssignedWorkerName)) { @job.AssignedWorkerName } else { Unassigned } @if (job.ScheduledDate.HasValue) { @job.ScheduledDate.Value.ToString("MMM dd, yyyy") } else { Not set } @if (job.DueDate.HasValue) { var isOverdue = job.DueDate.Value.Date < DateTime.Today; @job.DueDate.Value.ToString("MMM dd, yyyy") @if (isOverdue) { } } else { Not set }
Tip: Drag rows to reorder. Click priority or worker to quick edit. Click other cells to view job details.
} @* ── Scheduled Maintenance for the Day ──────────────────────────────── *@
Scheduled Maintenance @scheduledDate.ToString("MMMM dd, yyyy")
@if (maintenanceItems.Any()) { @maintenanceItems.Count() item@(maintenanceItems.Count() == 1 ? "" : "s") }
@if (!maintenanceItems.Any()) {
No maintenance scheduled for @scheduledDate.ToString("MMMM dd, yyyy").
} else {
@foreach (var item in maintenanceItems) { var priorityBg = item.Priority switch { MaintenancePriority.Critical => "danger", MaintenancePriority.High => "warning", MaintenancePriority.Normal => "info", _ => "secondary" }; var priorityFg = (item.Priority == MaintenancePriority.High || item.Priority == MaintenancePriority.Normal) ? "text-dark" : "text-white"; var statusBg = item.Status == MaintenanceStatus.InProgress ? "success" : "primary"; var statusLabel = item.Status == MaintenanceStatus.InProgress ? "In Progress" : "Scheduled"; }
Equipment Type Priority Status Assigned To Description
@(item.Equipment?.EquipmentName ?? "—") @if (!string.IsNullOrEmpty(item.Equipment?.Location)) {
@item.Equipment.Location }
@item.MaintenanceType @item.Priority @statusLabel @if (item.AssignedUser != null) { @item.AssignedUser.FullName } else { Unassigned } @item.Description
}
@section Scripts { @Html.AntiForgeryToken() }