@@ -29,6 +29,7 @@ import {
2929 QA_TRACK_ID , DESIGN_CHALLENGE_TYPES , ROUND_TYPES ,
3030 MULTI_ROUND_CHALLENGE_TEMPLATE_ID , DS_TRACK_ID
3131} from '../../config/constants'
32+ import { getDomainTypes , getResourceRoleByName } from '../../util/tc'
3233import { PrimaryButton , OutlineButton } from '../Buttons'
3334import TrackField from './Track-Field'
3435import TypeField from './Type-Field'
@@ -60,7 +61,7 @@ import AssignedMemberField from './AssignedMember-Field'
6061import Tooltip from '../Tooltip'
6162import CancelDropDown from './Cancel-Dropdown'
6263import UseSchedulingAPIField from './UseSchedulingAPIField'
63- import { getResourceRoleByName } from '../../util/tc'
64+
6465import { isBetaMode } from '../../util/cookie'
6566import MilestoneField from './Milestone-Field'
6667import DiscussionField from './Discussion-Field'
@@ -1575,13 +1576,15 @@ class ChallengeEditor extends Component {
15751576 const showDashBoard = ( challenge . trackId === DS_TRACK_ID && isChallengeType ) || ( isDevChallenge && isMM )
15761577 const useDashboardData = _ . find ( challenge . metadata , { name : 'show_data_dashboard' } )
15771578 const useDashboard = useDashboardData ? useDashboardData . value : true
1579+ const workTypes = getDomainTypes ( challenge . trackId )
1580+ const filteredTypes = metadata . challengeTypes . filter ( type => workTypes . includes ( type . abbreviation ) )
15781581
15791582 const challengeForm = isNew
15801583 ? (
15811584 < form name = 'challenge-new-form' noValidate autoComplete = 'off' onSubmit = { this . createChallengeHandler } >
15821585 < div className = { styles . newFormContainer } >
15831586 < TrackField tracks = { metadata . challengeTracks } challenge = { challenge } onUpdateOthers = { this . onUpdateOthers } />
1584- < TypeField types = { metadata . challengeTypes } onUpdateSelect = { this . onUpdateSelect } challenge = { challenge } />
1587+ < TypeField types = { filteredTypes } onUpdateSelect = { this . onUpdateSelect } challenge = { challenge } />
15851588 {
15861589 showRoundType && (
15871590 < >
0 commit comments