Skip to content

Commit 0df6294

Browse files
author
vikasrohit
authored
Merge pull request #1155 from topcoder-platform/develop
Prod minor release - 0.8.0
2 parents 6012e9e + 32f3d47 commit 0df6294

File tree

7 files changed

+35
-26
lines changed

7 files changed

+35
-26
lines changed

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Use the base image with Node.js
2-
FROM node:latest
2+
FROM node:10
33
ARG NODE_ENV
44
ARG BABEL_ENV
55

src/components/ChallengeEditor/ChallengeView/index.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,17 @@ const ChallengeView = ({
8686
return (
8787
<div className={styles.wrapper}>
8888
<Helmet title='View Details' />
89-
<div className={cn(styles.actionButtons, styles.button, styles.actionButtonsLeft)}>
90-
<LegacyLinks challenge={challenge} />
91-
</div>
89+
{!isTask && (
90+
<div className={cn(styles.actionButtons, styles.button, styles.actionButtonsLeft)}>
91+
<LegacyLinks challenge={challenge} />
92+
</div>
93+
)}
9294
<div className={styles.title}>View Details</div>
9395
<div className={cn(styles.actionButtons, styles.button, styles.actionButtonsRight)}>
9496
{
9597
challenge.status === 'Draft' && (
9698
<div className={styles.button}>
97-
{challenge.legacyId ? (
99+
{(challenge.legacyId || isTask) ? (
98100
<PrimaryButton text={'Launch'} type={'info'} onClick={onLaunchChallenge} />
99101
) : (
100102
<Tooltip content={MESSAGE.NO_LEGACY_CHALLENGE}>

src/components/ChallengeEditor/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,9 @@ class ChallengeEditor extends Component {
877877
groups: []
878878
// prizeSets: this.getDefaultPrizeSets()
879879
}
880+
if (isTask) {
881+
newChallenge.legacy.pureV5Task = true
882+
}
880883
if (projectDetail.terms) {
881884
const currTerms = new Set(newChallenge.terms.map(term => term.id))
882885
newChallenge.terms.push(
@@ -1037,6 +1040,7 @@ class ChallengeEditor extends Component {
10371040
newChallenge.status = status
10381041
try {
10391042
const challengeId = this.getCurrentChallengeId()
1043+
const action = await updateChallengeDetails(challengeId, challenge)
10401044
// state can have updated assigned member (in cases where user changes assignments without refreshing the page)
10411045
const { challenge: { copilot, reviewer, type }, assignedMemberDetails: assignedMember } = this.state
10421046
const oldMemberHandle = _.get(oldAssignedMember, 'handle')
@@ -1045,7 +1049,6 @@ class ChallengeEditor extends Component {
10451049
if (assignedMemberHandle !== oldMemberHandle) {
10461050
await this.updateResource(challengeId, 'Submitter', assignedMemberHandle, oldMemberHandle)
10471051
}
1048-
const action = await updateChallengeDetails(challengeId, challenge)
10491052
const { copilot: previousCopilot, reviewer: previousReviewer } = this.state.draftChallenge.data
10501053
if (copilot !== previousCopilot) await this.updateResource(challengeId, 'Copilot', copilot, previousCopilot)
10511054
if (type === 'First2Finish' || type === 'Task') {
@@ -1371,7 +1374,7 @@ class ChallengeEditor extends Component {
13711374
</div>
13721375
{isDraft && (
13731376
<div className={styles.button}>
1374-
{challenge.legacyId ? (
1377+
{challenge.legacyId || isTask ? (
13751378
<PrimaryButton text={'Launch as Active'} type={'info'} onClick={this.toggleLaunch} />
13761379
) : (
13771380
<Tooltip content={MESSAGE.NO_LEGACY_CHALLENGE}>

src/components/ChallengesComponent/ChallengeCard/ChallengeCard.module.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@
264264
display: flex;
265265
justify-content: center;
266266
align-items: center;
267-
background-color: $tc-red;
268267
border-color: $tc-red;
269268
cursor: pointer;
270269

@@ -274,7 +273,7 @@
274273
font-size: 14px;
275274
font-weight: 400;
276275
line-height: 17px;
277-
color: $white;
276+
color: $tc-red;
278277
text-transform: capitalize;
279278
display: flex;
280279
justify-content: center;

src/components/ChallengesComponent/ChallengeCard/index.js

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ const hoverComponents = (challenge, onUpdateLaunch, deleteModalLaunch) => {
104104
const communityAppUrl = `${COMMUNITY_APP_URL}/challenges/${challenge.id}`
105105
const directUrl = `${DIRECT_PROJECT_URL}/contest/detail?projectId=${challenge.legacyId}`
106106
const orUrl = `${ONLINE_REVIEW_URL}/review/actions/ViewProjectDetails?pid=${challenge.legacyId}`
107+
const isTask = _.get(challenge, 'task.isTask', false)
107108

108109
// NEW projects never have Legacy challenge created, so don't show links and "Activate" button for them at all
109110
if (challenge.status.toUpperCase() === CHALLENGE_STATUS.NEW) {
@@ -114,15 +115,17 @@ const hoverComponents = (challenge, onUpdateLaunch, deleteModalLaunch) => {
114115
)
115116
}
116117

117-
return challenge.legacyId ? (
118+
return challenge.legacyId || isTask ? (
118119
<div className={styles.linkGroup}>
119120
<div className={styles.linkGroupLeft}>
120121
<a className={styles.link} href={communityAppUrl} target='_blank'>View Challenge</a>
121-
<div className={styles.linkGroupLeftBottom}>
122-
<a className={styles.link} href={directUrl} target='_blank'>Direct</a>
123-
<span className={styles.linkDivider}>|</span>
124-
<a className={styles.link} href={orUrl} target='_blank'>OR</a>
125-
</div>
122+
{!isTask && (
123+
<div className={styles.linkGroupLeftBottom}>
124+
<a className={styles.link} href={directUrl} target='_blank'>Direct</a>
125+
<span className={styles.linkDivider}>|</span>
126+
<a className={styles.link} href={orUrl} target='_blank'>OR</a>
127+
</div>
128+
)}
126129
</div>
127130
{challenge.status.toUpperCase() === CHALLENGE_STATUS.DRAFT && (
128131
<button className={styles.activateButton} onClick={() => onUpdateLaunch()}>
@@ -134,15 +137,17 @@ const hoverComponents = (challenge, onUpdateLaunch, deleteModalLaunch) => {
134137
<div className={styles.linkGroup}>
135138
<div className={styles.linkGroupLeft}>
136139
<a className={styles.link} href={communityAppUrl}>View Challenge</a>
137-
<div className={styles.linkGroupLeftBottom}>
138-
<Tooltip content={MESSAGE.NO_LEGACY_CHALLENGE}>
139-
<span className={styles.link}>Direct</span>
140-
</Tooltip>
141-
<span className={styles.linkDivider}>|</span>
142-
<Tooltip content={MESSAGE.NO_LEGACY_CHALLENGE}>
143-
<span className={styles.link}>OR</span>
144-
</Tooltip>
145-
</div>
140+
{!isTask && (
141+
<div className={styles.linkGroupLeftBottom}>
142+
<Tooltip content={MESSAGE.NO_LEGACY_CHALLENGE}>
143+
<span className={styles.link}>Direct</span>
144+
</Tooltip>
145+
<span className={styles.linkDivider}>|</span>
146+
<Tooltip content={MESSAGE.NO_LEGACY_CHALLENGE}>
147+
<span className={styles.link}>OR</span>
148+
</Tooltip>
149+
</div>
150+
)}
146151
</div>
147152
{
148153
challenge.status === 'Draft' && (

src/components/ChallengesComponent/ChallengeStatus/ChallengeStatus.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.container {
44
height: 22px;
55
width: 86px;
6-
border-radius: 11.5px;
6+
border-radius: 3px;
77
display: flex;
88
justify-content: center;
99
align-items: center;

src/components/ChallengesComponent/ChallengeTag/ChallengeTag.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.tag {
44
display: inline-block;
55
padding: 0 15px;
6-
border-radius: 10px;
6+
border-radius: 3px;
77
background-color: $lighter-gray;
88
min-width: 54px;
99
text-align: center;

0 commit comments

Comments
 (0)