shoc-backend/SeaHaven.DataServices/Interfaces/WorkOrderAdvancedSearchModels.cs
Alexandre Brandizzi 028908bd5a fix(board-search): make the Advanced Filters date range narrow results (SH-391)
An explicit date range let every undated, non-terminal work order through,
so Unassigned plus a range still returned all ~1,780 unassigned rows. The
range now matches Schedule On, or the Target Week for week-only rows
(overlap), the same date the weekly board groups by. Undated rows are added
only when the caller sends includeDateless, which the client uses for
searches with no range selected and for the Unassigned queue.
2026-09-24 20:51:44 -03:00

41 lines
1.2 KiB
C#

using Data.SeaHavenIndustries.Enums;
using SeaHaven.DataServices.Interfaces;
namespace SeaHaven.DataServices.Interfaces
{
public record WorkOrderAdvancedSearchQuery(
string? Search,
DateOnly DateFrom,
DateOnly DateTo,
bool UnscheduledOnly,
IReadOnlyList<string>? Sites,
IReadOnlyList<string>? Regions,
IReadOnlyList<WorkOrderType>? Types,
bool Overdue,
IReadOnlyList<string>? Dispatchers,
IReadOnlyList<LifecycleStatus>? Statuses,
IReadOnlyList<string>? PmTypes,
IReadOnlyList<int>? VendorIds,
IReadOnlyList<DocStatus>? DocStatuses,
IReadOnlyList<int>? Severities,
bool Rescheduled,
bool CarriedOver,
bool AddOn,
bool AvetaOnly,
IReadOnlyList<string>? FlagColors,
bool InternalOnly,
bool HasUplift,
IReadOnlyList<string>? UpliftStatuses,
bool MyWorkOrders,
string? CurrentUserId,
int Page,
int PageSize,
string SortBy,
string SortDir,
int? AccountId = null,
bool IncludeDateless = false);
public record WorkOrderAdvancedSearchResult(
IReadOnlyList<WorkOrderBoardRawRow> Rows,
int TotalCount);
}