Skip to content

Commit

Permalink
include decision types
Browse files Browse the repository at this point in the history
  • Loading branch information
elielijah321 committed Jul 16, 2024
1 parent 73e7c0c commit cbfc9f5
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,7 @@ private IQueryable<ActiveCaseSummaryVm> SelectOpenCaseSummary(IQueryable<Concern
in cases.ConcernsRecords
where concerns.StatusId == 1
select new CaseSummaryVm.Concern(concerns.ConcernsType.ToString(), concerns.ConcernsRating, concerns.CreatedAt),
Decisions = from decisions
in cases.Decisions
where !decisions.ClosedAt.HasValue
select decisions,
Decisions = _concernsDbContext.Decisions.Where(d => d.ConcernsCaseId == cases.Id && !d.ClosedAt.HasValue).Include(d => d.DecisionTypes).ToArray(),
FinancialPlanCases = _concernsDbContext.FinancialPlanCases
.Where(x => x.CaseUrn == cases.Urn && !x.ClosedAt.HasValue)
.Select(action => new CaseSummaryVm.Action(action.CreatedAt, null, CaseSummaryConstants.FinancialPlan))
Expand Down Expand Up @@ -220,7 +217,7 @@ private IQueryable<ClosedCaseSummaryVm> SelectClosedCaseSummary(IQueryable<Conce
from concerns in cases.ConcernsRecords
where concerns.StatusId == 3
select new CaseSummaryVm.Concern(concerns.ConcernsType.ToString(), concerns.ConcernsRating, concerns.CreatedAt),
Decisions = from decisions in cases.Decisions select decisions,
Decisions = _concernsDbContext.Decisions.Where(d => d.ConcernsCaseId == cases.Id && d.ClosedAt.HasValue).Include(d => d.DecisionTypes).ToArray(),
FinancialPlanCases = _concernsDbContext.FinancialPlanCases
.Where(x => x.CaseUrn == cases.Urn)
.Select(action => new CaseSummaryVm.Action(action.CreatedAt, action.ClosedAt, CaseSummaryConstants.FinancialPlan))
Expand Down

0 comments on commit cbfc9f5

Please sign in to comment.