diff --git a/src/shared/components/challenge-listing/Tooltips/TrackAbbreviationTooltip/index.jsx b/src/shared/components/challenge-listing/Tooltips/TrackAbbreviationTooltip/index.jsx
index aab76ff2e6..51d2ed9f9a 100644
--- a/src/shared/components/challenge-listing/Tooltips/TrackAbbreviationTooltip/index.jsx
+++ b/src/shared/components/challenge-listing/Tooltips/TrackAbbreviationTooltip/index.jsx
@@ -11,111 +11,33 @@ import PT from 'prop-types';
import Tooltip from 'components/Tooltip';
import './style.scss';
-const DESCRIPTION = {
- // TODO: [Review Opps] This is temporary
- REVIEW_OPPORTUNITY: 'As a topcoder member, you can participate in review boards that review work submitted into challenges by other members.',
- APPLICATION_FRONT_END_DESIGN: 'Design UI and front end experiences for apps',
- ARCHITECTURE: 'Architect modules, components, or full applications',
- ASSEMBLY_COMPETITION: 'Develop code for a variety of use cases. Rigorous review and final fix process is included.',
- BANNERS_OR_ICONS: 'Design UI assets for use in web, mobile, print, and other digital formats',
- BUG_HUNT: 'Quickly find Bugs in apps, websites',
- CODE: 'Develop code for apps, services, etc. Final fixes are not included',
- DEVELOPMENT: 'Develop code for apps, services, etc. Final fixes are not included',
- TEST_SCENARIOS: 'Provide simple, easy information about what to test',
- CONTENT_CREATION: 'Generate topic ideas as a blog, video, infographic, or other format',
- IDEA_GENERATION: 'Generate feasible concepts for products, apps, features, etc',
- SPECIFICATION: 'Document requirements to be satisfied for design, product, or service',
- TASK: 'An assigned piece of work',
- AUTOMATED_TESTING: 'Challenges were submissions are auto-scored against a set of automated test cases',
- COPILOT_POSTING: 'A post made to the copilot community which asks them to come back with a proposal for your project. This proposal typically includes a suggested gameplan, an estimated budget and their take on what approach to use.',
- SPEC_REVIEW: 'Review of technical writing of requirements for the scope of work',
- MARATHON: 'Programming competition',
- DESIGN: 'Prepare the visual sketch or the plans for a website, feature, app, etc',
- TEST_SUITES: 'Develop test cases to be used to validate apps, website, etc.',
- CONCEPTUALIZATION: 'Discover and define user stories and requirements',
- DESIGN_FIRST2FINISH: 'Be the first to deliver the design solution',
- DESIGN_FIRST_2_FINISH: 'Be the first to deliver the design solution',
- FIRST_2_FINISH: 'Be the first to deliver the development solution',
- FIRST2FINISH: 'Be the first to deliver the development solution',
- LOGO_DESIGN: 'Logo Design',
- MARATHON_MATCH: 'Write algorithms to solve complex problems, often for real world issues',
- DEVELOP_MARATHON_MATCH: 'Write algorithms to solve complex problems, often for real world issues',
- PRINT_OR_PRESENTATION: 'Design print and presentation assets',
- SRM: 'Single Round Match - quickly write code to solve algorythm problems head to head against other competitors',
- STUDIO_OTHER: 'Studio other',
- UI_PROTOTYPE_COMPETITION: 'Develop the front end of a UX',
- WEB_DESIGN: 'Design UI and front end experiences for web experiences',
- WEB_DESIGNS: 'Design UI and front end experiences for web experiences',
- WIDGET_OR_MOBILE_SCREEN_DESIGN: 'Design UI and front end experiences for mobile',
- WIREFRAMES: 'Produce the information architecture for user experiences',
-};
-
-const HEADER = {
- REVIEW_OPPORTUNITY: 'Review Opportunity', // TODO: [Review Opps] this is temporary
- APPLICATION_FRONT_END_DESIGN: 'Application Front-End Design (AFED)',
- ARCHITECTURE: 'Architecture (Ar)',
- ASSEMBLY_COMPETITION: 'Assembly (As)',
- BANNERS_OR_ICONS: 'Banners/Icons (BI)',
- BUG_HUNT: 'Bug Hunt (BH)',
- CODE: 'Code (Cd)',
- DEVELOPMENT: 'Development (Dv)',
- TEST_SUITES: 'Test Suites (TS)',
- TEST_SCENARIOS: 'Test Scenarios (Ts)',
- CONTENT_CREATION: 'Content Creation (CC)',
- IDEA_GENERATION: 'Idea Generation (IG)',
- SPECIFICATION: 'Specification (Sp)',
- TASK: 'Task (Tk)',
- AUTOMATED_TESTING: 'Automated Testing (AT)',
- COPILOT_POSTING: 'Copilot Posting (CP)',
- SPEC_REVIEW: 'Specification Review (SR)',
- MARATHON: 'Marathon (MM)',
- DESIGN: 'Design (Ds)',
- CONCEPTUALIZATION: 'Conceptualization (Cn)',
- DESIGN_FIRST2FINISH: 'Design First2Finish(DF2F)',
- DESIGN_FIRST_2_FINISH: 'Design First2Finish(DF2F)',
- FIRST2FINISH: 'First2Finish (F2F)',
- FIRST_2_FINISH: 'First2Finish (F2F)',
- LOGO_DESIGN: 'Logo Design (Lg)',
- MARATHON_MATCH: 'Marathon Match (MM)',
- DEVELOP_MARATHON_MATCH: 'Marathon Match (MM)',
- PRINT_OR_PRESENTATION: 'Print/Presentation (PP)',
- SRM: 'Single Round Match (SRM)',
- UI_PROTOTYPE_COMPETITION: 'UI Prototype (Pr)',
- WEB_DESIGN: 'Web Design (Wb)',
- WEB_DESIGNS: 'Web Design (Wb)',
- WIDGET_OR_MOBILE_SCREEN_DESIGN: 'Widget or Mobile Screen Design (Wg)',
- STUDIO_OTHER: 'Generic design challenge (D)',
- WIREFRAMES: 'Wireframe (Wf)',
-};
-
/**
* Renders the tooltip's content.
*/
function Tip({
- subTrack,
track,
+ type,
}) {
const trackStyle = track.replace(' ', '-').toLowerCase();
return (
- {HEADER[subTrack]}
+ {type.name}
- {subTrack ? DESCRIPTION[subTrack] : ''}
+ {type.description}
);
}
Tip.defaultProps = {
- subTrack: 'CODE',
- track: 'development',
+ track: 'Development',
};
Tip.propTypes = {
- subTrack: PT.string,
track: PT.string,
+ type: PT.shape().isRequired,
};
function placeArrow(TooltipNode) {
@@ -128,10 +50,10 @@ function placeArrow(TooltipNode) {
*/
function TrackAbbreviationTooltip({
children,
- subTrack,
track,
+ type,
}) {
- const tip =
;
+ const tip =
;
return (
-
-
- {/* */}
-
-
-
- {/* happening now */}
-
-
-
- {/* upcoming SRMs */}
-
-
- Upcoming SRMs
-
- { /* UpcomingSrm */ }
-
- {/* past SRMs */}
-
-
-
-
-
- {/* */}
-
-
-
-
+
diff --git a/src/shared/components/examples/ColorMixins/Color/style.scss b/src/shared/components/examples/ColorMixins/Color/style.scss
index c44289aa0a..9db9ce4512 100644
--- a/src/shared/components/examples/ColorMixins/Color/style.scss
+++ b/src/shared/components/examples/ColorMixins/Color/style.scss
@@ -81,10 +81,12 @@
.tc-green-30 { @include color($tc-green-30); }
.tc-green-10 { @include color($tc-green-10); }
+.tc-purple-120 { @include color($tc-purple-110); }
.tc-purple-110 { @include color($tc-purple-110); }
.tc-purple-100 { @include color($tc-purple-100); }
.tc-purple-70 { @include color($tc-purple-70); }
.tc-purple-30 { @include color($tc-purple-30); }
+.tc-purple-20 { @include color($tc-purple-20); }
.tc-purple-10 { @include color($tc-purple-10); }
.tc-gold { @include color($tc-gold); }
diff --git a/src/shared/containers/challenge-listing/Listing/index.jsx b/src/shared/containers/challenge-listing/Listing/index.jsx
index 9ef1e90437..8b27e52269 100644
--- a/src/shared/containers/challenge-listing/Listing/index.jsx
+++ b/src/shared/containers/challenge-listing/Listing/index.jsx
@@ -158,7 +158,7 @@ export class ListingContainer extends React.Component {
auth.tokenV3,
f.front,
);
- if (auth) {
+ if (auth.tokenV3) {
const userId = _.get(auth.user, 'userId');
getUserChallenges(userId, auth.tokenV3);
}
diff --git a/src/shared/utils/challenge-detail/helper.jsx b/src/shared/utils/challenge-detail/helper.jsx
index d81ac31fc7..2a6fb4b8be 100644
--- a/src/shared/utils/challenge-detail/helper.jsx
+++ b/src/shared/utils/challenge-detail/helper.jsx
@@ -25,9 +25,9 @@ export const PRIZE_MODE = {
* @param {Object} challenge challenge info
*/
export function getChallengeTypeAbbr(track, challengeTypes) {
- const subTrack = _.find(challengeTypes, { name: track });
- if (subTrack) {
- return subTrack.abbreviation;
+ const type = _.find(challengeTypes, { name: track });
+ if (type) {
+ return type.abbreviation;
}
return null;
}
@@ -37,9 +37,9 @@ export function getChallengeTypeAbbr(track, challengeTypes) {
* @param {Object} challenge challenge info
*/
export function getEndDate(challenge) {
- const { subTrack } = challenge.legacy;
+ const { type } = challenge;
let phases = challenge.phases || [];
- if (subTrack === 'FIRST_2_FINISH' && challenge.status === 'COMPLETED') {
+ if (type === 'First2Finish' && challenge.status === 'Completed') {
phases = challenge.phases.filter(p => p.phaseType === 'Iterative Review' && p.phaseStatus === 'Closed');
}
const endPhaseDate = Math.max(...phases.map(d => new Date(d.scheduledEndDate)));
diff --git a/src/shared/utils/challenge.js b/src/shared/utils/challenge.js
index c7aab75dae..ba546f39ab 100644
--- a/src/shared/utils/challenge.js
+++ b/src/shared/utils/challenge.js
@@ -8,15 +8,8 @@ import _ from 'lodash';
* @param {Object} challenge challenge object
*/
export function isMM(challenge) {
- return challenge.type === 'Marathon Match';
-}
-
-/**
- * check if is develop marathon match challenge
- * @param {Object} challenge challenge object
- */
-export function isDevelopMM(challenge) {
- return challenge.type === 'Develop Marathon Match';
+ const tags = _.get(challenge, 'challenge.tags') || [];
+ return tags.includes('Marathon Match');
}
/**
@@ -35,6 +28,5 @@ export function updateChallengeType(challenges, challengeTypeMap) {
export default {
isMM,
- isDevelopMM,
updateChallengeType,
};