@@ -73,15 +73,53 @@ export default function ChallengeViewSelector(props) {
7373 { field : 'Submitted Date' , sort : 'asc' , name : 'Submitted Date: Old to New' } ,
7474 ] ;
7575
76+ const MarathonSortOptions = [
77+ { field : 'Final Rank' , sort : 'desc' , name : 'Final Rank: High to Low' } ,
78+ { field : 'Final Rank' , sort : 'asc' , name : 'Final Rank: Low to High' } ,
79+ { field : 'Provisional Rank' , sort : 'desc' , name : 'Provisional Rank: High to Low' } ,
80+ { field : 'Provisional Rank' , sort : 'asc' , name : 'Provisional Rank: Low to High' } ,
81+ { field : 'Rating' , sort : 'desc' , name : 'Rating: High to Low' } ,
82+ { field : 'Rating' , sort : 'asc' , name : 'Rating: Low to High' } ,
83+ { field : 'Username' , sort : 'asc' , name : 'Username' } ,
84+ { field : 'Final Score' , sort : 'desc' , name : 'Final Score: High to Low' } ,
85+ { field : 'Final Score' , sort : 'asc' , name : 'Final Score: Low to High' } ,
86+ { field : 'Provisional Score' , sort : 'desc' , name : 'Provisional Score: High to Low' } ,
87+ { field : 'Provisional Score' , sort : 'asc' , name : 'Provisional Score: Low to High' } ,
88+ { field : 'Submission Date' , sort : 'desc' , name : 'Submission Date: New to Old' } ,
89+ { field : 'Submission Date' , sort : 'asc' , name : 'Submission Date: Old to New' } ,
90+ ] ;
91+
92+ const MySubmissionsSortOptions = [
93+ { field : 'Submission ID' , sort : 'desc' , name : 'Submission ID: High to Low' } ,
94+ { field : 'Submission ID' , sort : 'asc' , name : 'Submission ID: Low to High' } ,
95+ { field : 'Status' , sort : 'desc' , name : 'Status: High to Low' } ,
96+ { field : 'Status' , sort : 'asc' , name : 'Status: Low to High' } ,
97+ { field : 'Final' , sort : 'desc' , name : 'Final Score: High to Low' } ,
98+ { field : 'Final' , sort : 'asc' , name : 'Final Score: Low to High' } ,
99+ { field : 'Provision' , sort : 'desc' , name : 'Provisional Score: High to Low' } ,
100+ { field : 'Provision' , sort : 'asc' , name : 'Provisional Score: Low to High' } ,
101+ { field : 'Time' , sort : 'desc' , name : 'Time: New to Old' } ,
102+ { field : 'Time' , sort : 'asc' , name : 'Time: Old to New' } ,
103+ ] ;
104+
76105 if ( isF2F || isBugHunt ) {
77106 SubmissionSortOptions = SubmissionSortOptions . slice ( 2 ) ;
78107 }
79108
109+ if ( isMM ) {
110+ SubmissionSortOptions = MarathonSortOptions ;
111+ }
112+
80113 if ( isDesign ) {
81114 RegistrationSortOptions = RegistrationSortOptions . slice ( 2 ) ;
82115 }
83116
84- const sortOptions = currentSelected === 'submissions' ? SubmissionSortOptions : RegistrationSortOptions ;
117+ let sortOptions = currentSelected === DETAIL_TABS . SUBMISSIONS
118+ ? SubmissionSortOptions : RegistrationSortOptions ;
119+
120+ if ( currentSelected === DETAIL_TABS . MY_SUBMISSIONS ) {
121+ sortOptions = MySubmissionsSortOptions ;
122+ }
85123
86124 const numOfSub = numOfSubmissions + ( numOfCheckpointSubmissions || 0 ) ;
87125 const forumId = _ . get ( challenge , 'legacy.forumId' ) || 0 ;
@@ -277,8 +315,10 @@ export default function ChallengeViewSelector(props) {
277315 </ React . Fragment >
278316 ) ;
279317
280- const isSubmissionTabSelected = ( isDesign && ! ( challenge . submissionViewable === 'true' ) ) ? currentSelected === 'registrants'
281- : currentSelected === 'submissions' || currentSelected === 'registrants' ;
318+ const isSubmissionTabSelected = ( isDesign && ! ( challenge . submissionViewable === 'true' ) ) ? currentSelected === DETAIL_TABS . REGISTRANTS
319+ : currentSelected === DETAIL_TABS . SUBMISSIONS
320+ || currentSelected === DETAIL_TABS . REGISTRANTS
321+ || currentSelected === DETAIL_TABS . MY_SUBMISSIONS ;
282322
283323 return (
284324 < div
0 commit comments