Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 4055207

Browse files
committed
Adds Digital Run Points (abbreviate as just Points) to the Challenge Details page
Also fixes the logic for hiding Reliability Bonus section for the challenges with no such bonus.
1 parent ae028c2 commit 4055207

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

src/js/app/challenge-details/index.html

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ <h3>
7676

7777
<h2>5th PLACE</h2>
7878
</td>
79-
<td ng-if="designOrCode && (CD.challenge.prize && CD.challenge.prize.length > 5)" class="morePayments active closed" rowspan="2">
79+
<td ng-if="designOrCode && (CD.challenge.prize && CD.challenge.prize.length > 5)" class="morePayments active closed" rowspan="3">
8080
</td>
81-
<td ng-if="designOrCode && (CD.challenge.prize && CD.challenge.prize.length <= 5)" class="morePayments inactive" rowspan="2">
81+
<td ng-if="designOrCode && (CD.challenge.prize && CD.challenge.prize.length <= 5)" class="morePayments inactive" rowspan="3">
8282
</td>
8383
</tr>
8484
<tr ng-if="CD.challenge.prize && CD.challenge.prize.length > 5 && (currentPlace = 6)" class="additionalPrizes hide" ng-repeat="i in range(0, (CD.challenge.prize.length - 5) / 5)">
@@ -87,24 +87,37 @@ <h2 ng-bind-template="{{j + 1}}'th PLACE'"></h2>
8787
<h3><small>$</small><span ng-bind="CD.challenge.prize[j]"></span></h3>
8888
</td>
8989
</tr>
90-
<tr><!-- Bugfix: Added noPrize class when challenge has no reliability bonus -->
91-
<td ng-if="!CD.isDesign" colspan="5" class="{{ (!CD.challenge.reliabilityBonus || CD.challenge.challengeType === 'Bug Hunt') ? 'noPrize' : ''}}">
90+
<tr>
91+
<td
92+
colspan="5"
93+
ng-if="!CD.isDesign && CD.reliabilityBonus
94+
&& (CD.challenge.challengeType !== 'Bug Hunt')"
95+
>
9296
<p class="realibilityPara">
9397
Reliability Bonus
94-
<span ng-if="CD.reliabilityBonus && CD.challenge.challengeType !== 'Bug Hunt'" ng-bind-template="${{CD.challenge.reliabilityBonus}}">
95-
</span>
96-
<span ng-if="!(CD.reliabilityBonus) || CD.challenge.challengeType === 'Bug Hunt'">
97-
N/A
98-
</span>
98+
<span
99+
ng-bind-template="${{CD.challenge.reliabilityBonus}}"
100+
></span>
99101
</p>
100102
</td>
101-
</td>
102103
<td ng-if="CD.isDesign" colspan="5">
103104
<p class="scPoints" ng-if="CD.challenge.numberOfCheckpointsPrizes > 0"><span ng-bind="CD.challenge.numberOfCheckpointsPrizes"></span> CHECKPOINT AWARDS WORTH <span ng-bind-template="${{CD.challenge.topCheckPointPrize}}"></span>
104105
EACH</p>
105106
<p class="scPoints" ng-if="CD.challenge.numberOfCheckpointsPrizes == 0">NO CHECKPOINT AWARDS</p>
106107
</td>
107108
</tr>
109+
<tr>
110+
<td
111+
colspan="5"
112+
ng-if="CD.challenge.digitalRunPoints"
113+
>
114+
<p class="realibilityPara">
115+
<span ng-bind-template="{{CD.challenge.digitalRunPoints}}">
116+
</span>
117+
Points
118+
</p>
119+
</td>
120+
</tr>
108121
</tbody>
109122
</table>
110123
<!-- TODO: not sure why this code is repeated -- probably get rid of it (or make sure my fix of it is correct) -->

0 commit comments

Comments
 (0)