Skip to content

Commit e6e978e

Browse files
Merge pull request #5013 from topcoder-platform/issue-4948
SubmissionManagement - Hide DELETE button from Design track
2 parents e177705 + b17b05e commit e6e978e

File tree

2 files changed

+8
-3
lines changed
  • src/shared

2 files changed

+8
-3
lines changed

src/shared/components/SubmissionManagement/Submission/index.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import _ from 'lodash';
1515
import moment from 'moment';
1616
import React from 'react';
1717
import { config } from 'topcoder-react-utils';
18-
import { COMPETITION_TRACKS } from 'utils/tc';
18+
import { COMPETITION_TRACKS, CHALLENGE_STATUS } from 'utils/tc';
1919

2020
import PT from 'prop-types';
2121

@@ -85,7 +85,8 @@ export default function Submission(props) {
8585
onClick={() => onDownload(submissionObject.id)}
8686
><DownloadIcon /></button>
8787
*/ }
88-
{status !== 'COMPLETED'
88+
{status !== CHALLENGE_STATUS.COMPLETED
89+
&& track !== COMPETITION_TRACKS.DESIGN
8990
&& (
9091
<button
9192
styleName="delete-icon"

src/shared/utils/tc.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ import { config, isomorphy } from 'topcoder-react-utils';
1010

1111
import { tc } from 'topcoder-react-lib';
1212

13-
export const { COMPETITION_TRACKS, REVIEW_OPPORTUNITY_TYPES } = tc;
13+
export const {
14+
COMPETITION_TRACKS,
15+
CHALLENGE_STATUS,
16+
REVIEW_OPPORTUNITY_TYPES,
17+
} = tc;
1418

1519
/**
1620
* Possible phase types (at the moment, this map does not cover all

0 commit comments

Comments
 (0)