Skip to content

Commit 9d33cf2

Browse files
marioskranitsasThomasKranitsas
authored andcommitted
Self Service Green Tag
1 parent d93442c commit 9d33cf2

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

src/shared/components/challenge-detail/Header/ChallengeTags.jsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import './style.scss';
3131

3232
export default function ChallengeTags(props) {
3333
const {
34+
isSelfService,
3435
challengeId,
3536
challengesUrl,
3637
track,
@@ -112,6 +113,13 @@ export default function ChallengeTags(props) {
112113
/>
113114
))
114115
}
116+
{
117+
isSelfService && (
118+
<DevelopmentTrackTag>
119+
<span>Customer Self-Service</span>
120+
</DevelopmentTrackTag>
121+
)
122+
}
115123
{
116124
tags.map(tag => (
117125
tag
@@ -135,9 +143,11 @@ export default function ChallengeTags(props) {
135143
ChallengeTags.defaultProps = {
136144
events: [],
137145
technPlatforms: [],
146+
isSelfService: false,
138147
};
139148

140149
ChallengeTags.propTypes = {
150+
isSelfService: PT.bool,
141151
challengeId: PT.string.isRequired,
142152
challengesUrl: PT.string.isRequired,
143153
track: PT.string.isRequired,

src/shared/components/challenge-detail/Header/index.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ export default function ChallengeHeader(props) {
264264
</h1>
265265
<div styleName="tag-container">
266266
<ChallengeTags
267+
isSelfService={challenge.legacy.selfService}
267268
challengeId={challengeId}
268269
track={track}
269270
challengeType={_.find(challengeTypesMap, { name: type }) || {}}

src/shared/components/challenge-listing/ChallengeCard/index.jsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import _ from 'lodash';
22
import React from 'react';
33
import PT from 'prop-types';
44
import TrackIcon from 'components/TrackIcon';
5+
import { DevelopmentTrackTag } from 'topcoder-react-ui-kit';
56
import { TABS as DETAIL_TABS } from 'actions/page/challenge-details';
67
import { Link } from 'topcoder-react-utils';
78
import {
@@ -102,6 +103,13 @@ function ChallengeCard({
102103
/>
103104
)
104105
}
106+
{
107+
challenge.legacy.selfService && (
108+
<DevelopmentTrackTag>
109+
<span>Customer Self-Service</span>
110+
</DevelopmentTrackTag>
111+
)
112+
}
105113
{ !isRecommendedChallenge
106114
&& challenge.tags.length > 0
107115
&& (

0 commit comments

Comments
 (0)