namespace SeaHaven.DataServices.Helpers { /// /// SH-183: a cancelled or refused primary dispatch is not a live vendor assignment. /// Verified/Completed remain live — the company that did the work. /// public static class WorkOrderBoardDispatchAssignment { public static bool IsInactivePrimaryDispatch(string? status) { var normalized = (status ?? string.Empty).Trim().ToLowerInvariant(); return normalized is "cancelled" or "canceled" or "refused"; } public static (int? VendorId, string? VendorName) LiveVendor( int? vendorId, string? vendorName, string? primaryDispatchStatus) { if (IsInactivePrimaryDispatch(primaryDispatchStatus)) { return (null, null); } return (vendorId, vendorName); } } }