2026-07-24 17:35:34 -03:00
|
|
|
namespace SeaHaven.Services.DTOs
|
|
|
|
|
{
|
2026-09-16 18:42:26 -03:00
|
|
|
public class DashboardStatsQueryDTO
|
2026-09-16 17:28:21 -03:00
|
|
|
{
|
|
|
|
|
public DateOnly? DateFrom { get; set; }
|
|
|
|
|
public DateOnly? DateTo { get; set; }
|
2026-09-16 21:37:17 -03:00
|
|
|
public string? DispatcherId { get; set; }
|
2026-09-16 17:28:21 -03:00
|
|
|
}
|
|
|
|
|
|
2026-09-16 18:42:26 -03:00
|
|
|
public sealed class DashboardTrendQueryDTO : DashboardStatsQueryDTO
|
|
|
|
|
{
|
|
|
|
|
public string? Range { get; set; }
|
|
|
|
|
public int? Year { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public sealed class DashboardTrendResponseDTO
|
|
|
|
|
{
|
|
|
|
|
public string Granularity { get; init; } = "day";
|
|
|
|
|
public DateOnly Today { get; init; }
|
|
|
|
|
public IReadOnlyList<DashboardTrendBucketDTO> Buckets { get; init; } = [];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public sealed class DashboardTrendBucketDTO
|
|
|
|
|
{
|
|
|
|
|
public DateOnly Date { get; init; }
|
|
|
|
|
public string Label { get; init; } = string.Empty;
|
|
|
|
|
public int Total { get; init; }
|
|
|
|
|
public int Open { get; init; }
|
|
|
|
|
public int Completed { get; init; }
|
|
|
|
|
public int Canceled { get; init; }
|
|
|
|
|
public int Overdue { get; init; }
|
|
|
|
|
public bool IsCurrent { get; init; }
|
|
|
|
|
}
|
|
|
|
|
|
2026-09-16 17:43:49 -03:00
|
|
|
public sealed class DashboardWorkloadResponseDTO
|
|
|
|
|
{
|
|
|
|
|
public IReadOnlyList<DashboardWorkloadRowDTO> Items { get; init; } = [];
|
|
|
|
|
public int Page { get; init; }
|
|
|
|
|
public int PageSize { get; init; }
|
|
|
|
|
public int TotalDispatchers { get; init; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public sealed class DashboardWorkloadRowDTO
|
|
|
|
|
{
|
|
|
|
|
public string DispatcherId { get; init; } = string.Empty;
|
|
|
|
|
public string DispatcherName { get; init; } = string.Empty;
|
2026-09-16 17:58:08 -03:00
|
|
|
public string? Color { get; init; }
|
2026-09-16 17:43:49 -03:00
|
|
|
public int TotalCount { get; init; }
|
|
|
|
|
public int OpenCount { get; init; }
|
|
|
|
|
}
|
|
|
|
|
|
2026-09-16 17:58:08 -03:00
|
|
|
public sealed class DashboardPerformanceResponseDTO
|
|
|
|
|
{
|
|
|
|
|
public IReadOnlyList<DashboardPerformanceRowDTO> Items { get; init; } = [];
|
|
|
|
|
public int Page { get; init; }
|
|
|
|
|
public int PageSize { get; init; }
|
|
|
|
|
public int TotalDispatchers { get; init; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public sealed class DashboardPerformanceRowDTO
|
|
|
|
|
{
|
|
|
|
|
public string DispatcherId { get; init; } = string.Empty;
|
|
|
|
|
public string DispatcherName { get; init; } = string.Empty;
|
|
|
|
|
public string? Color { get; init; }
|
|
|
|
|
public decimal CompletionRate { get; init; }
|
|
|
|
|
public decimal? AverageResolutionDays { get; init; }
|
2026-09-16 21:37:17 -03:00
|
|
|
public int AssignedCount { get; init; }
|
|
|
|
|
public int CompletedCount { get; init; }
|
2026-09-16 17:58:08 -03:00
|
|
|
}
|
|
|
|
|
|
2026-09-16 18:01:42 -03:00
|
|
|
public sealed class DashboardRegionResponseDTO
|
|
|
|
|
{
|
|
|
|
|
public IReadOnlyList<DashboardRegionRowDTO> Items { get; init; } = [];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public sealed class DashboardRegionRowDTO
|
|
|
|
|
{
|
|
|
|
|
public string Region { get; init; } = string.Empty;
|
|
|
|
|
public int WorkOrderCount { get; init; }
|
|
|
|
|
}
|
|
|
|
|
|
2026-09-16 18:10:42 -03:00
|
|
|
public sealed class DashboardVendorInsightsResponseDTO
|
|
|
|
|
{
|
|
|
|
|
public IReadOnlyList<DashboardVendorInsightsRowDTO> Items { get; init; } = [];
|
|
|
|
|
public int Page { get; init; }
|
|
|
|
|
public int PageSize { get; init; }
|
|
|
|
|
public int TotalVendors { get; init; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public sealed class DashboardVendorInsightsRowDTO
|
|
|
|
|
{
|
|
|
|
|
public int VendorCompanyId { get; init; }
|
|
|
|
|
public string VendorCompanyName { get; init; } = string.Empty;
|
|
|
|
|
public decimal CompletionRate { get; init; }
|
|
|
|
|
public decimal RescheduleRate { get; init; }
|
|
|
|
|
public decimal? AverageResolutionDays { get; init; }
|
|
|
|
|
public int TotalJobs { get; init; }
|
|
|
|
|
}
|
|
|
|
|
|
2026-07-24 17:35:34 -03:00
|
|
|
public class DashboardStatsDTO
|
|
|
|
|
{
|
|
|
|
|
public int Total { get; set; }
|
|
|
|
|
public int Open { get; set; }
|
|
|
|
|
public int NotDispatched { get; set; }
|
|
|
|
|
public int Completed { get; set; }
|
2026-09-16 19:19:10 -03:00
|
|
|
public int ScheduledTomorrow { get; set; }
|
|
|
|
|
public int PendingUplifts { get; set; }
|
|
|
|
|
public int AvetaPending { get; set; }
|
2026-09-24 21:02:28 -03:00
|
|
|
/// <summary>Open work orders with no dispatcher in the selected period (SH-392).</summary>
|
|
|
|
|
public int Unassigned { get; set; }
|
2026-09-16 17:28:21 -03:00
|
|
|
public DashboardBreakdownDTO Breakdown { get; set; } = new();
|
|
|
|
|
public int DueCount { get; set; }
|
|
|
|
|
public int CompletedDueCount { get; set; }
|
|
|
|
|
public decimal CompletionRate { get; set; }
|
|
|
|
|
public decimal? AverageResolutionDays { get; set; }
|
2026-09-16 21:37:17 -03:00
|
|
|
public IReadOnlyList<DashboardStatusBucketDTO> StatusDistribution { get; set; } = [];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public sealed class DashboardStatusBucketDTO
|
|
|
|
|
{
|
|
|
|
|
public string Status { get; init; } = string.Empty;
|
|
|
|
|
public int Count { get; init; }
|
2026-09-16 17:28:21 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public sealed class DashboardBreakdownDTO
|
|
|
|
|
{
|
|
|
|
|
public int PM { get; set; }
|
|
|
|
|
public int Emergency { get; set; }
|
|
|
|
|
public int Reactive { get; set; }
|
|
|
|
|
public int Overdue { get; set; }
|
|
|
|
|
public int Other { get; set; }
|
2026-07-24 17:35:34 -03:00
|
|
|
}
|
|
|
|
|
}
|