From 46a987235c7e809873235a2febf2d65158d0ce4c Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Sun, 7 Aug 2022 08:42:34 -0700 Subject: [PATCH 01/11] Bring back the delete button https://github.com/topcoder-platform/community-app/issues/6602 --- .../SubmissionManagement/Submission/index.jsx | 43 +++++++++---------- .../containers/SubmissionManagement/index.jsx | 5 +++ .../SubmissionManagement/styles.scss | 4 ++ 3 files changed, 30 insertions(+), 22 deletions(-) diff --git a/src/shared/components/SubmissionManagement/Submission/index.jsx b/src/shared/components/SubmissionManagement/Submission/index.jsx index 7204c28711..a4065412f7 100644 --- a/src/shared/components/SubmissionManagement/Submission/index.jsx +++ b/src/shared/components/SubmissionManagement/Submission/index.jsx @@ -14,12 +14,11 @@ import _ from 'lodash'; import moment from 'moment'; import React from 'react'; -// CHALLENGE_STATUS -import { COMPETITION_TRACKS, safeForDownload } from 'utils/tc'; +import { COMPETITION_TRACKS, CHALLENGE_STATUS, safeForDownload } from 'utils/tc'; import PT from 'prop-types'; -// import DeleteIcon from '../Icons/IconTrashSimple.svg'; +import DeleteIcon from '../Icons/IconTrashSimple.svg'; import DownloadIcon from '../Icons/IconSquareDownload.svg'; import ExpandIcon from '../Icons/IconMinimalDown.svg'; import ScreeningStatus from '../ScreeningStatus'; @@ -32,10 +31,10 @@ export default function Submission(props) { showScreeningDetails, track, onDownload, - // onDelete, + onDelete, onShowDetails, - // status, - // allowDelete, + status, + allowDelete, } = props; const formatDate = date => moment(+new Date(date)).format('MMM DD, YYYY hh:mm A'); const onDownloadSubmission = onDownload.bind(1, submissionObject.id); @@ -89,19 +88,19 @@ export default function Submission(props) { onClick={() => onDownload(submissionObject.id)} > */ } - {/* {status !== CHALLENGE_STATUS.COMPLETED */} - {/* && track !== COMPETITION_TRACKS.DES */} - {/* && ( */} - {/* */} - {/* ) */} - {/* } */} + {status !== CHALLENGE_STATUS.COMPLETED + && track === COMPETITION_TRACKS.DES + && ( + + ) + } - ) - } + ) + }