Skip to content

Commit 609d44c

Browse files
authored
Merge pull request #7093 from topcoder-platform/develop
[PROD RELEASE] - Bug fixes
2 parents c66f5a7 + 9f432e5 commit 609d44c

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

src/shared/components/challenge-detail/Registrants/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ export default class Registrants extends React.Component {
234234
break;
235235
}
236236
case 'Submitted Date': {
237-
const checkpointA = this.getFinal(a);
238-
const checkpointB = this.getFinal(b);
237+
const checkpointA = this.getFinal(a) || this.getSubmissionDate(a);
238+
const checkpointB = this.getFinal(b) || this.getSubmissionDate(b);
239239
if (checkpointA) {
240240
valueA = new Date(checkpointA);
241241
}

src/shared/components/challenge-detail/Specification/index.jsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,23 @@ export default function ChallengeDetailsView(props) {
4747
metadata,
4848
events,
4949
track,
50+
phases,
5051
} = challenge;
5152

53+
const getScoreCardByPhase = (phaseName) => {
54+
const phase = phases.find(item => item.name === phaseName);
55+
const scoreCardConstraint = phase && phase.constraints && phase.constraints.find(item => item.name === 'Scorecard');
56+
return scoreCardConstraint ? scoreCardConstraint.value : '';
57+
};
58+
5259
const roles = (userDetails || {}).roles || [];
5360
const {
54-
reviewScorecardId,
55-
screeningScorecardId,
5661
forumId,
5762
} = legacy;
5863

64+
const reviewScorecardId = getScoreCardByPhase('Review');
65+
const screeningScorecardId = getScoreCardByPhase('Screening');
66+
5967
let stockArtValue = '';
6068
const allowStockArt = _.find(metadata, { name: 'allowStockArt' });
6169
if (allowStockArt) {
@@ -421,6 +429,7 @@ ChallengeDetailsView.propTypes = {
421429
}),
422430
metadata: PT.array,
423431
events: PT.arrayOf(PT.string),
432+
phases: PT.arrayOf(PT.any),
424433
}),
425434
challengesUrl: PT.string.isRequired,
426435
communitiesList: PT.arrayOf(PT.shape({

0 commit comments

Comments
 (0)