@@ -306,8 +306,146 @@ class SubmissionsComponent extends React.Component {
306
306
307
307
return (
308
308
< div className = { cn ( styles . container , styles . dev , styles [ 'non-mm' ] ) } >
309
- < div className = { styles [ 'top-title' ] } >
309
+ < div className = { styles [ 'empty-left' ] } />
310
+ < div className = { styles . submissionsContainer } >
311
+ < div className = { styles . head } >
312
+ { ! isF2F && ! isBugHunt && (
313
+ < button
314
+ type = 'button'
315
+ onClick = { ( ) => {
316
+ this . onSortChange ( {
317
+ field : 'Rating' ,
318
+ sort : field === 'Rating' ? revertSort : 'desc'
319
+ } )
320
+ } }
321
+ className = { cn ( styles [ 'col-2' ] , styles [ 'header-sort' ] ) }
322
+ >
323
+ < span > Rating</ span >
324
+ < div
325
+ className = { cn ( styles [ 'col-arrow' ] , {
326
+ [ styles [ 'col-arrow-sort-asc' ] ] :
327
+ field === 'Rating' && sort === 'asc' ,
328
+ [ styles [ 'col-arrow-is-sorting' ] ] : field === 'Rating'
329
+ } ) }
330
+ >
331
+ < ReactSVG path = { assets ( `${ ArrowDown } ` ) } />
332
+ </ div >
333
+ </ button >
334
+ ) }
335
+ < button
336
+ type = 'button'
337
+ onClick = { ( ) => {
338
+ this . onSortChange ( {
339
+ field : 'Username' ,
340
+ sort : field === 'Username' ? revertSort : 'desc'
341
+ } )
342
+ } }
343
+ className = { cn ( styles [ 'col-3' ] , styles [ 'header-sort' ] ) }
344
+ >
345
+ < span > Username</ span >
346
+ < div
347
+ className = { cn ( styles [ 'col-arrow' ] , {
348
+ [ styles [ 'col-arrow-sort-asc' ] ] : field === 'Username' && sort === 'asc' ,
349
+ [ styles [ 'col-arrow-is-sorting' ] ] : field === 'Username'
350
+ } ) }
351
+ >
352
+ < ReactSVG path = { assets ( `${ ArrowDown } ` ) } />
353
+ </ div >
354
+ </ button >
355
+ < button
356
+ type = 'button'
357
+ onClick = { ( ) => {
358
+ this . onSortChange ( {
359
+ field : 'Submission Date' ,
360
+ sort : field === 'Submission Date' ? revertSort : 'desc'
361
+ } )
362
+ } }
363
+ className = { cn ( styles [ 'col-4' ] , styles [ 'header-sort' ] ) }
364
+ >
365
+ < span > Submission Date</ span >
366
+ < div
367
+ className = { cn ( styles [ 'col-arrow' ] , {
368
+ [ styles [ 'col-arrow-sort-asc' ] ] : field === 'Submission Date' && sort === 'asc' ,
369
+ [ styles [ 'col-arrow-is-sorting' ] ] : field === 'Submission Date'
370
+ } ) }
371
+ >
372
+ < ReactSVG path = { assets ( `${ ArrowDown } ` ) } />
373
+ </ div >
374
+ </ button >
375
+ < button
376
+ type = 'button'
377
+ onClick = { ( ) => {
378
+ this . onSortChange ( {
379
+ field : 'Initial / Final Score' ,
380
+ sort : field === 'Initial / Final Score' ? revertSort : 'desc'
381
+ } )
382
+ } }
383
+ className = { cn ( styles [ 'col-5' ] , styles [ 'header-sort' ] ) }
384
+ >
385
+ < span > Initial / Final Score</ span >
386
+ < div
387
+ className = { cn ( 'col-arrow' , {
388
+ 'col-arrow-sort-asc' :
389
+ field === 'Initial / Final Score' && sort === 'asc' ,
390
+ 'col-arrow-is-sorting' : field === 'Initial / Final Score'
391
+ } ) }
392
+ >
393
+ < ReactSVG path = { assets ( `${ ArrowDown } ` ) } />
394
+ </ div >
395
+ </ button >
396
+ </ div >
397
+ { sortedSubmissions . map ( s => (
398
+ < div
399
+ key = { _ . get ( s . registrant , 'memberHandle' , '' ) + s . created }
400
+ className = { styles . row }
401
+ >
402
+ { ! isF2F && ! isBugHunt && (
403
+ < div
404
+ className = { cn ( styles [ 'col-2' ] , styles [ `level-${ getRatingLevel ( _ . get ( s . registrant , 'rating' , 0 ) ) } ` ] ) }
405
+ >
406
+ { s . registrant && ! _ . isNil ( s . registrant . rating )
407
+ ? s . registrant . rating
408
+ : '-' }
409
+ </ div >
410
+ ) }
411
+ < div className = { styles [ 'col-3' ] } >
412
+ < a
413
+ href = { `${ window . origin } /members/${ _ . get (
414
+ s . registrant ,
415
+ 'memberHandle' ,
416
+ ''
417
+ ) } `}
418
+ target = { `${
419
+ _ . includes ( window . origin , 'www' ) ? '_self' : '_blank'
420
+ } `}
421
+ rel = 'noopener noreferrer'
422
+ className = { cn (
423
+ styles [ 'handle' ] ,
424
+ styles [ `level-${ getRatingLevel ( _ . get ( s . registrant , 'rating' , 0 ) ) } ` ]
425
+ ) }
426
+ >
427
+ { _ . get ( s . registrant , 'memberHandle' , '' ) }
428
+ </ a >
429
+ </ div >
430
+ < div className = { styles [ 'col-4' ] } >
431
+ { moment ( s . created ) . format ( 'MMM DD, YYYY HH:mm' ) }
432
+ </ div >
433
+ < div className = { styles [ 'col-5' ] } >
434
+ < a href = { `${ SUBMISSION_REVIEW_APP_URL } /${ challenge . legacyId } /submissions/${ s . id } ` } target = '_blank' >
435
+ { ! _ . isEmpty ( s . review ) && s . review [ 0 ] . score
436
+ ? parseFloat ( s . review [ 0 ] . score ) . toFixed ( 2 )
437
+ : 'N/A' }
438
+ ‌ ‌/ ‌
439
+ { s . reviewSummation && s . reviewSummation [ 0 ] . aggregateScore
440
+ ? parseFloat ( s . reviewSummation [ 0 ] . aggregateScore ) . toFixed ( 2 )
441
+ : 'N/A' }
442
+ </ a >
443
+ </ div >
444
+ </ div >
445
+ ) ) }
446
+ </ div >
310
447
448
+ < div className = { styles [ 'top-title' ] } >
311
449
< div className = { styles . btnManageSubmissions } >
312
450
< PrimaryButton
313
451
text = 'Manage Submissions'
@@ -364,141 +502,6 @@ class SubmissionsComponent extends React.Component {
364
502
/>
365
503
</ div >
366
504
</ div >
367
- < div className = { styles . head } >
368
- { ! isF2F && ! isBugHunt && (
369
- < button
370
- type = 'button'
371
- onClick = { ( ) => {
372
- this . onSortChange ( {
373
- field : 'Rating' ,
374
- sort : field === 'Rating' ? revertSort : 'desc'
375
- } )
376
- } }
377
- className = { cn ( styles [ 'col-2' ] , styles [ 'header-sort' ] ) }
378
- >
379
- < span > Rating</ span >
380
- < div
381
- className = { cn ( styles [ 'col-arrow' ] , {
382
- [ styles [ 'col-arrow-sort-asc' ] ] :
383
- field === 'Rating' && sort === 'asc' ,
384
- [ styles [ 'col-arrow-is-sorting' ] ] : field === 'Rating'
385
- } ) }
386
- >
387
- < ReactSVG path = { assets ( `${ ArrowDown } ` ) } />
388
- </ div >
389
- </ button >
390
- ) }
391
- < button
392
- type = 'button'
393
- onClick = { ( ) => {
394
- this . onSortChange ( {
395
- field : 'Username' ,
396
- sort : field === 'Username' ? revertSort : 'desc'
397
- } )
398
- } }
399
- className = { cn ( styles [ 'col-3' ] , styles [ 'header-sort' ] ) }
400
- >
401
- < span > Username</ span >
402
- < div
403
- className = { cn ( styles [ 'col-arrow' ] , {
404
- [ styles [ 'col-arrow-sort-asc' ] ] : field === 'Username' && sort === 'asc' ,
405
- [ styles [ 'col-arrow-is-sorting' ] ] : field === 'Username'
406
- } ) }
407
- >
408
- < ReactSVG path = { assets ( `${ ArrowDown } ` ) } />
409
- </ div >
410
- </ button >
411
- < button
412
- type = 'button'
413
- onClick = { ( ) => {
414
- this . onSortChange ( {
415
- field : 'Submission Date' ,
416
- sort : field === 'Submission Date' ? revertSort : 'desc'
417
- } )
418
- } }
419
- className = { cn ( styles [ 'col-4' ] , styles [ 'header-sort' ] ) }
420
- >
421
- < span > Submission Date</ span >
422
- < div
423
- className = { cn ( styles [ 'col-arrow' ] , {
424
- [ styles [ 'col-arrow-sort-asc' ] ] : field === 'Submission Date' && sort === 'asc' ,
425
- [ styles [ 'col-arrow-is-sorting' ] ] : field === 'Submission Date'
426
- } ) }
427
- >
428
- < ReactSVG path = { assets ( `${ ArrowDown } ` ) } />
429
- </ div >
430
- </ button >
431
- < button
432
- type = 'button'
433
- onClick = { ( ) => {
434
- this . onSortChange ( {
435
- field : 'Initial / Final Score' ,
436
- sort : field === 'Initial / Final Score' ? revertSort : 'desc'
437
- } )
438
- } }
439
- className = { cn ( styles [ 'col-5' ] , styles [ 'header-sort' ] ) }
440
- >
441
- < span > Initial / Final Score</ span >
442
- < div
443
- className = { cn ( 'col-arrow' , {
444
- 'col-arrow-sort-asc' :
445
- field === 'Initial / Final Score' && sort === 'asc' ,
446
- 'col-arrow-is-sorting' : field === 'Initial / Final Score'
447
- } ) }
448
- >
449
- < ReactSVG path = { assets ( `${ ArrowDown } ` ) } />
450
- </ div >
451
- </ button >
452
- </ div >
453
- { sortedSubmissions . map ( s => (
454
- < div
455
- key = { _ . get ( s . registrant , 'memberHandle' , '' ) + s . created }
456
- className = { styles . row }
457
- >
458
- { ! isF2F && ! isBugHunt && (
459
- < div
460
- className = { cn ( styles [ 'col-2' ] , styles [ `level-${ getRatingLevel ( _ . get ( s . registrant , 'rating' , 0 ) ) } ` ] ) }
461
- >
462
- { s . registrant && ! _ . isNil ( s . registrant . rating )
463
- ? s . registrant . rating
464
- : '-' }
465
- </ div >
466
- ) }
467
- < div className = { styles [ 'col-3' ] } >
468
- < a
469
- href = { `${ window . origin } /members/${ _ . get (
470
- s . registrant ,
471
- 'memberHandle' ,
472
- ''
473
- ) } `}
474
- target = { `${
475
- _ . includes ( window . origin , 'www' ) ? '_self' : '_blank'
476
- } `}
477
- rel = 'noopener noreferrer'
478
- className = { cn (
479
- styles [ 'handle' ] ,
480
- styles [ `level-${ getRatingLevel ( _ . get ( s . registrant , 'rating' , 0 ) ) } ` ]
481
- ) }
482
- >
483
- { _ . get ( s . registrant , 'memberHandle' , '' ) }
484
- </ a >
485
- </ div >
486
- < div className = { styles [ 'col-4' ] } >
487
- { moment ( s . created ) . format ( 'MMM DD, YYYY HH:mm' ) }
488
- </ div >
489
- < div className = { styles [ 'col-5' ] } >
490
- < a href = { `${ SUBMISSION_REVIEW_APP_URL } /${ challenge . legacyId } /submissions/${ s . id } ` } target = '_blank' >
491
- { ! _ . isEmpty ( s . review ) && s . review [ 0 ] . score
492
- ? parseFloat ( s . review [ 0 ] . score ) . toFixed ( 2 )
493
- : 'N/A' }
494
- ‌ ‌/ ‌
495
- { s . reviewSummation && s . reviewSummation [ 0 ] . aggregateScore
496
- ? parseFloat ( s . reviewSummation [ 0 ] . aggregateScore ) . toFixed ( 2 )
497
- : 'N/A' }
498
- </ a >
499
- </ div >
500
- </ div >
501
- ) ) }
502
505
</ div >
503
506
)
504
507
}
0 commit comments