Skip to content

Commit 497a389

Browse files
fixed topcoder-archive/appirio_tech-topcoder-app/issues/1004 added appeals and scorecard buttons
1 parent 7188bcc commit 497a389

File tree

2 files changed

+30
-13
lines changed

2 files changed

+30
-13
lines changed

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

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,33 @@
1111
<div class="container rightSplit grid-3-3">
1212

1313
<div class="leftColumn">
14-
<a ng-show="!CD.isDesign" ng-click="CD.challenge.allowToUnregister?CD.unregisterFromChallenge():CD.registerToChallenge()" ng-class="{disabled:!CD.challenge.allowToUnregister && (CD.challenge.registrationDisabled || !CD.callComplete), disabledNOT:!CD.challenge.registrationDisabled, unregister: CD.challenge.allowToUnregister}" class="btn btnAction challengeRegisterBtn" href="javascript:;">
15-
<span>1</span>
16-
<strong ng-hide="CD.isRegistered">
17-
Register For This Challenge
18-
</strong>
19-
<strong ng-show="CD.isRegistered">
20-
Unregister From This Challenge
21-
</strong>
22-
</a>
23-
<a ng-show="!CD.isDesign" ng-class="{disabled:CD.challenge.submissionDisabled || !CD.callComplete, disabledNOT:!CD.challenge.submissionDisabled}" class="btn btnAction" target="_blank"
24-
ng-href="/challenge-details/{{CD.challenge.challengeId}}/submit/?type=develop">
25-
<span>2</span><strong>Submit Your Entries</strong>
26-
</a>
14+
<div ng-if="!CD.isDesign">
15+
<div ng-if="CD.showAppealsButtons">
16+
<a class="btn btnAction" target="_blank" ng-href="//{{CD.reviewAppURL}}/actions/ViewProjectDetails?pid={{CD.challenge.challengeId}}">
17+
<span>1</span>
18+
<strong>View Scorecard</strong>
19+
</a>
20+
<a class="btn btnAction unregister" target="_blank" ng-href="//{{CD.reviewAppURL}}/actions/EarlyAppeals?pid={{CD.challenge.challengeId}}">
21+
<span>2</span>
22+
<strong>Complete Appeals</strong>
23+
</a>
24+
</div>
25+
<div ng-if="!CD.showAppealsButtons">
26+
<a ng-click="CD.challenge.allowToUnregister?CD.unregisterFromChallenge():CD.registerToChallenge()" ng-class="{disabled:!CD.challenge.allowToUnregister && (CD.challenge.registrationDisabled || !CD.callComplete), disabledNOT:!CD.challenge.registrationDisabled, unregister: CD.challenge.allowToUnregister}" class="btn btnAction challengeRegisterBtn" href="javascript:;">
27+
<span>1</span>
28+
<strong ng-hide="CD.isRegistered">
29+
Register For This Challenge
30+
</strong>
31+
<strong ng-show="CD.isRegistered">
32+
Unregister From This Challenge
33+
</strong>
34+
</a>
35+
<a ng-class="{disabled:CD.challenge.submissionDisabled || !CD.callComplete, disabledNOT:!CD.challenge.submissionDisabled}" class="btn btnAction" target="_blank"
36+
ng-href="/challenge-details/{{CD.challenge.challengeId}}/submit/?type=develop">
37+
<span>2</span><strong>Submit Your Entries</strong>
38+
</a>
39+
</div>
40+
</div>
2741
<a ng-show="CD.isDesign" ng-click="CD.challenge.allowToUnregister?CD.unregisterFromChallenge():CD.registerToChallenge()" ng-class="{disabled:!CD.challenge.allowToUnregister && (CD.challenge.registrationDisabled || !CD.callComplete), disabledNOT:!CD.challenge.registrationDisabled, unregister: CD.challenge.allowToUnregister}" class="btn btnAction challengeRegisterBtn" href="javascript:;">
2842
<span>1</span>
2943
<strong ng-hide="CD.isRegistered">

src/js/app/challenge-details/js/controllers/challenge-details-controller.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
}
6666
vm.activeTab = 'details';
6767
vm.domain = tcconfig.domain;
68+
vm.reviewAppURL = tcconfig.reviewAppURL;
6869

6970
if (window.location.hash == '#viewRegistrant' || window.location.hash == '#/viewRegistrant') vm.activeTab = 'registrants';
7071
else if (window.location.hash == '#winner' || window.location.hash == '#/winner') vm.activeTab = 'results';
@@ -351,6 +352,8 @@
351352
vm.challenge.registrationDisabled = false;
352353
}
353354
}
355+
// check if in appeals phase and has submission
356+
vm.showAppealsButtons = (hasSubmitted && (vm.challenge.currentPhaseName === 'Appeals'));
354357

355358
//check autoRegister (terms link register) and DelayAction cookie status
356359
if (autoRegister) {

0 commit comments

Comments
 (0)