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

Commit 0292b65

Browse files
authored
Merge pull request #456 from appirio-tech/tom-unreg-logic
Tom unreg logic
2 parents 8a50ade + 6db8c56 commit 0292b65

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,10 @@
344344
// If the challenge is active and in the registration phase we allow either
345345
// registration, or unregistration.
346346
if (((moment(challenge.phases[0].scheduledStartTime)) < moment() && (moment(challenge.registrationEndDate)) > moment()) && challenge.currentStatus == 'Active') {
347-
if (vm.isRegistered && !hasSubmitted) {
348-
vm.challenge.allowToUnregister = true;
347+
if (vm.isRegistered) {
348+
if (!hasSubmitted) {
349+
vm.challenge.allowToUnregister = true;
350+
}
349351
} else {
350352
vm.challenge.registrationDisabled = false;
351353
}

0 commit comments

Comments
 (0)