@@ -846,7 +846,6 @@ function Index({
846846 darkMode,
847847} ) {
848848 const colors = [ 'purple' , 'green' , 'navy' ] ;
849- const hoursLogged = ( summary . totalSeconds [ weekIndex ] || 0 ) / 3600 ;
850849 const tangibleHoursLogged = ( summary . totalTangibleSeconds ?. [ weekIndex ] || 0 ) / 3600 ;
851850 const currentDate = moment . tz ( TZ ) . startOf ( 'day' ) ;
852851 const [ setTrophyFollowedUp ] = useState ( summary ?. trophyFollowedUp ) ;
@@ -1092,23 +1091,31 @@ function Index({
10921091 ) ;
10931092}
10941093
1095- // FormattedReport.propTypes = {
1096- // // eslint-disable-next-line react/forbid-prop-types
1097- // summaries: PropTypes.arrayOf(PropTypes.object).isRequired,
1098- // weekIndex: PropTypes.number.isRequired,
1099-
1100- // // Adding these to clarify structure for Sonar:
1101- // // summary: PropTypes.shape({
1102- // // _id: PropTypes.string,
1103- // // filterColor: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),
1104- // // promisedHoursByWeek: PropTypes.arrayOf(PropTypes.number),
1105- // // weeklySummaries: PropTypes.arrayOf(
1106- // // PropTypes.shape({
1107- // // summary: PropTypes.string,
1108- // // }),
1109- // // ),
1110- // // }),
1111- // };
1094+ Index . propTypes = {
1095+ summary : PropTypes . shape ( {
1096+ _id : PropTypes . string ,
1097+ firstName : PropTypes . string ,
1098+ lastName : PropTypes . string ,
1099+ role : PropTypes . string ,
1100+ totalSeconds : PropTypes . arrayOf ( PropTypes . number ) ,
1101+ totalTangibleSeconds : PropTypes . arrayOf ( PropTypes . number ) ,
1102+ promisedHoursByWeek : PropTypes . arrayOf ( PropTypes . number ) ,
1103+ filterColor : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . arrayOf ( PropTypes . string ) ] ) ,
1104+ adminLinks : PropTypes . array ,
1105+ startDate : PropTypes . string ,
1106+ endDate : PropTypes . string ,
1107+ trophyFollowedUp : PropTypes . bool ,
1108+ timeOffFrom : PropTypes . string ,
1109+ timeOffTill : PropTypes . string ,
1110+ } ) . isRequired ,
1111+ weekIndex : PropTypes . number . isRequired ,
1112+ allRoleInfo : PropTypes . array ,
1113+ auth : PropTypes . object ,
1114+ loadTrophies : PropTypes . bool ,
1115+ handleSpecialColorDotClick : PropTypes . func ,
1116+ isFinalWeek : PropTypes . bool ,
1117+ darkMode : PropTypes . bool ,
1118+ } ;
11121119
11131120FormattedReport . propTypes = {
11141121 summaries : PropTypes . arrayOf (
0 commit comments