Skip to content

Commit

Permalink
further simplified collapsed-objectives component template and logic
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelchadwick committed Nov 18, 2024
1 parent d9c71f9 commit 7000929
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
{{on "click" @expand}}
>
{{t "general.objectives"}}
({{get this.objectives "length"}})
({{this.objectives.length}})
<FaIcon @icon="caret-right" />
</button>
</div>
{{#if this.objectives}}
{{#if this.objectives.length}}
<div class="content">
<table>
<thead>
Expand All @@ -34,10 +34,10 @@
<tbody>
<tr>
<td data-test-objective-count>
{{t "general.objectiveCount" count=(get this.objectives "length")}}
{{t "general.objectiveCount" count=this.objectives.length}}
</td>
<td class="text-middle text-center" rowspan="3" data-test-parent-status>
{{#if (eq (get this.objectivesWithParents "length") (get this.objectives "length"))}}
{{#if (eq this.objectivesWithParents.length this.objectives.length)}}
<FaIcon @icon="circle" class="yes" />
{{else if (gte (get this.objectivesWithParents "length") 1)}}
<FaIcon @icon="circle" class="maybe" />
Expand All @@ -46,7 +46,7 @@
{{/if}}
</td>
<td class="text-middle text-center" rowspan="3" data-test-term-status>
{{#if (eq (get this.objectivesWithTerms "length") (get this.objectives "length"))}}
{{#if (eq this.objectivesWithTerms.length this.objectives.length)}}
<FaIcon @icon="circle" class="yes" />
{{else if (gte (get this.objectivesWithTerms "length") 1)}}
<FaIcon @icon="circle" class="maybe" />
Expand All @@ -55,7 +55,7 @@
{{/if}}
</td>
<td class="text-middle text-center" rowspan="3" data-test-mesh-status>
{{#if (eq (get this.objectivesWithMesh "length") (get this.objectives "length"))}}
{{#if (eq this.objectivesWithMesh.length this.objectives.length)}}
<FaIcon @icon="circle" class="yes" />
{{else if (gte (get this.objectivesWithMesh "length") 1)}}
<FaIcon @icon="circle" class="maybe" />
Expand All @@ -66,17 +66,17 @@
</tr>
<tr>
<td data-test-parent-count class="count">
{{t "general.parentCount" count=(get this.objectivesWithParents "length")}}
{{t "general.parentCount" count=this.objectivesWithParents.length}}
</td>
</tr>
<tr>
<td data-test-term-count class="count">
{{t "general.termCount" count=(get this.objectivesWithTerms "length")}}
{{t "general.termCount" count=this.objectivesWithTerms.length}}
</td>
</tr>
<tr>
<td data-test-mesh-count class="count">
{{t "general.meshCount" count=(get this.objectivesWithMesh "length")}}
{{t "general.meshCount" count=this.objectivesWithMesh.length}}
</td>
</tr>
</tbody>
Expand Down

0 comments on commit 7000929

Please sign in to comment.