File tree 3 files changed +6
-4
lines changed
3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ import { fireErrorMessage } from '../utils/errors';
18
18
19
19
import mySubmissionsManagement from './my-submissions-management' ;
20
20
21
+ import { COMPETITION_TRACKS } from '../utils/tc' ;
22
+
21
23
/**
22
24
* Handles CHALLENGE/GET_DETAILS_INIT action.
23
25
* @param {Object } state
@@ -469,7 +471,7 @@ export function factory(options = {}) {
469
471
const challengeDetails = _ . get ( res , 'payload' , { } ) ;
470
472
const track = _ . get ( challengeDetails , 'legacy.track' , '' ) ;
471
473
let checkpointsPromise = null ;
472
- if ( track === ' DESIGN' ) {
474
+ if ( track === COMPETITION_TRACKS . DESIGN ) {
473
475
const p = _ . get ( challengeDetails , 'phases' , [ ] )
474
476
. filter ( x => x . name === 'Checkpoint Review' ) ;
475
477
if ( p . length && ! p [ 0 ] . isOpen ) {
Original file line number Diff line number Diff line change @@ -636,7 +636,7 @@ class ChallengesService {
636
636
let contentType ;
637
637
let url ;
638
638
639
- if ( track === ' DESIGN' ) {
639
+ if ( track === COMPETITION_TRACKS . DESIGN ) {
640
640
( { api } = this . private ) ;
641
641
contentType = 'application/json' ;
642
642
url = '/submissions/' ; // The submission info is contained entirely in the JSON body
@@ -654,7 +654,7 @@ class ChallengesService {
654
654
} , onProgress ) . then ( ( res ) => {
655
655
const jres = JSON . parse ( res ) ;
656
656
// Return result for Develop submission
657
- if ( track === ' DEVELOP' ) {
657
+ if ( track === COMPETITION_TRACKS . DEVELOP ) {
658
658
return jres ;
659
659
}
660
660
// Design Submission requires an extra "Processing" POST
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ function filterByRegistrationOpen(challenge, state) {
89
89
if ( ! registrationPhase || ! registrationPhase . isOpen ) {
90
90
return false ;
91
91
}
92
- if ( challenge . track === ' DESIGN' ) {
92
+ if ( challenge . track === COMPETITION_TRACKS . DESIGN ) {
93
93
const checkpointPhase = challengePhases . find ( item => item . name === 'Checkpoint Submission' ) [ 0 ] ;
94
94
return ! checkpointPhase || ! checkpointPhase . isOpen ;
95
95
}
You can’t perform that action at this time.
0 commit comments