@@ -128,6 +128,19 @@ export default class Registrants extends React.Component {
128
128
return final ;
129
129
}
130
130
131
+ /**
132
+ * Get the submission date of a registrant (used when viewing the registrants tab anonymously)
133
+ * @param {Object } registrant the registrant to return the submission date for
134
+ */
135
+ getSubmissionDate ( registrant , statisticsData ) {
136
+ let submissionDate ;
137
+ const statistic = ( statisticsData || [ ] ) . find ( x => x . handle === registrant . memberHandle )
138
+ if ( statistic && statistic . submissions && statistic . submissions . length > 0 ) {
139
+ submissionDate = statistic . submissions . sort ( ) [ 0 ] . created ;
140
+ }
141
+ return submissionDate ;
142
+ }
143
+
131
144
/**
132
145
* Check if it have flag for first try
133
146
* @param {Object } registrant registrant info
@@ -244,6 +257,7 @@ export default class Registrants extends React.Component {
244
257
checkpointResults,
245
258
results,
246
259
onSortChange,
260
+ statisticsData,
247
261
} = this . props ;
248
262
const {
249
263
prizeSets,
@@ -413,7 +427,10 @@ export default class Registrants extends React.Component {
413
427
if ( checkpoint ) {
414
428
checkpoint = formatDate ( checkpoint ) ;
415
429
}
416
- const final = this . getFinal ( r ) ;
430
+ let final = this . getFinal ( r ) ;
431
+ if ( ! final ) {
432
+ final = this . getSubmissionDate ( r , statisticsData ) ;
433
+ }
417
434
418
435
return (
419
436
< div styleName = "row" key = { r . memberHandle } role = "row" >
@@ -523,6 +540,7 @@ Registrants.propTypes = {
523
540
type : PT . string ,
524
541
track : PT . string ,
525
542
} ) . isRequired ,
543
+ statisticsData : PT . arrayOf ( PT . shape ( ) ) ,
526
544
results : PT . arrayOf ( PT . shape ( ) ) ,
527
545
checkpointResults : PT . shape ( ) ,
528
546
registrants : PT . arrayOf ( PT . shape ( ) ) ,
0 commit comments