@@ -20,7 +20,9 @@ import {
2020 MESSAGE ,
2121 COMMUNITY_APP_URL ,
2222 DES_TRACK_ID ,
23+ DEV_TRACK_ID ,
2324 CHALLENGE_TYPE_ID ,
25+ MARATHON_TYPE_ID ,
2426 REVIEW_TYPES ,
2527 MILESTONE_STATUS ,
2628 PHASE_PRODUCT_CHALLENGE_ID_FIELD ,
@@ -955,6 +957,10 @@ class ChallengeEditor extends Component {
955957 const { timelineTemplates } = metadata
956958 const isDesignChallenge = trackId === DES_TRACK_ID
957959 const isDataScience = trackId === DS_TRACK_ID
960+ const isChallengeType = typeId === CHALLENGE_TYPE_ID
961+ const isDevChallenge = trackId === DEV_TRACK_ID
962+ const isMM = typeId === MARATHON_TYPE_ID
963+ const showDashBoard = ( isDataScience && isChallengeType ) || ( isDevChallenge && isMM )
958964
959965 // indicate that creating process has started
960966 this . setState ( { isSaving : true } )
@@ -1012,7 +1018,7 @@ class ChallengeEditor extends Component {
10121018 newChallenge . discussions = discussions
10131019 }
10141020 }
1015- if ( isDataScience ) {
1021+ if ( showDashBoard ) {
10161022 if ( ! newChallenge . metadata ) {
10171023 newChallenge . metadata = [ ]
10181024 }
@@ -1561,10 +1567,12 @@ class ChallengeEditor extends Component {
15611567 const showTimeline = false // disables the timeline for time being https://github.com/topcoder-platform/challenge-engine-ui/issues/706
15621568 const copilotResources = metadata . members || challengeResources
15631569 const isDesignChallenge = challenge . trackId === DES_TRACK_ID
1570+ const isDevChallenge = challenge . trackId === DEV_TRACK_ID
1571+ const isMM = challenge . typeId === MARATHON_TYPE_ID
15641572 const isChallengeType = challenge . typeId === CHALLENGE_TYPE_ID
15651573 const showRoundType = isDesignChallenge && isChallengeType
15661574 const showCheckpointPrizes = challenge . timelineTemplateId === MULTI_ROUND_CHALLENGE_TEMPLATE_ID
1567- const isDataScience = challenge . trackId === DS_TRACK_ID
1575+ const showDashBoard = ( challenge . trackId === DS_TRACK_ID && isChallengeType ) || ( isDevChallenge && isMM )
15681576 const useDashboardData = _ . find ( challenge . metadata , { name : 'show_data_dashboard' } )
15691577 const useDashboard = useDashboardData ? useDashboardData . value : true
15701578
@@ -1584,7 +1592,7 @@ class ChallengeEditor extends Component {
15841592 }
15851593 < ChallengeNameField challenge = { challenge } onUpdateInput = { this . onUpdateInput } />
15861594 {
1587- isDataScience && (
1595+ showDashBoard && (
15881596 < div className = { styles . row } >
15891597 < div className = { cn ( styles . field , styles . col1 ) } >
15901598 < label htmlFor = 'isDashboardEnabled' > Use data dashboard :</ label >
@@ -1635,7 +1643,7 @@ class ChallengeEditor extends Component {
16351643
16361644 < ChallengeNameField challenge = { challenge } onUpdateInput = { this . onUpdateInput } />
16371645 {
1638- isDataScience && (
1646+ showDashBoard && (
16391647 < div className = { styles . row } >
16401648 < div className = { cn ( styles . field , styles . col1 ) } >
16411649 < label htmlFor = 'isDashboardEnabled' > Use data dashboard :</ label >
0 commit comments