@@ -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
@@ -163,7 +171,7 @@ function Scores() {
163171 id : "index" ,
164172 header : "#" ,
165173 cell : ( item ) => item . rowIndex ,
166- width : 60 ,
174+ width : 40 ,
167175 } ,
168176 {
169177 id : "name" ,
@@ -179,6 +187,7 @@ function Scores() {
179187 id : "resume" ,
180188 header : "Resume" ,
181189 cell : ResumeModalButton ,
190+ minWidth : 350 ,
182191 } ,
183192 {
184193 id : "avgScore" ,
0 commit comments