diff --git a/.circleci/config.yml b/.circleci/config.yml index 9231a0cf..aa29c413 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -81,7 +81,7 @@ workflows: context : org-global filters: branches: - only: ['develop', 'feature/bug-bash-jun'] + only: ['develop', 'feature/bug-bash-july'] # Production builds are exectuted only on tagged commits to the # master branch. diff --git a/src/components/ChallengeEditor/ChallengeEditor.module.scss b/src/components/ChallengeEditor/ChallengeEditor.module.scss index 79366ade..80989102 100644 --- a/src/components/ChallengeEditor/ChallengeEditor.module.scss +++ b/src/components/ChallengeEditor/ChallengeEditor.module.scss @@ -15,20 +15,33 @@ } } -.title { - @include roboto-bold(); +.textCenter { + text-align: center; +} + +.topContainer { + margin-top: 30px; + display: flex; + justify-content: space-between; + align-items: center; + padding: 0 20px; +} +.leftContainer { + display: flex; + align-items: center; + .title { + text-align: left; + } +} + +.title { font-size: 24px; font-weight: 700; line-height: 29px; + margin-right: 5px; color: $challenges-title; - margin-top: 30px; text-align: center; - - span { - color: $tc-red; - } - } .textRequired { @@ -255,7 +268,6 @@ } .actionButtons { - position: absolute; top: 30px; a,button { height: 40px; diff --git a/src/components/ChallengeEditor/ChallengeViewTabs/ChallengeViewTabs.module.scss b/src/components/ChallengeEditor/ChallengeViewTabs/ChallengeViewTabs.module.scss index 3a4e50c1..d6ecc12d 100644 --- a/src/components/ChallengeEditor/ChallengeViewTabs/ChallengeViewTabs.module.scss +++ b/src/components/ChallengeEditor/ChallengeViewTabs/ChallengeViewTabs.module.scss @@ -3,11 +3,32 @@ $tc-dark-blue: #0681ff; $tc-white: #FFFFFF; +.topContainer { + margin-top: 30px; + display: flex; + justify-content: space-between; + align-items: center; + padding: 0 20px; +} + +.leftContainer { + display: flex; + align-items: center; +} +.title { + @include roboto-bold(); + + font-size: 24px; + font-weight: 700; + line-height: 29px; + margin-right: 5px; + color: $challenges-title; + text-align: left; +} + .actionButtons { display: flex; - position: absolute; top: 30px; - margin-top: 53px; } .actionButtonsLeft { @@ -38,21 +59,6 @@ $tc-white: #FFFFFF; } } -.title { - @include roboto-bold(); - - font-size: 24px; - font-weight: 700; - line-height: 29px; - color: $challenges-title; - margin-top: 25px; - text-align: center; - - span { - color: $tc-red; - } -} - .challenge-view-selector { display: flex; flex-wrap: wrap; diff --git a/src/components/ChallengeEditor/ChallengeViewTabs/index.js b/src/components/ChallengeEditor/ChallengeViewTabs/index.js index e213f179..c431f8d4 100644 --- a/src/components/ChallengeEditor/ChallengeViewTabs/index.js +++ b/src/components/ChallengeEditor/ChallengeViewTabs/index.js @@ -81,60 +81,64 @@ const ChallengeViewTabs = ({ return (
- {!isTask && ( +
+
+
{challenge.name}
+ {!isTask && ( +
+ +
+ )} +
- + {(challenge.status === 'Draft' || challenge.status === 'New') &&
} + {challenge.status === 'Draft' && ( +
+ {challenge.legacyId || isTask ? ( + + ) : ( + + {/* Don't disable button for real inside tooltip, otherwise mouseEnter/Leave events work not good */} + + + )} +
+ )} + {isTask && challenge.status === 'Active' && ( +
+ {assignedMemberDetails ? ( + + + + ) : ( + + {/* Don't disable button for real inside tooltip, otherwise mouseEnter/Leave events work not good */} + + + )} +
+ )} + {enableEdit && ( + + )} +
- )} -
{challenge.name}
-
- {(challenge.status === 'Draft' || challenge.status === 'New') &&
} - {challenge.status === 'Draft' && ( -
- {challenge.legacyId || isTask ? ( - - ) : ( - - {/* Don't disable button for real inside tooltip, otherwise mouseEnter/Leave events work not good */} - - - )} -
- )} - {isTask && challenge.status === 'Active' && ( -
- {assignedMemberDetails ? ( - - - - ) : ( - - {/* Don't disable button for real inside tooltip, otherwise mouseEnter/Leave events work not good */} - - - )} -
- )} - {enableEdit && ( - - )} -
{ +const getTitle = (isNew, challenge) => { if (isNew) { return 'Create New Work' } - return 'Set-Up Work' + return challenge.name || 'Set-Up Work' } class ChallengeEditor extends Component { @@ -1321,7 +1321,7 @@ class ChallengeEditor extends Component { +

Are you sure want to complete task "{challenge.name}" with the prize ${taskPrize} for {assignedMember}?

} @@ -1600,14 +1600,16 @@ class ChallengeEditor extends Component { return (
- -
- {!isNew && } -
-
{getTitle(isNew)}
-
- {!isNew && this.props.challengeDetails.status === 'New' && } - + +
+
+
{getTitle(isNew, challenge)}
+ {!isNew && } +
+
+ {!isNew && this.props.challengeDetails.status === 'New' && } + +
* Required
diff --git a/src/components/ChallengesComponent/ChallengeList/index.js b/src/components/ChallengesComponent/ChallengeList/index.js index e7c355a2..d3398b5b 100644 --- a/src/components/ChallengesComponent/ChallengeList/index.js +++ b/src/components/ChallengesComponent/ChallengeList/index.js @@ -121,6 +121,9 @@ class ChallengeList extends Component { case CHALLENGE_STATUS.COMPLETED: selectedTab = 3 break + case CHALLENGE_STATUS.CANCELLED: + selectedTab = 4 + break } let warningModal = null @@ -175,6 +178,10 @@ class ChallengeList extends Component { this.directUpdateSearchParam(searchText, CHALLENGE_STATUS.COMPLETED) break } + case 4: { + this.directUpdateSearchParam(searchText, CHALLENGE_STATUS.CANCELLED) + break + } } }}> @@ -182,6 +189,7 @@ class ChallengeList extends Component { New Draft Completed + Cancelled diff --git a/src/components/ChallengesComponent/ChallengesComponent.module.scss b/src/components/ChallengesComponent/ChallengesComponent.module.scss index c453ea90..c779d15b 100644 --- a/src/components/ChallengesComponent/ChallengesComponent.module.scss +++ b/src/components/ChallengesComponent/ChallengesComponent.module.scss @@ -11,6 +11,7 @@ font-size: 24px; font-weight: 700; + margin-right: 5px; line-height: 29px; color: $challenges-title; text-align: center; @@ -22,12 +23,17 @@ justify-content: space-between; align-items: center; padding: 0 20px; + } .titleLinks { align-items: center; display: flex; + > span a { + margin: 2px 5px 0; + } + > a + a { margin-left: 20px; } diff --git a/src/components/LegacyLinks/LegacyLinks.module.scss b/src/components/LegacyLinks/LegacyLinks.module.scss index ac057bd4..95abcc77 100644 --- a/src/components/LegacyLinks/LegacyLinks.module.scss +++ b/src/components/LegacyLinks/LegacyLinks.module.scss @@ -1,18 +1,11 @@ @import "../../styles/includes"; .container { display: flex; - margin-top: auto; align-items: center; + white-space: nowrap; - button:not(:first-child), - a:not(:first-child) { - margin-left: 20px; - } - - button { - height: 40px; - outline: none; - white-space: nowrap; + > a { + margin: 0 5px; } .row { diff --git a/src/components/LegacyLinks/index.js b/src/components/LegacyLinks/index.js index c366fd39..d1bb20cd 100644 --- a/src/components/LegacyLinks/index.js +++ b/src/components/LegacyLinks/index.js @@ -5,40 +5,23 @@ import React, { useCallback } from 'react' import PropTypes from 'prop-types' import cn from 'classnames' import styles from './LegacyLinks.module.scss' -import { DIRECT_PROJECT_URL, MESSAGE, ONLINE_REVIEW_URL } from '../../config/constants' -import PrimaryButton from '../Buttons/PrimaryButton' import Tooltip from '../Tooltip' +import { MESSAGE, ONLINE_REVIEW_URL } from '../../config/constants' const LegacyLinks = ({ challenge, challengeView }) => { const onClick = useCallback((e) => { e.stopPropagation() }, []) - const directUrl = `${DIRECT_PROJECT_URL}/contest/detail?projectId=${challenge.legacyId}` const orUrl = `${ONLINE_REVIEW_URL}/review/actions/ViewProjectDetails?pid=${challenge.legacyId}` return (
- {challenge.legacyId ? ( - <> - - - - - - - - ) : ( - <> - - {/* Don't disable button for real inside tooltip, otherwise mouseEnter/Leave events work not good */} - - - - {/* Don't disable button for real inside tooltip, otherwise mouseEnter/Leave events work not good */} - - - - )} + ( {challenge.legacyId ? Online Review + : + {/* Don't disable button for real inside tooltip, otherwise mouseEnter/Leave events work not good */} + Online Review + } + )
{ challengeView && challenge.discussions && challenge.discussions.map(d => (
diff --git a/src/config/constants.js b/src/config/constants.js index 357db2f3..2a7285fa 100644 --- a/src/config/constants.js +++ b/src/config/constants.js @@ -162,7 +162,8 @@ export const CHALLENGE_STATUS = { ACTIVE: 'ACTIVE', NEW: 'NEW', DRAFT: 'DRAFT', - COMPLETED: 'COMPLETED' + COMPLETED: 'COMPLETED', + CANCELLED: 'CANCELLED' } export const getTCMemberURL = (handle) => `${COMMUNITY_APP_URL}/members/${handle}`