+
TCO
diff --git a/src/shared/components/TrackIcon/style.scss b/src/shared/components/TrackIcon/style.scss
index 62ef3d0b69..e8eb09ffab 100644
--- a/src/shared/components/TrackIcon/style.scss
+++ b/src/shared/components/TrackIcon/style.scss
@@ -5,9 +5,6 @@ $track-space-10: $base-unit * 2;
$track-space-15: $base-unit * 3;
$track-space-20: $base-unit * 4;
$track-radius-4: $corner-radius * 2;
-$track-code-green: #35ac35;
-$track-code-blue: #2984bd;
-$track-code-turquose: #0ab88a;
.trackIcon {
display: flex;
@@ -34,25 +31,16 @@ $track-code-turquose: #0ab88a;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
- &.design,
- &.generic {
- background: $track-code-blue;
- }
-
- &.develop,
- &.development {
+ &.CH {
background: $track-code-green;
}
- &.qa,
- &.quality-assurance {
- background: $track-code-turquose;
+ &.F2F {
+ background: $track-code-blue;
}
- &.data_science,
- &.data-science,
- &.data {
- background: $tc-orange-110;
+ &.TSK {
+ background: $track-code-turquose;
}
}
@@ -69,29 +57,19 @@ $track-code-turquose: #0ab88a;
border-top-left-radius: 0;
border-top-right-radius: 0;
- &.design,
- &.generic {
- color: $tc-light-blue-110;
- background: $tc-light-blue-10;
- }
-
- &.develop,
- &.development {
- color: $tc-green-110;
- background: $tc-green-10;
+ &.CH {
+ color: $track-code-green;
+ background: $track-code-green-light;
}
- &.qa,
- &.quality-assurance {
- color: #0ab88a;
- background: #c1f5e7;
+ &.F2F {
+ color: $track-code-blue;
+ background: $track-code-blue-light;
}
- &.data_science,
- &.data-science,
- &.data {
- color: $tc-orange-110;
- background: $tc-orange-10;
+ &.TSK {
+ color: $track-code-turquose;
+ background: $track-code-turquose-light;
}
}
diff --git a/src/shared/components/challenge-detail/Header/ChallengeTags.jsx b/src/shared/components/challenge-detail/Header/ChallengeTags.jsx
index e9150ce43f..4c211c9c8e 100644
--- a/src/shared/components/challenge-detail/Header/ChallengeTags.jsx
+++ b/src/shared/components/challenge-detail/Header/ChallengeTags.jsx
@@ -13,21 +13,14 @@ import { config } from 'topcoder-react-utils';
import {
Tag,
- DataScienceTrackTag,
- DataScienceTrackEventTag,
- DesignTrackTag,
- DesignTrackEventTag,
DevelopmentTrackTag,
- DevelopmentTrackEventTag,
- QATrackTag,
- QATrackEventTag,
} from 'topcoder-react-ui-kit';
import { COMPETITION_TRACKS } from 'utils/tc';
import VerifiedTag from 'components/challenge-listing/VerifiedTag';
import MatchScore from 'components/challenge-listing/ChallengeCard/MatchScore';
import { calculateScore } from '../../../utils/challenge-listing/helper';
-import style from './style.scss';
+import './style.scss';
export default function ChallengeTags(props) {
const {
@@ -42,66 +35,59 @@ export default function ChallengeTags(props) {
openForRegistrationChallenges,
} = props;
- let EventTag;
- let TrackTag;
- switch (track) {
- case COMPETITION_TRACKS.DS:
- EventTag = DataScienceTrackEventTag;
- TrackTag = DataScienceTrackTag;
- break;
- case COMPETITION_TRACKS.DES:
- EventTag = DesignTrackEventTag;
- TrackTag = DesignTrackTag;
- break;
- case COMPETITION_TRACKS.DEV:
- EventTag = DevelopmentTrackEventTag;
- TrackTag = DevelopmentTrackTag;
- break;
- case COMPETITION_TRACKS.QA:
- EventTag = QATrackEventTag;
- TrackTag = QATrackTag;
- break;
- default:
- throw new Error('Wrong competition track value');
- }
-
-
const filteredChallenge = _.find(openForRegistrationChallenges, { id: challengeId });
const matchSkills = filteredChallenge ? filteredChallenge.match_skills || [] : [];
const matchScore = filteredChallenge ? filteredChallenge.jaccard_index || [] : 0;
const tags = technPlatforms.filter(tag => !matchSkills.includes(tag));
+ const abbreviationName = challengeType ? challengeType.name : null;
+ let abbreviation;
+ switch (abbreviationName) {
+ case 'First2Finish':
+ abbreviation = 'F2F';
+ break;
+ case 'Challenge':
+ abbreviation = 'CH';
+ break;
+ case 'Task':
+ abbreviation = 'TSK';
+ break;
+ default:
+ abbreviation = null;
+ }
return (
{
- challengeType
- && (
-
-
+ (
setImmediate(() => setChallengeListingFilter(
- { types: [challengeType.abbreviation] },
+ { types: [abbreviation] },
))
)
}
- to={`${challengesUrl}?types[]=${encodeURIComponent(challengeType.abbreviation)}`}
+ to={`${challengesUrl}?types[]=${encodeURIComponent(abbreviation)}`}
>
- {challengeType.name}
-
+ {abbreviationName}
+
)
}
{
- events.map(event => (
-
(
+
- {event}
-
- ))
+
+ {event}
+
+
+ )) : null
}
{
matchScore > 0 && config.ENABLE_RECOMMENDER && (
diff --git a/src/shared/components/challenge-detail/Header/TabSelector/index.jsx b/src/shared/components/challenge-detail/Header/TabSelector/index.jsx
index 4b23fda667..b01cb53702 100644
--- a/src/shared/components/challenge-detail/Header/TabSelector/index.jsx
+++ b/src/shared/components/challenge-detail/Header/TabSelector/index.jsx
@@ -39,6 +39,7 @@ export default function ChallengeViewSelector(props) {
hasRegistered,
mySubmissions,
onSort,
+ viewAsTable,
} = props;
const { type, tags } = challenge;
@@ -85,8 +86,8 @@ export default function ChallengeViewSelector(props) {
{ field: 'Final Score', sort: 'asc', name: 'Final Score: Low to High' },
{ field: 'Provisional Score', sort: 'desc', name: 'Provisional Score: High to Low' },
{ field: 'Provisional Score', sort: 'asc', name: 'Provisional Score: Low to High' },
- { field: 'Submission Date', sort: 'desc', name: 'Submission Date: New to Old' },
- { field: 'Submission Date', sort: 'asc', name: 'Submission Date: Old to New' },
+ { field: 'Time', sort: 'desc', name: 'Submission Date: New to Old' },
+ { field: 'Time', sort: 'asc', name: 'Submission Date: Old to New' },
];
const MySubmissionsSortOptions = [
@@ -376,7 +377,7 @@ export default function ChallengeViewSelector(props) {
}
{
- isSubmissionTabSelected && (
+ isSubmissionTabSelected && !viewAsTable && (
@@ -544,4 +546,5 @@ ChallengeHeader.propTypes = {
mySubmissions: PT.arrayOf(PT.shape()).isRequired,
openForRegistrationChallenges: PT.shape().isRequired,
onSort: PT.func.isRequired,
+ viewAsTable: PT.bool.isRequired,
};
diff --git a/src/shared/components/challenge-detail/Header/style.scss b/src/shared/components/challenge-detail/Header/style.scss
index 341a5372e7..16115573b9 100644
--- a/src/shared/components/challenge-detail/Header/style.scss
+++ b/src/shared/components/challenge-detail/Header/style.scss
@@ -1,3 +1,4 @@
+/* stylelint-disable no-descending-specificity */
@import '~styles/mixins';
.challengeAction {
@@ -159,6 +160,98 @@
.type-tag {
display: inline-block;
+
+ a {
+ color: $tc-white;
+
+ &:active,
+ &:focus,
+ &:hover {
+ color: $tc-white;
+ }
+ }
+
+ &.CH {
+ a {
+ background: $track-code-green;
+
+ &:active,
+ &:focus,
+ &:hover {
+ background-color: $track-code-green;
+ }
+ }
+ }
+
+ &.F2F {
+ a {
+ background: $track-code-blue;
+
+ &:active,
+ &:focus,
+ &:hover {
+ background-color: $track-code-blue;
+ }
+ }
+ }
+
+ &.TSK {
+ a {
+ background: $track-code-turquose;
+
+ &:active,
+ &:focus,
+ &:hover {
+ background-color: $track-code-turquose;
+ }
+ }
+ }
+}
+
+.event-tag {
+ display: inline-block;
+
+ &.CH {
+ a {
+ background-color: $track-code-green-light;
+ color: $track-code-green;
+
+ &:active,
+ &:focus,
+ &:hover {
+ background-color: $track-code-green-light;
+ color: $track-code-green;
+ }
+ }
+ }
+
+ &.F2F {
+ a {
+ background-color: $track-code-blue-light;
+ color: $track-code-blue;
+
+ &:active,
+ &:focus,
+ &:hover {
+ background-color: $track-code-blue-light;
+ color: $track-code-blue;
+ }
+ }
+ }
+
+ &.TSK {
+ a {
+ background-color: $track-code-turquose-light;
+ color: $track-code-turquose;
+
+ &:active,
+ &:focus,
+ &:hover {
+ background-color: $track-code-turquose-light;
+ color: $track-code-turquose;
+ }
+ }
+ }
}
.qa {
diff --git a/src/shared/components/challenge-detail/Submissions/SubmissionRow/index.jsx b/src/shared/components/challenge-detail/Submissions/SubmissionRow/index.jsx
index d9de9b9717..b7e550869f 100644
--- a/src/shared/components/challenge-detail/Submissions/SubmissionRow/index.jsx
+++ b/src/shared/components/challenge-detail/Submissions/SubmissionRow/index.jsx
@@ -20,7 +20,7 @@ import style from './style.scss';
export default function SubmissionRow({
isMM, openHistory, member, submissions, score, toggleHistory,
- isReviewPhaseComplete, finalRank, provisionalRank, onShowPopup, rating,
+ isReviewPhaseComplete, finalRank, provisionalRank, onShowPopup, rating, viewAsTable,
}) {
const {
submissionTime, provisionalScore, status, submissionId,
@@ -59,19 +59,19 @@ export default function SubmissionRow({
};
return (
-