Skip to content

Commit

Permalink
Merge pull request #7 from itpartnersillinois/jonker/GeneralFixes
Browse files Browse the repository at this point in the history
Wasn't checking all the domains
  • Loading branch information
bryanjonker-illinois authored Jul 26, 2024
2 parents 7573e91 + 788132c commit d5575a1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Danielson/Components/Pages/Form/Domain.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ public partial class Domain {
protected NavigationManager NavigationManager { get; set; } = default!;

public bool AreAllComponentsAnswered() {
ComponentsNotAnswered = DomainList.Domains.SelectMany(d => d.Components).Where(c => !CurrentForm.ComponentAnswers.ToList().Select(ca => ca.ComponentOrder).Contains(c.ComponentOrder)).Select(c => c.Title).ToList();
ComponentsNotAnswered = [];
foreach (var domain in DomainList.Domains) {
ComponentsNotAnswered.AddRange(domain.Components.Where(c => !CurrentForm.ComponentAnswers.Where(ca => ca.DomainItem == domain.DomainEnum).Select(ca => ca.ComponentOrder).Contains(c.ComponentOrder)).Select(c => c.Title));
}
return ComponentsNotAnswered.Count == 0;
}

Expand Down

0 comments on commit d5575a1

Please sign in to comment.