Skip to content

Commit d2a32f9

Browse files
authored
Merge pull request #4873 from topcoder-platform/develop
Release 2020-09-08
2 parents 88f057e + 0318d13 commit d2a32f9

File tree

12 files changed

+25
-94
lines changed

12 files changed

+25
-94
lines changed

.circleci/config.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ workflows:
230230
filters:
231231
branches:
232232
only:
233-
- feature-contentful
233+
- develop
234234
# This is alternate dev env for parallel testing
235235
- "build-test":
236236
context : org-global
@@ -252,14 +252,16 @@ workflows:
252252
filters:
253253
branches:
254254
only:
255+
- integration-v5-challenge-api
255256
- hot-fix
256257
# This is stage env for production QA releases
257258
- "build-prod-staging":
258259
context : org-global
259260
filters:
260261
branches:
261262
only:
262-
- feature-contentful
263+
- milestone-v1.3
264+
- milestone-20200910
263265
- develop
264266
# Production builds are exectuted
265267
# when PR is merged to the master

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
"tc-accounts": "git+https://github.com/appirio-tech/accounts-app.git#dev",
138138
"tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.3",
139139
"tc-ui": "^1.0.12",
140-
"topcoder-react-lib": "1.0.3",
140+
"topcoder-react-lib": "1.0.4",
141141
"topcoder-react-ui-kit": "2.0.0",
142142
"topcoder-react-utils": "0.7.8",
143143
"turndown": "^4.0.2",

