diff --git a/src/server/tc-communities/tco19/metadata.json b/src/server/tc-communities/tco19/metadata.json
index 423235140a..d3e84c70ea 100644
--- a/src/server/tc-communities/tco19/metadata.json
+++ b/src/server/tc-communities/tco19/metadata.json
@@ -1,9 +1,6 @@
{
"challengeFilter": {
- "groupIds": ["20000078"],
- "or": [{
- "tags": ["TCO", "TCO19"]
- }]
+ "events": ["tco19"]
},
"communityId": "tco19",
"communityName": "TCO19",
diff --git a/src/shared/components/ReviewOpportunityDetailsPage/ChallengeSpecTab/index.jsx b/src/shared/components/ReviewOpportunityDetailsPage/ChallengeSpecTab/index.jsx
index 829d428032..37c0d832c5 100644
--- a/src/shared/components/ReviewOpportunityDetailsPage/ChallengeSpecTab/index.jsx
+++ b/src/shared/components/ReviewOpportunityDetailsPage/ChallengeSpecTab/index.jsx
@@ -29,24 +29,6 @@ const ChallengeSpecTab = ({ challenge }) => (
)
}
- {
- challenge.finalSubmissionGuidelines
- && (
-
-
- Final Submission Guidelines
-
-
-
- )
- }
);
diff --git a/src/shared/components/challenge-detail/MySubmissions/index.jsx b/src/shared/components/challenge-detail/MySubmissions/index.jsx
index 3cc0c6536e..8687914a85 100644
--- a/src/shared/components/challenge-detail/MySubmissions/index.jsx
+++ b/src/shared/components/challenge-detail/MySubmissions/index.jsx
@@ -41,7 +41,7 @@ class MySubmissionsView extends React.Component {
}
if (isMM) {
- loadMMSubmissions(challenge.id, challenge.registrants, auth.tokenV3);
+ loadMMSubmissions(challenge.id, auth.tokenV3);
}
}
diff --git a/src/shared/components/challenge-detail/Specification/index.jsx b/src/shared/components/challenge-detail/Specification/index.jsx
index b6d3566c53..bb2b7b7817 100644
--- a/src/shared/components/challenge-detail/Specification/index.jsx
+++ b/src/shared/components/challenge-detail/Specification/index.jsx
@@ -45,7 +45,6 @@ export default function ChallengeDetailsView(props) {
legacy,
legacyId,
documents,
- finalSubmissionGuidelines,
userDetails,
metadata,
events,
@@ -196,35 +195,6 @@ export default function ChallengeDetailsView(props) {
)
}
- {
- finalSubmissionGuidelines
- && (
-
-
- Final Submission Guidelines
-
- {
- editMode ? (
- n && n.setHtml(finalSubmissionGuidelines)}
- />
- ) : (
-
- )
- }
-
- )
- }
)
: (
@@ -408,7 +378,6 @@ ChallengeDetailsView.defaultProps = {
track: 'design',
reviewType: undefined,
numberOfCheckpointsPrizes: 0,
- finalSubmissionGuidelines: '',
environment: '',
descriptionFormat: 'HTML',
codeRepo: '',
@@ -438,7 +407,6 @@ ChallengeDetailsView.propTypes = {
groups: PT.any,
reviewType: PT.string,
numberOfCheckpointsPrizes: PT.number,
- finalSubmissionGuidelines: PT.string,
environment: PT.string,
codeRepo: PT.string,
userDetails: PT.shape({
diff --git a/src/shared/components/challenge-detail/Submissions/index.jsx b/src/shared/components/challenge-detail/Submissions/index.jsx
index b8e2e61c02..bf0beda012 100644
--- a/src/shared/components/challenge-detail/Submissions/index.jsx
+++ b/src/shared/components/challenge-detail/Submissions/index.jsx
@@ -54,7 +54,7 @@ class SubmissionsComponent extends React.Component {
}
if (isMM) {
- loadMMSubmissions(challenge.id, challenge.registrants, auth.tokenV3);
+ loadMMSubmissions(challenge.id, auth.tokenV3);
}
this.updateSortedSubmissions();
}
@@ -175,13 +175,16 @@ class SubmissionsComponent extends React.Component {
valueA = `${a.member || ''}`.toLowerCase();
valueB = `${b.member || ''}`.toLowerCase();
} else {
- valueA = _.get(a.registrant, 'memberHandle', '');
- valueB = _.get(b.registrant, 'memberHandle', '');
+ valueA = _.get(a.registrant, 'memberHandle', '').toLowerCase();
+ valueB = _.get(b.registrant, 'memberHandle', '').toLowerCase();
}
valueIsString = true;
break;
}
case 'Time':
+ valueA = new Date(a.submissions && a.submissions[0].submissionTime);
+ valueB = new Date(b.submissions && b.submissions[0].submissionTime);
+ break;
case 'Submission Date': {
valueA = new Date(a.created);
valueB = new Date(b.created);
@@ -247,7 +250,7 @@ class SubmissionsComponent extends React.Component {
let isReviewPhaseComplete = false;
_.forEach(allPhases, (phase) => {
- if (phase.name === 'Review' && !phase.isOpen) {
+ if (phase.name === 'Review' && !phase.isOpen && moment(phase.scheduledStartDate).isBefore()) {
isReviewPhaseComplete = true;
}
});
diff --git a/src/shared/containers/challenge-detail/index.jsx b/src/shared/containers/challenge-detail/index.jsx
index 334758cd55..3bb14e4c1b 100644
--- a/src/shared/containers/challenge-detail/index.jsx
+++ b/src/shared/containers/challenge-detail/index.jsx
@@ -728,18 +728,15 @@ function mapStateToProps(state, props) {
if (!_.isEmpty(mmSubmissions)) {
mmSubmissions = mmSubmissions.map((submission) => {
let registrant;
- let { member } = submission;
- if (auth.user.handle === submission.member) {
+ const { memberId } = submission;
+ let member = memberId;
+ if (`${auth.user.userId}` === `${memberId}`) {
mySubmissions = submission.submissions || [];
mySubmissions.forEach((mySubmission, index) => {
mySubmissions[index].id = mySubmissions.length - index;
});
}
- let submissionDetail = _.find(challenge.submissions, { createdBy: submission.createdBy });
- if (!submissionDetail) {
- // get submission detail from submissions challenge detail
- submissionDetail = _.find(challenge.submissions, s => (`${s.memberId}` === `${submission.memberId}`));
- }
+ const submissionDetail = _.find(challenge.submissions, s => (`${s.memberId}` === `${submission.memberId}`));
if (submissionDetail) {
member = submissionDetail.createdBy;
@@ -747,12 +744,11 @@ function mapStateToProps(state, props) {
}
if (!registrant) {
- registrant = _.find(challenge.registrants, { handle: submission.member });
+ registrant = _.find(challenge.registrants, r => `${r.memberId}` === `${memberId}`);
}
- if (!submissionDetail && registrant) {
- // sometime member is member id, do this to make sure it's alway member handle
- member = registrant.handle;
+ if (registrant) {
+ member = registrant.memberHandle;
}
return ({
@@ -926,10 +922,10 @@ const mapDispatchToProps = (dispatch) => {
dispatch(a.updateChallengeInit(uuid));
dispatch(a.updateChallengeDone(uuid, challenge, tokenV3));
},
- loadMMSubmissions: (challengeId, registrants, tokenV3) => {
+ loadMMSubmissions: (challengeId, tokenV3) => {
const a = actions.challenge;
dispatch(a.getMmSubmissionsInit(challengeId));
- dispatch(a.getMmSubmissionsDone(challengeId, registrants, tokenV3));
+ dispatch(a.getMmSubmissionsDone(challengeId, tokenV3));
},
loadSubmissionInformation: (challengeId, submissionId, tokenV3) => {
const a = actions.challenge;