@@ -20,7 +20,9 @@ import {
20
20
MESSAGE ,
21
21
COMMUNITY_APP_URL ,
22
22
DES_TRACK_ID ,
23
+ DEV_TRACK_ID ,
23
24
CHALLENGE_TYPE_ID ,
25
+ MARATHON_TYPE_ID ,
24
26
REVIEW_TYPES ,
25
27
MILESTONE_STATUS ,
26
28
PHASE_PRODUCT_CHALLENGE_ID_FIELD ,
@@ -955,6 +957,10 @@ class ChallengeEditor extends Component {
955
957
const { timelineTemplates } = metadata
956
958
const isDesignChallenge = trackId === DES_TRACK_ID
957
959
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 )
958
964
959
965
// indicate that creating process has started
960
966
this . setState ( { isSaving : true } )
@@ -1012,7 +1018,7 @@ class ChallengeEditor extends Component {
1012
1018
newChallenge . discussions = discussions
1013
1019
}
1014
1020
}
1015
- if ( isDataScience ) {
1021
+ if ( showDashBoard ) {
1016
1022
if ( ! newChallenge . metadata ) {
1017
1023
newChallenge . metadata = [ ]
1018
1024
}
@@ -1561,10 +1567,12 @@ class ChallengeEditor extends Component {
1561
1567
const showTimeline = false // disables the timeline for time being https://github.com/topcoder-platform/challenge-engine-ui/issues/706
1562
1568
const copilotResources = metadata . members || challengeResources
1563
1569
const isDesignChallenge = challenge . trackId === DES_TRACK_ID
1570
+ const isDevChallenge = challenge . trackId === DEV_TRACK_ID
1571
+ const isMM = challenge . typeId === MARATHON_TYPE_ID
1564
1572
const isChallengeType = challenge . typeId === CHALLENGE_TYPE_ID
1565
1573
const showRoundType = isDesignChallenge && isChallengeType
1566
1574
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 )
1568
1576
const useDashboardData = _ . find ( challenge . metadata , { name : 'show_data_dashboard' } )
1569
1577
const useDashboard = useDashboardData ? useDashboardData . value : true
1570
1578
@@ -1584,7 +1592,7 @@ class ChallengeEditor extends Component {
1584
1592
}
1585
1593
< ChallengeNameField challenge = { challenge } onUpdateInput = { this . onUpdateInput } />
1586
1594
{
1587
- isDataScience && (
1595
+ showDashBoard && (
1588
1596
< div className = { styles . row } >
1589
1597
< div className = { cn ( styles . field , styles . col1 ) } >
1590
1598
< label htmlFor = 'isDashboardEnabled' > Use data dashboard :</ label >
@@ -1635,7 +1643,7 @@ class ChallengeEditor extends Component {
1635
1643
1636
1644
< ChallengeNameField challenge = { challenge } onUpdateInput = { this . onUpdateInput } />
1637
1645
{
1638
- isDataScience && (
1646
+ showDashBoard && (
1639
1647
< div className = { styles . row } >
1640
1648
< div className = { cn ( styles . field , styles . col1 ) } >
1641
1649
< label htmlFor = 'isDashboardEnabled' > Use data dashboard :</ label >
0 commit comments