From 3fecfcf1284bf6876a3182cf2446212365c2937b Mon Sep 17 00:00:00 2001 From: Cagdas U Date: Thu, 3 Sep 2020 15:49:21 +0300 Subject: [PATCH 1/9] fix(submission-management): missing `Add Submission` button --- .../SubmissionManagement/SubmissionManagement/index.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/shared/components/SubmissionManagement/SubmissionManagement/index.jsx b/src/shared/components/SubmissionManagement/SubmissionManagement/index.jsx index 898ec91183..2cb1a25330 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,6 +48,8 @@ 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); @@ -159,7 +162,7 @@ export default function SubmissionManagement(props) { ) } - {now.isBefore(challenge.submissionEndDate) && ( + {now.isBefore(submissionEndDate) && (
Date: Thu, 3 Sep 2020 17:51:39 +0300 Subject: [PATCH 2/9] fix(challenge-detail): condition for showing thrive articles Fix a typo in if condition used to show thrive articles. - It was showing them only for the Design track. - Articles will be shown for all tracks except for the Design track. References topcoder-platform/community-app#4765 --- src/shared/containers/challenge-detail/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/containers/challenge-detail/index.jsx b/src/shared/containers/challenge-detail/index.jsx index 3bb14e4c1b..bb3c1e9dbb 100644 --- a/src/shared/containers/challenge-detail/index.jsx +++ b/src/shared/containers/challenge-detail/index.jsx @@ -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) { From 0e221c8d4296edd34ffb62d68c64302249564a18 Mon Sep 17 00:00:00 2001 From: narekcat Date: Thu, 3 Sep 2020 20:58:43 +0400 Subject: [PATCH 3/9] fix: for issue #4756 --- src/shared/containers/challenge-detail/index.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/containers/challenge-detail/index.jsx b/src/shared/containers/challenge-detail/index.jsx index 3bb14e4c1b..ca38b67a9b 100644 --- a/src/shared/containers/challenge-detail/index.jsx +++ b/src/shared/containers/challenge-detail/index.jsx @@ -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} From 5503702230d8ea780d2775052e95768685a24daa Mon Sep 17 00:00:00 2001 From: Cagdas U Date: Thu, 3 Sep 2020 20:17:39 +0300 Subject: [PATCH 4/9] fix(submission-management): add null checking for `currentPhase` --- .../SubmissionManagement/index.jsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/shared/components/SubmissionManagement/SubmissionManagement/index.jsx b/src/shared/components/SubmissionManagement/SubmissionManagement/index.jsx index 898ec91183..1282c6de66 100644 --- a/src/shared/components/SubmissionManagement/SubmissionManagement/index.jsx +++ b/src/shared/components/SubmissionManagement/SubmissionManagement/index.jsx @@ -49,7 +49,7 @@ export default function SubmissionManagement(props) { .sort((a, b) => moment(a.scheduledEndDate).diff(b.scheduledEndDate))[0]; 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,9 +78,13 @@ export default function SubmissionManagement(props) {
-

- {currentPhase.name} -

+ { + currentPhase && ( +

+ {currentPhase.name} +

+ ) + } { challenge.status !== 'COMPLETED' ? (
@@ -111,7 +115,7 @@ export default function SubmissionManagement(props) { Manage your submissions

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

{currentPhase.name} From 7a3c5130f530942d14c5a3c85b1ef6388057d612 Mon Sep 17 00:00:00 2001 From: Cagdas U Date: Fri, 4 Sep 2020 06:14:37 +0300 Subject: [PATCH 5/9] fix(submission-management): `challenge.status` at conditional check Fix `challenge.status` at conditional check. The status property of a completed challenge was `COMPLETED` before, it's `Completed` anymore. --- .../SubmissionManagement/SubmissionManagement/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/SubmissionManagement/SubmissionManagement/index.jsx b/src/shared/components/SubmissionManagement/SubmissionManagement/index.jsx index 1282c6de66..0e0edb7a26 100644 --- a/src/shared/components/SubmissionManagement/SubmissionManagement/index.jsx +++ b/src/shared/components/SubmissionManagement/SubmissionManagement/index.jsx @@ -86,7 +86,7 @@ export default function SubmissionManagement(props) { ) } { - challenge.status !== 'COMPLETED' ? ( + challenge.status !== 'Completed' ? (

{days > 0 && (`${days}D`)} From 83352cf5320eb0e1c1845b0879778717b5a3d366 Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Fri, 4 Sep 2020 01:04:15 -0300 Subject: [PATCH 6/9] fix: for #4752 Issue: #4752 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d284ae8360..d5717d74d6 100644 --- a/package.json +++ b/package.json @@ -137,7 +137,7 @@ "tc-accounts": "git+https://github.com/appirio-tech/accounts-app.git#dev", "tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.3", "tc-ui": "^1.0.12", - "topcoder-react-lib": "1.0.3", + "topcoder-react-lib": "1000.22.2", "topcoder-react-ui-kit": "2.0.0", "topcoder-react-utils": "0.7.8", "turndown": "^4.0.2", From 7ac1ae334e3a4c1a446aad42b34c4ad2c0fc8766 Mon Sep 17 00:00:00 2001 From: Luiz Ricardo Rodrigues Date: Fri, 4 Sep 2020 01:09:55 -0300 Subject: [PATCH 7/9] Deploy milestone-v1.3 to Dev and Staging Issues: #4752 #4765 #4755 #4758 --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d9e4f88a90..ee2920c93c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -230,7 +230,7 @@ workflows: filters: branches: only: - - feature-contentful + - milestone-v1.3 # This is alternate dev env for parallel testing - "build-test": context : org-global @@ -259,7 +259,7 @@ workflows: filters: branches: only: - - feature-contentful + - milestone-v1.3 - develop # Production builds are exectuted # when PR is merged to the master From bf0c810d1d9591a7c6c825465268b458d43be0dc Mon Sep 17 00:00:00 2001 From: Sushil Shinde Date: Mon, 7 Sep 2020 10:54:09 +0530 Subject: [PATCH 8/9] fix: for topgear submission page --- src/server/tc-communities/wipro/metadata.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/tc-communities/wipro/metadata.json b/src/server/tc-communities/wipro/metadata.json index fed156fca6..d0c89c5dce 100644 --- a/src/server/tc-communities/wipro/metadata.json +++ b/src/server/tc-communities/wipro/metadata.json @@ -3,7 +3,7 @@ "20000000", "20000005", "20000011", "20000016" ], "challengeFilter": { - "groupIds": ["20000000"] + "groupIds": ["b7f7c0f8-8ee8-409e-9e5c-33404983b635"] }, "challengeListing": { "ignoreCommunityFilterByDefault": true, @@ -11,7 +11,7 @@ }, "communityId": "wipro", "communityName": "TopGear Community", - "groupIds": ["20000000"], + "groupIds": ["b7f7c0f8-8ee8-409e-9e5c-33404983b635"], "leaderboardApiUrl": "https://api.topcoder.com/v4/looks/458/run/json/", "logos": [{ "img": "/community-app-assets/themes/wipro/wipro-logo.png", From 539853df098fa40175c68a7f0fd8d54a349e1dee Mon Sep 17 00:00:00 2001 From: "Luiz R. Rodrigues" Date: Mon, 7 Sep 2020 10:30:45 -0300 Subject: [PATCH 9/9] Revert "fix: for topgear submission page" This reverts commit bf0c810d1d9591a7c6c825465268b458d43be0dc. --- src/server/tc-communities/wipro/metadata.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/tc-communities/wipro/metadata.json b/src/server/tc-communities/wipro/metadata.json index d0c89c5dce..fed156fca6 100644 --- a/src/server/tc-communities/wipro/metadata.json +++ b/src/server/tc-communities/wipro/metadata.json @@ -3,7 +3,7 @@ "20000000", "20000005", "20000011", "20000016" ], "challengeFilter": { - "groupIds": ["b7f7c0f8-8ee8-409e-9e5c-33404983b635"] + "groupIds": ["20000000"] }, "challengeListing": { "ignoreCommunityFilterByDefault": true, @@ -11,7 +11,7 @@ }, "communityId": "wipro", "communityName": "TopGear Community", - "groupIds": ["b7f7c0f8-8ee8-409e-9e5c-33404983b635"], + "groupIds": ["20000000"], "leaderboardApiUrl": "https://api.topcoder.com/v4/looks/458/run/json/", "logos": [{ "img": "/community-app-assets/themes/wipro/wipro-logo.png",