Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions libs/net/dal/Services/ReportService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ public IEnumerable<Report> GetDashboard(DashboardFilter filter)
.AsNoTracking()
.Include(r => r.Owner)
.Include(r => r.Events).ThenInclude(e => e.Schedule)
.Where(r => this.Context.ReportInstances
.Where(ri => ri.ReportId == r.Id)
.OrderByDescending(ri => ri.Id)
.Select(ri => ri.Status)
.FirstOrDefault() != ReportStatus.Pending)
.AsQueryable();

if (filter.IsEnabled.HasValue)
Expand Down Expand Up @@ -206,6 +211,7 @@ public IEnumerable<Report> GetDashboard(DashboardFilter filter)
var instances = (
from ri in this.Context.ReportInstances
where reportIds.Contains(ri.ReportId)
&& ri.Status != ReportStatus.Pending
group ri by ri.ReportId into rig
select rig.OrderByDescending(ri => ri.Id).Take(2))
.AsNoTracking()
Expand Down
Loading