File tree 1 file changed +4
-1
lines changed
src/shared/components/SubmissionManagement/SubmissionManagement
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import React from 'react';
19
19
import PT from 'prop-types' ;
20
20
import moment from 'moment' ;
21
21
import { PrimaryButton } from 'topcoder-react-ui-kit' ;
22
+ import { phaseEndDate } from 'utils/challenge-listing/helper' ;
22
23
import SubmissionsTable from '../SubmissionsTable' ;
23
24
24
25
import style from './styles.scss' ;
@@ -47,6 +48,8 @@ export default function SubmissionManagement(props) {
47
48
const currentPhase = challenge . phases
48
49
. filter ( p => p . name !== 'Registration' && p . isOpen )
49
50
. sort ( ( a , b ) => moment ( a . scheduledEndDate ) . diff ( b . scheduledEndDate ) ) [ 0 ] ;
51
+ const submissionPhase = challenge . phases . filter ( p => p . name === 'Submission' ) [ 0 ] ;
52
+ const submissionEndDate = submissionPhase && phaseEndDate ( submissionPhase ) ;
50
53
51
54
const now = moment ( ) ;
52
55
const end = moment ( currentPhase . scheduledEndDate ) ;
@@ -159,7 +162,7 @@ export default function SubmissionManagement(props) {
159
162
)
160
163
}
161
164
</ div >
162
- { now . isBefore ( challenge . submissionEndDate ) && (
165
+ { now . isBefore ( submissionEndDate ) && (
163
166
< div styleName = "btn-wrap" >
164
167
< PrimaryButton
165
168
theme = { {
You can’t perform that action at this time.
0 commit comments