src/shared/components/ProfilePage/Stats/HistoryGraph/index.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export default class HistoryGraph extends React.Component {
211211
}
212212
if (track === 'DATA_SCIENCE') {
213213
if (subTrack === 'MARATHON_MATCH') {
214-
return `/challenges/${challengeId}`;
214+
return `${config.URL.COMMUNITY}/tc?module=MatchDetails&rd=${challengeId}`;
215215
}
216216
if (subTrack === 'SRM') {
217217
return `${config.URL.COMMUNITY}/stat?c=round_overview&rd=${challengeId}`;

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

+14-7
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import React from 'react';
1919
import PT from 'prop-types';
2020
import moment from 'moment';
2121
import { PrimaryButton } from 'topcoder-react-ui-kit';
22+
import { phaseEndDate } from 'utils/challenge-listing/helper';
2223
import SubmissionsTable from '../SubmissionsTable';
2324

2425
import style from './styles.scss';
@@ -47,9 +48,11 @@ export default function SubmissionManagement(props) {
4748
const currentPhase = challenge.phases
4849
.filter(p => p.name !== 'Registration' && p.isOpen)
4950
.sort((a, b) => moment(a.scheduledEndDate).diff(b.scheduledEndDate))[0];
51+
const submissionPhase = challenge.phases.filter(p => p.name === 'Submission')[0];
52+
const submissionEndDate = submissionPhase && phaseEndDate(submissionPhase);
5053

5154
const now = moment();
52-
const end = moment(currentPhase.scheduledEndDate);
55+
const end = moment(currentPhase && currentPhase.scheduledEndDate);
5356
const diff = end.isAfter(now) ? end.diff(now) : 0;
5457
const timeLeft = moment.duration(diff);
5558

@@ -78,11 +81,15 @@ export default function SubmissionManagement(props) {
7881
</a>
7982
</div>
8083
<div styleName="right-col">
81-
<p styleName="round">
82-
{currentPhase.name}
83-
</p>
8484
{
85-
challenge.status !== 'COMPLETED' ? (
85+
currentPhase && (
86+
<p styleName="round">
87+
{currentPhase.name}
88+
</p>
89+
)
90+
}
91+
{
92+
challenge.status !== 'Completed' ? (
8693
<div>
8794
<p styleName="time-left">
8895
{days > 0 && (`${days}D`)}
@@ -111,7 +118,7 @@ export default function SubmissionManagement(props) {
111118
Manage your submissions
112119
</p>
113120
{
114-
isDesign && (
121+
isDesign && currentPhase && (
115122
<p styleName="round-ends">
116123
<span styleName="ends-label">
117124
{currentPhase.name}
@@ -159,7 +166,7 @@ export default function SubmissionManagement(props) {
159166
)
160167
}
161168
</div>
162-
{now.isBefore(challenge.submissionEndDate) && (
169+
{now.isBefore(submissionEndDate) && (
163170
<div styleName="btn-wrap">
164171
<PrimaryButton
165172
theme={{

src/shared/components/SubmissionPage/Submit/index.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ class Submit extends React.Component {
150150
const topGearCommunity = _.find(communitiesList.data, { mainSubdomain: 'topgear' });
151151
if (topGearCommunity) {
152152
// check the group info match with group list
153-
_.forOwn(groups, (value, key) => {
154-
if (value && _.includes(topGearCommunity.groupIds, key)) {
153+
_.forOwn(groups, (value) => {
154+
if (value && _.includes(topGearCommunity.groupIds, value)) {
155155
isChallengeBelongToTopgearGroup = true;
156156
return false;
157157
}

src/shared/components/tc-communities/communities/cognitive/GetStarted/index.jsx

-3
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ import cardImg02 from
2020

2121
import MarchMadnessBanner from '../MarchMadnessBanner';
2222

23-
import NewsSignup from '../NewsSignup';
24-
2523
import style from './style.scss';
2624

2725
export default function GetStarted({ baseUrl }) {
@@ -88,7 +86,6 @@ export default function GetStarted({ baseUrl }) {
8886
/>
8987
</ImageText>
9088
</div>
91-
<NewsSignup />
9289
</main>
9390
);
9491
}

src/shared/components/tc-communities/communities/cognitive/Home/index.jsx

-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { config, Link } from 'topcoder-react-utils';
1616
import davePhotoUrl from 'assets/images/communities/cognitive/home/dave.jpg';
1717

1818
import IbmCloudBanner from '../IbmCloudBanner';
19-
import NewsletterSignup from '../NewsSignup';
2019

2120
import style from './style.scss';
2221

@@ -317,8 +316,6 @@ export default function Home({
317316
</div>
318317
</div>
319318
</div>
320-
321-
<NewsletterSignup />
322319
</main>
323320
);
324321
}

src/shared/components/tc-communities/communities/cognitive/IbmCloudPage/index.jsx

-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import React from 'react';
44
import Differences from './Differences';
55
import HeadBanner from './HeadBanner';
66
import JoinBlock from './JoinBlock';
7-
import NewsSignup from '../NewsSignup';
87

98
export default function IbmCloudPage() {
109
return (
@@ -16,8 +15,6 @@ export default function IbmCloudPage() {
1615
{/* Hidden by the request from Trevor: the transition process won't start
1716
* until Feb 12. */}
1817
{/* <AutoTransition /> */}
19-
20-
<NewsSignup />
2118
</div>
2219
);
2320
}

src/shared/components/tc-communities/communities/cognitive/NewsSignup/index.jsx

-21
This file was deleted.

src/shared/components/tc-communities/communities/cognitive/NewsSignup/theme.scss

-46
This file was deleted.

src/shared/components/tc-communities/communities/cognitive/Resources/index.jsx

-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import MsgsSvg from
2424
import { Button, PrimaryButton } from 'topcoder-react-ui-kit';
2525

2626
import FaqItem from './FaqItem';
27-
import NewsSignup from '../NewsSignup';
2827

2928
import style from './style.scss';
3029

@@ -324,7 +323,6 @@ export default function Resources({
324323
</div>
325324
</div>
326325
</div>
327-
<NewsSignup />
328326
</main>
329327
);
330328
}

src/shared/containers/challenge-detail/index.jsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ class ChallengeDetailPageContainer extends React.Component {
244244
}
245245

246246
const { track } = nextProps.challenge;
247-
if (track === COMPETITION_TRACKS.DESIGN && thriveArticles.length === 0) {
247+
if (track !== COMPETITION_TRACKS.DESIGN && thriveArticles.length === 0) {
248248
// filter all tags with value 'Other'
249249
const tags = _.filter(nextProps.challenge.tags, tag => tag !== 'Other');
250250
if (tags.length > 0) {
@@ -558,8 +558,8 @@ class ChallengeDetailPageContainer extends React.Component {
558558
hasRegistered={challenge.isRegistered}
559559
unregistering={unregistering}
560560
submissionEnded={submissionEnded}
561-
isMM
562-
isLegacyMM
561+
isMM={isMM}
562+
isLegacyMM={isLegacyMM}
563563
loadingMMSubmissionsForChallengeId={loadingMMSubmissionsForChallengeId}
564564
auth={auth}
565565
loadMMSubmissions={loadMMSubmissions}

0 commit comments

Comments
 (0)