File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
app/javascript/Components Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -563,6 +563,31 @@ class RawGroupsTable extends React.Component {
563563 filterable : false ,
564564 sortMethod : durationSort ,
565565 } ,
566+ {
567+ Header : "Penalty" ,
568+ id : "late_penalty_applied" ,
569+ accessor : "extension" ,
570+ Cell : row => {
571+ return row . original . extension . apply_penalty ? (
572+ < FontAwesomeIcon icon = "fa-solid fa-square-check" />
573+ ) : (
574+ < FontAwesomeIcon icon = "fa-solid fa-xmark" />
575+ ) ;
576+ } ,
577+ minWidth : 30 ,
578+ filterable : false ,
579+ sortMethod : ( a , b ) => {
580+ // Primary sort: boolean property (true first)
581+ if ( a . apply_penalty && ! b . apply_penalty ) {
582+ return - 1 ; // a (true) comes before b (false)
583+ }
584+ if ( ! a . apply_penalty && b . apply_penalty ) {
585+ return 1 ; // a (false) comes after b (true)
586+ }
587+ // Secondary sort: numeric property (ascending) if boolean properties are equal
588+ return durationSort ( a , b ) ;
589+ } ,
590+ } ,
566591 ] ;
567592
568593 static getDerivedStateFromProps ( props , state ) {
You can’t perform that action at this time.
0 commit comments