Skip to content

Commit ca81f7d

Browse files
committed
Revert "RDM submission download support"
This reverts commit 1128d52.
1 parent 187ae03 commit ca81f7d

File tree

7 files changed

+8
-33
lines changed

7 files changed

+8
-33
lines changed

src/shared/components/challenge-detail/Submissions/SubmissionRow/SubmissionHistoryRow/index.jsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const { getService } = services.submissions;
2121

2222
export default function SubmissionHistoryRow({
2323
isMM,
24-
isRDM,
2524
submission,
2625
finalScore,
2726
provisionalScore,
@@ -82,7 +81,7 @@ export default function SubmissionHistoryRow({
8281
</div>
8382
</div>
8483
{
85-
isLoggedIn && (isMM || isRDM)
84+
isLoggedIn && isMM
8685
&& (numWinners > 0 || challengeStatus === CHALLENGE_STATUS.COMPLETED) && (
8786
<div styleName="col-2 col center">
8887
<div styleName="mobile-header">Action</div>
@@ -122,7 +121,6 @@ SubmissionHistoryRow.defaultProps = {
122121

123122
SubmissionHistoryRow.propTypes = {
124123
isMM: PT.bool.isRequired,
125-
isRDM: PT.bool.isRequired,
126124
submission: PT.number.isRequired,
127125
finalScore: PT.oneOfType([
128126
PT.number,

src/shared/components/challenge-detail/Submissions/SubmissionRow/index.jsx

+2-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import SubmissionHistoryRow from './SubmissionHistoryRow';
1919
import style from './style.scss';
2020

2121
export default function SubmissionRow({
22-
isMM, isRDM, openHistory, member, submissions, score, toggleHistory, challengeStatus,
22+
isMM, openHistory, member, submissions, score, toggleHistory, challengeStatus,
2323
isReviewPhaseComplete, finalRank, provisionalRank, onShowPopup, rating, viewAsTable,
2424
numWinners, auth, isLoggedIn,
2525
}) {
@@ -166,8 +166,7 @@ export default function SubmissionRow({
166166
Time
167167
</div>
168168
{
169-
(isMM || isRDM)
170-
&& (numWinners > 0 || challengeStatus === CHALLENGE_STATUS.COMPLETED) && (
169+
isMM && (numWinners > 0 || challengeStatus === CHALLENGE_STATUS.COMPLETED) && (
171170
<div styleName="col-2 col center">
172171
Action
173172
</div>
@@ -186,7 +185,6 @@ export default function SubmissionRow({
186185
<SubmissionHistoryRow
187186
isReviewPhaseComplete={isReviewPhaseComplete}
188187
isMM={isMM}
189-
isRDM={isRDM}
190188
challengeStatus={challengeStatus}
191189
submission={submissions.length - index}
192190
{...submissionHistory}
@@ -226,7 +224,6 @@ SubmissionRow.defaultProps = {
226224

227225
SubmissionRow.propTypes = {
228226
isMM: PT.bool.isRequired,
229-
isRDM: PT.bool.isRequired,
230227
openHistory: PT.bool.isRequired,
231228
member: PT.string.isRequired,
232229
challengeStatus: PT.string.isRequired,

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

+2-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import React from 'react';
77
import PT from 'prop-types';
88
import moment from 'moment';
9-
import { isMM as checkIsMM, isRDM as checkIsRDM } from 'utils/challenge';
9+
import { isMM as checkIsMM } from 'utils/challenge';
1010
import _ from 'lodash';
1111
import { connect } from 'react-redux';
1212
import { config } from 'topcoder-react-utils';
@@ -309,7 +309,6 @@ class SubmissionsComponent extends React.Component {
309309
} = challenge;
310310

311311
const isMM = this.isMM();
312-
const isRDM = checkIsRDM(challenge);
313312
const isLoggedIn = !_.isEmpty(auth.tokenV3);
314313
const isReviewPhaseComplete = this.checkIsReviewPhaseComplete();
315314

@@ -605,7 +604,7 @@ class SubmissionsComponent extends React.Component {
605604
}
606605
{
607606
((numWinners > 0 || challenge.status === CHALLENGE_STATUS.COMPLETED)
608-
&& (isMM || isRDM) && isLoggedIn) && (
607+
&& isMM && isLoggedIn) && (
609608
<div styleName="block-download-all">
610609
<button
611610
disabled={downloadingAll}
@@ -846,7 +845,6 @@ class SubmissionsComponent extends React.Component {
846845
submissions={sortedSubmissions}
847846
isReviewPhaseComplete={isReviewPhaseComplete}
848847
isMM={isMM}
849-
isRDM={isRDM}
850848
key={submission.member}
851849
{...submission}
852850
challengeStatus={challenge.status}

src/shared/components/challenge-detail/Winners/Winner/index.jsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ function getId(submissions, placement) {
1919
export default function Winner({
2020
isDesign,
2121
isMM,
22-
isRDM,
2322
prizes,
2423
submissions,
2524
viewable,
@@ -90,7 +89,7 @@ export default function Winner({
9089
</div>
9190
<div styleName="download-container">
9291
{
93-
((!winner.submissionDownloadLink || !viewable) && (isMM || isRDM) && isLoggedIn) && (
92+
((!winner.submissionDownloadLink || !viewable) && isMM && isLoggedIn) && (
9493
<button
9594
onClick={() => {
9695
// download submission
@@ -146,7 +145,6 @@ Winner.defaultProps = {
146145
Winner.propTypes = {
147146
isDesign: PT.bool.isRequired,
148147
isMM: PT.bool.isRequired,
149-
isRDM: PT.bool.isRequired,
150148
prizes: PT.arrayOf(PT.shape()),
151149
submissions: PT.arrayOf(PT.object).isRequired,
152150
viewable: PT.bool.isRequired,

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

+1-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export default function Winners({
2222
viewable,
2323
isDesign,
2424
isMM,
25-
isRDM,
2625
isLoggedIn,
2726
auth,
2827
challengeStatus,
@@ -32,7 +31,7 @@ export default function Winners({
3231
<div styleName="container">
3332
{
3433
((winners.length > 0 || challengeStatus === CHALLENGE_STATUS.COMPLETED)
35-
&& (isMM || isRDM) && isLoggedIn) && (
34+
&& isMM && isLoggedIn) && (
3635
<div styleName="block-download-all">
3736
<button
3837
disabled={downloadingAll}
@@ -81,7 +80,6 @@ export default function Winners({
8180
<Winner
8281
isDesign={isDesign}
8382
isMM={isMM}
84-
isRDM={isRDM}
8583
key={`${w.handle}-${w.placement}`}
8684
prizes={prizes}
8785
submissions={submissions}
@@ -103,7 +101,6 @@ Winners.defaultProps = {
103101
viewable: false,
104102
isDesign: false,
105103
isMM: false,
106-
isRDM: false,
107104
isLoggedIn: false,
108105
challengeStatus: '',
109106
};
@@ -115,7 +112,6 @@ Winners.propTypes = {
115112
viewable: PT.bool,
116113
isDesign: PT.bool,
117114
isMM: PT.bool,
118-
isRDM: PT.bool,
119115
isLoggedIn: PT.bool,
120116
challengeStatus: PT.string,
121117
auth: PT.shape().isRequired,

src/shared/containers/challenge-detail/index.jsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import _ from 'lodash';
1010
import communityActions from 'actions/tc-communities';
11-
import { isMM as checkIsMM, isRDM as checkIsRDM } from 'utils/challenge';
11+
import { isMM as checkIsMM } from 'utils/challenge';
1212
import LoadingPagePlaceholder from 'components/LoadingPagePlaceholder';
1313
import pageActions from 'actions/page';
1414
import ChallengeHeader from 'components/challenge-detail/Header';
@@ -439,7 +439,6 @@ class ChallengeDetailPageContainer extends React.Component {
439439

440440
const isEmpty = _.isEmpty(challenge);
441441
const isMM = checkIsMM(challenge);
442-
const isRDM = checkIsRDM(challenge);
443442
const isLegacyMM = isMM && Boolean(challenge.roundId);
444443

445444
if (isLoadingChallenge || isLoadingTerms) {
@@ -662,7 +661,6 @@ class ChallengeDetailPageContainer extends React.Component {
662661
submissions={challenge.submissions}
663662
isDesign={track.toLowerCase() === 'design'}
664663
isMM={isMM}
665-
isRDM={isRDM}
666664
isLoggedIn={isLoggedIn}
667665
auth={auth}
668666
/>

src/shared/utils/challenge.js

-10
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,6 @@ export function isMM(challenge) {
1313
return tags.includes('Marathon Match') || isMMType;
1414
}
1515

16-
/**
17-
* check if is rapid development match challenge
18-
* @param {Object} challenge challenge object
19-
*/
20-
export function isRDM(challenge) {
21-
const tags = _.get(challenge, 'tags') || [];
22-
const isMMType = challenge ? challenge.type === 'Rapid Development Match' : false;
23-
return tags.includes('Rapid Development Match') || isMMType;
24-
}
25-
2616
/**
2717
* Set challenge type to challenge
2818
* @param {Object} challenges challenge object

0 commit comments

Comments
 (0)