Skip to content

Milestone-v1.3 #4871

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Sep 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ workflows:
branches:
only:
- develop
- oanh-kiril-tasks
# This is alternate dev env for parallel testing
- "build-test":
context : org-global
Expand Down Expand Up @@ -261,6 +260,7 @@ workflows:
filters:
branches:
only:
- milestone-v1.3
- milestone-20200910
- develop
# Production builds are exectuted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -78,11 +81,15 @@ export default function SubmissionManagement(props) {
</a>
</div>
<div styleName="right-col">
<p styleName="round">
{currentPhase.name}
</p>
{
challenge.status !== 'COMPLETED' ? (
currentPhase && (
<p styleName="round">
{currentPhase.name}
</p>
)
}
{
challenge.status !== 'Completed' ? (
<div>
<p styleName="time-left">
{days > 0 && (`${days}D`)}
Expand Down Expand Up @@ -111,7 +118,7 @@ export default function SubmissionManagement(props) {
Manage your submissions
</p>
{
isDesign && (
isDesign && currentPhase && (
<p styleName="round-ends">
<span styleName="ends-label">
{currentPhase.name}
Expand Down Expand Up @@ -159,7 +166,7 @@ export default function SubmissionManagement(props) {
)
}
</div>
{now.isBefore(challenge.submissionEndDate) && (
{now.isBefore(submissionEndDate) && (
<div styleName="btn-wrap">
<PrimaryButton
theme={{
Expand Down
6 changes: 3 additions & 3 deletions src/shared/containers/challenge-detail/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ class ChallengeDetailPageContainer extends React.Component {
}

const { track } = nextProps.challenge;
if (track === COMPETITION_TRACKS.DESIGN && thriveArticles.length === 0) {
if (track !== COMPETITION_TRACKS.DESIGN && thriveArticles.length === 0) {
// filter all tags with value 'Other'
const tags = _.filter(nextProps.challenge.tags, tag => tag !== 'Other');
if (tags.length > 0) {
Expand Down Expand Up @@ -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}
Expand Down