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 = ({
207
207
</ >
208
208
) }
209
209
{
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 ) => (
211
218
< PhaseInput
212
219
phase = { phase }
213
220
phaseIndex = { index }
Original file line number Diff line number Diff line change @@ -106,7 +106,18 @@ export default function (state = initialState, action) {
106
106
case LOAD_CHALLENGE_DETAILS_SUCCESS : {
107
107
return {
108
108
...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
+ } ,
110
121
isLoading : false ,
111
122
attachments : _ . has ( action . payload , 'attachments' ) ? action . payload . attachments : [ ] ,
112
123
failedToLoad : false
You can’t perform that action at this time.
0 commit comments