File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed
components/ChallengeEditor/ChallengeView Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,14 @@ const ChallengeView = ({
207207 </ >
208208 ) }
209209 {
210- _ . sortBy ( phases , [ 'scheduledEndDate' ] ) . map ( ( phase , index ) => (
210+ challenge . legacy . subTrack === 'WEB_DESIGNS' && challenge . phases . length === 8 ? phases . map ( ( phase , index ) => (
211+ < PhaseInput
212+ phase = { phase }
213+ phaseIndex = { index }
214+ key = { index }
215+ readOnly
216+ />
217+ ) ) : _ . sortBy ( phases , [ 'scheduledEndDate' ] ) . map ( ( phase , index ) => (
211218 < PhaseInput
212219 phase = { phase }
213220 phaseIndex = { index }
Original file line number Diff line number Diff line change @@ -106,7 +106,18 @@ export default function (state = initialState, action) {
106106 case LOAD_CHALLENGE_DETAILS_SUCCESS : {
107107 return {
108108 ...state ,
109- challengeDetails : action . payload ,
109+ challengeDetails : { ...action . payload ,
110+ // change the phase order for the design challenge with multiple phases
111+ phases : ( action . payload . legacy . subTrack === 'WEB_DESIGNS' && action . payload . phases . length === 8 ) ? [
112+ action . payload . phases . find ( x => x . name === 'Registration' ) ,
113+ action . payload . phases . find ( x => x . name === 'Checkpoint Submission' ) ,
114+ action . payload . phases . find ( x => x . name === 'Checkpoint Screening' ) ,
115+ action . payload . phases . find ( x => x . name === 'Checkpoint Review' ) ,
116+ action . payload . phases . find ( x => x . name === 'Submission' ) ,
117+ action . payload . phases . find ( x => x . name === 'Screening' ) ,
118+ action . payload . phases . find ( x => x . name === 'Review' ) ,
119+ action . payload . phases . find ( x => x . name === 'Approval' ) ] : action . payload . phases
120+ } ,
110121 isLoading : false ,
111122 attachments : _ . has ( action . payload , 'attachments' ) ? action . payload . attachments : [ ] ,
112123 failedToLoad : false
You can’t perform that action at this time.
0 commit comments