@@ -26,15 +26,20 @@ function sortApplicantsByNormalizedScore(applicants: HackerApplicantSummary[]) {
2626 return { ...applicant , avgNormalizedScore : 0 } ;
2727
2828 const total = Object . values ( scores ) . reduce ( ( sum , val ) => sum + val , 0 ) ;
29- const avg = total / Object . keys ( scores ) . length ;
29+ let avg = total / Object . keys ( scores ) . length ;
30+ if ( applicant . application_data . extra_points )
31+ avg += applicant . application_data . extra_points ;
3032
3133 return { ...applicant , avgNormalizedScore : avg } ;
3234 } )
3335 . sort ( ( a , b ) => b . avgNormalizedScore - a . avgNormalizedScore ) ;
3436}
3537
3638const downloadCSV = (
37- data : ( HackerApplicantSummary & { avgNormalizedScore : number } ) [ ] ,
39+ data : ( HackerApplicantSummary & {
40+ avgNormalizedScore : number ;
41+ extraPoints ?: number ;
42+ } ) [ ] ,
3843) => {
3944 const headers = [ "Name" , "Email" , "Resume URL" , "Average Normalized Score" ] ;
4045 const rows = data . map ( ( a ) => [
@@ -58,7 +63,10 @@ const downloadCSV = (
5863} ;
5964
6065const ResumeModalButton = (
61- item : HackerApplicantSummary & { avgNormalizedScore : number } ,
66+ item : HackerApplicantSummary & {
67+ avgNormalizedScore : number ;
68+ extraPoints ?: number ;
69+ } ,
6270) => {
6371 const [ showResume , setShowResume ] = useState ( false ) ;
6472
0 commit comments