Skip to content

Commit

Permalink
Merge pull request #72 from bob2402/sub-problem
Browse files Browse the repository at this point in the history
problem: the sub-problems are not directly listed under the problem tab
  • Loading branch information
gsovereignty authored Aug 22, 2024
2 parents a06f6a5 + d389b7d commit 119e098
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/components/novoproblems/ProblemView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,29 @@
currentUserCanModify={$currentUserCanModify}
{problem}
/>
{#if problem.FullChildren.size > 0}
<h3>
Sub-Problems
</h3>
{#each problem.FullChildren as [_, child]}
{#if childProblemFilter}{#if child.FullTextSearch(childProblemFilter) > 0.65}
<ChildProblemTile
searchMatch={child.FullTextSearch(childProblemFilter)}
problem={child}
/>{/if}
{#each child.getDescendants($consensusTipState) as [_, subproblem]}
{#if subproblem.FullTextSearch(childProblemFilter) > 0.65}
<ChildProblemTile
searchMatch={subproblem.FullTextSearch(childProblemFilter)}
problem={subproblem}
/>{/if}
{/each}
{:else}
{#if child.Status != "closed"}
<ChildProblemTile problem={child} />
{/if}
{/if}{/each}
{/if}
{/if}
{#if $selectedTab == "sub-problems"}
<AddNewSubProblem required={$extraSearchParams == "newproblem"}
Expand Down

0 comments on commit 119e098

Please sign in to comment.