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

fixed appirio-tech/topcoder-app/issues/1004 added appeals and scorecard #475

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 27 additions & 13 deletions src/js/app/challenge-details/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,33 @@
<div class="container rightSplit grid-3-3">

<div class="leftColumn">
<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:;">
<span>1</span>
<strong ng-hide="CD.isRegistered">
Register For This Challenge
</strong>
<strong ng-show="CD.isRegistered">
Unregister From This Challenge
</strong>
</a>
<a ng-show="!CD.isDesign" ng-class="{disabled:CD.challenge.submissionDisabled || !CD.callComplete, disabledNOT:!CD.challenge.submissionDisabled}" class="btn btnAction" target="_blank"
ng-href="/challenge-details/{{CD.challenge.challengeId}}/submit/?type=develop">
<span>2</span><strong>Submit Your Entries</strong>
</a>
<div ng-if="!CD.isDesign">
<div ng-if="CD.showAppealsButtons">
<a class="btn btnAction" target="_blank" ng-href="//{{CD.reviewAppURL}}/actions/ViewProjectDetails?pid={{CD.challenge.challengeId}}">
<span>1</span>
<strong>View Scorecard</strong>
</a>
<a class="btn btnAction unregister" target="_blank" ng-href="//{{CD.reviewAppURL}}/actions/EarlyAppeals?pid={{CD.challenge.challengeId}}">
<span>2</span>
<strong>Complete Appeals</strong>
</a>
</div>
<div ng-if="!CD.showAppealsButtons">
<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:;">
<span>1</span>
<strong ng-hide="CD.isRegistered">
Register For This Challenge
</strong>
<strong ng-show="CD.isRegistered">
Unregister From This Challenge
</strong>
</a>
<a ng-class="{disabled:CD.challenge.submissionDisabled || !CD.callComplete, disabledNOT:!CD.challenge.submissionDisabled}" class="btn btnAction" target="_blank"
ng-href="/challenge-details/{{CD.challenge.challengeId}}/submit/?type=develop">
<span>2</span><strong>Submit Your Entries</strong>
</a>
</div>
</div>
<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:;">
<span>1</span>
<strong ng-hide="CD.isRegistered">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
}
vm.activeTab = 'details';
vm.domain = tcconfig.domain;
vm.reviewAppURL = tcconfig.reviewAppURL;

if (window.location.hash == '#viewRegistrant' || window.location.hash == '#/viewRegistrant') vm.activeTab = 'registrants';
else if (window.location.hash == '#winner' || window.location.hash == '#/winner') vm.activeTab = 'results';
Expand Down Expand Up @@ -357,15 +358,8 @@

vm.challenge.url = window.location.href;

vm.isRegistered = true;
if (regList.indexOf(handle) == -1) {
vm.isRegistered = false;
}

var hasSubmitted = false;
if (submitters.indexOf(handle) >= 0) {
hasSubmitted = true;
}
vm.isRegistered = regList.indexOf(handle) >= 0;
var hasSubmitted = submitters.indexOf(handle) >= 0;

// If the challenge is active and in the registration phase we allow either
// registration, or unregistration.
Expand All @@ -378,6 +372,8 @@
vm.challenge.registrationDisabled = false;
}
}
// check if in appeals phase and has submission
vm.showAppealsButtons = (hasSubmitted && (vm.challenge.currentPhaseName === 'Appeals'));

//check autoRegister (terms link register) and DelayAction cookie status
if (autoRegister) {
Expand Down