diff --git a/docker/Dockerfile b/docker/Dockerfile index c99ad38b..15b46509 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,5 +1,5 @@ # Use the base image with Node.js -FROM node:latest +FROM node:10 ARG NODE_ENV ARG BABEL_ENV diff --git a/src/components/ChallengeEditor/ChallengeView/index.js b/src/components/ChallengeEditor/ChallengeView/index.js index 37c26c79..1d25750b 100644 --- a/src/components/ChallengeEditor/ChallengeView/index.js +++ b/src/components/ChallengeEditor/ChallengeView/index.js @@ -86,15 +86,17 @@ const ChallengeView = ({ return (
-
- -
+ {!isTask && ( +
+ +
+ )}
View Details
{ challenge.status === 'Draft' && (
- {challenge.legacyId ? ( + {(challenge.legacyId || isTask) ? ( ) : ( diff --git a/src/components/ChallengeEditor/index.js b/src/components/ChallengeEditor/index.js index 25ed660c..5ea47246 100644 --- a/src/components/ChallengeEditor/index.js +++ b/src/components/ChallengeEditor/index.js @@ -877,6 +877,9 @@ class ChallengeEditor extends Component { groups: [] // prizeSets: this.getDefaultPrizeSets() } + if (isTask) { + newChallenge.legacy.pureV5Task = true + } if (projectDetail.terms) { const currTerms = new Set(newChallenge.terms.map(term => term.id)) newChallenge.terms.push( @@ -1037,6 +1040,7 @@ class ChallengeEditor extends Component { newChallenge.status = status try { const challengeId = this.getCurrentChallengeId() + const action = await updateChallengeDetails(challengeId, challenge) // state can have updated assigned member (in cases where user changes assignments without refreshing the page) const { challenge: { copilot, reviewer, type }, assignedMemberDetails: assignedMember } = this.state const oldMemberHandle = _.get(oldAssignedMember, 'handle') @@ -1045,7 +1049,6 @@ class ChallengeEditor extends Component { if (assignedMemberHandle !== oldMemberHandle) { await this.updateResource(challengeId, 'Submitter', assignedMemberHandle, oldMemberHandle) } - const action = await updateChallengeDetails(challengeId, challenge) const { copilot: previousCopilot, reviewer: previousReviewer } = this.state.draftChallenge.data if (copilot !== previousCopilot) await this.updateResource(challengeId, 'Copilot', copilot, previousCopilot) if (type === 'First2Finish' || type === 'Task') { @@ -1371,7 +1374,7 @@ class ChallengeEditor extends Component {
{isDraft && (
- {challenge.legacyId ? ( + {challenge.legacyId || isTask ? ( ) : ( diff --git a/src/components/ChallengesComponent/ChallengeCard/ChallengeCard.module.scss b/src/components/ChallengesComponent/ChallengeCard/ChallengeCard.module.scss index 89614ec3..91f3213d 100644 --- a/src/components/ChallengesComponent/ChallengeCard/ChallengeCard.module.scss +++ b/src/components/ChallengesComponent/ChallengeCard/ChallengeCard.module.scss @@ -264,7 +264,6 @@ display: flex; justify-content: center; align-items: center; - background-color: $tc-red; border-color: $tc-red; cursor: pointer; @@ -274,7 +273,7 @@ font-size: 14px; font-weight: 400; line-height: 17px; - color: $white; + color: $tc-red; text-transform: capitalize; display: flex; justify-content: center; diff --git a/src/components/ChallengesComponent/ChallengeCard/index.js b/src/components/ChallengesComponent/ChallengeCard/index.js index 0ed1fe4c..5a1258ae 100644 --- a/src/components/ChallengesComponent/ChallengeCard/index.js +++ b/src/components/ChallengesComponent/ChallengeCard/index.js @@ -104,6 +104,7 @@ const hoverComponents = (challenge, onUpdateLaunch, deleteModalLaunch) => { const communityAppUrl = `${COMMUNITY_APP_URL}/challenges/${challenge.id}` const directUrl = `${DIRECT_PROJECT_URL}/contest/detail?projectId=${challenge.legacyId}` const orUrl = `${ONLINE_REVIEW_URL}/review/actions/ViewProjectDetails?pid=${challenge.legacyId}` + const isTask = _.get(challenge, 'task.isTask', false) // NEW projects never have Legacy challenge created, so don't show links and "Activate" button for them at all if (challenge.status.toUpperCase() === CHALLENGE_STATUS.NEW) { @@ -114,15 +115,17 @@ const hoverComponents = (challenge, onUpdateLaunch, deleteModalLaunch) => { ) } - return challenge.legacyId ? ( + return challenge.legacyId || isTask ? (
View Challenge -
- Direct - | - OR -
+ {!isTask && ( +
+ Direct + | + OR +
+ )}
{challenge.status.toUpperCase() === CHALLENGE_STATUS.DRAFT && (