diff --git a/.circleci/config.yml b/.circleci/config.yml index bafe63ed26..00fe48889e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -231,7 +231,6 @@ workflows: branches: only: - develop - - oanh-kiril-tasks # This is alternate dev env for parallel testing - "build-test": context : org-global @@ -261,6 +260,7 @@ workflows: filters: branches: only: + - milestone-v1.3 - milestone-20200910 - develop # Production builds are exectuted diff --git a/src/shared/components/SubmissionManagement/SubmissionManagement/index.jsx b/src/shared/components/SubmissionManagement/SubmissionManagement/index.jsx index 898ec91183..0692d888ff 100644 --- a/src/shared/components/SubmissionManagement/SubmissionManagement/index.jsx +++ b/src/shared/components/SubmissionManagement/SubmissionManagement/index.jsx @@ -19,6 +19,7 @@ import React from 'react'; import PT from 'prop-types'; import moment from 'moment'; import { PrimaryButton } from 'topcoder-react-ui-kit'; +import { phaseEndDate } from 'utils/challenge-listing/helper'; import SubmissionsTable from '../SubmissionsTable'; import style from './styles.scss'; @@ -47,9 +48,11 @@ export default function SubmissionManagement(props) { const currentPhase = challenge.phases .filter(p => p.name !== 'Registration' && p.isOpen) .sort((a, b) => moment(a.scheduledEndDate).diff(b.scheduledEndDate))[0]; + const submissionPhase = challenge.phases.filter(p => p.name === 'Submission')[0]; + const submissionEndDate = submissionPhase && phaseEndDate(submissionPhase); const now = moment(); - const end = moment(currentPhase.scheduledEndDate); + const end = moment(currentPhase && currentPhase.scheduledEndDate); const diff = end.isAfter(now) ? end.diff(now) : 0; const timeLeft = moment.duration(diff); @@ -78,11 +81,15 @@ export default function SubmissionManagement(props) {
-

- {currentPhase.name} -

{ - challenge.status !== 'COMPLETED' ? ( + currentPhase && ( +

+ {currentPhase.name} +

+ ) + } + { + challenge.status !== 'Completed' ? (

{days > 0 && (`${days}D`)} @@ -111,7 +118,7 @@ export default function SubmissionManagement(props) { Manage your submissions

{ - isDesign && ( + isDesign && currentPhase && (

{currentPhase.name} @@ -159,7 +166,7 @@ export default function SubmissionManagement(props) { ) }

- {now.isBefore(challenge.submissionEndDate) && ( + {now.isBefore(submissionEndDate) && (
tag !== 'Other'); if (tags.length > 0) { @@ -558,8 +558,8 @@ class ChallengeDetailPageContainer extends React.Component { hasRegistered={challenge.isRegistered} unregistering={unregistering} submissionEnded={submissionEnded} - isMM - isLegacyMM + isMM={isMM} + isLegacyMM={isLegacyMM} loadingMMSubmissionsForChallengeId={loadingMMSubmissionsForChallengeId} auth={auth} loadMMSubmissions={loadMMSubmissions}