11import React , { useContext , useState } from 'react' ;
22import {
3- Accordion ,
4- AccordionSummary ,
53 Avatar ,
64 Chip ,
75 Typography ,
8- AccordionDetails ,
96 Box ,
107 Card ,
118 CardContent ,
129} from '@mui/material' ;
1310import { Link } from 'react-router-dom' ;
14- import ExpandMoreIcon from '@mui/icons-material/ExpandMore' ;
1511import { getAvatarURL } from '../../../api/api.js' ;
1612import { AppContext } from '../../../context/AppContext.jsx' ;
1713import { selectCheckinsForMember } from '../../../context/selectors.js' ;
@@ -54,8 +50,7 @@ const TeamMemberMap = ({ members, closed, planned, reportDate }) => {
5450 sortByName ( memberMap [ a . reportDatePDLId ] , memberMap [ b . reportDatePDLId ] ) ;
5551
5652 // We're going to cache the checkins into the member data structures so that
57- // we can properly sort by PDL when the PDL, in the past, is different than
58- // the current PDL.
53+ // we only have to do this once per member.
5954 const { startOfQuarter, endOfQuarter } = getQuarterBeginEnd ( reportDate ) ;
6055 members . map ( member => {
6156 member . checkins = selectCheckinsForMember (
@@ -67,8 +62,9 @@ const TeamMemberMap = ({ members, closed, planned, reportDate }) => {
6762
6863 // If there are checkins, we're going to sort them with the latest
6964 // first. Since the member's PDL could have changed since the last
70- // checkin, we are going to use the PDL id of the checkin instead
71- // of the current PDL. They may be the same, but again they may not.
65+ // checkin, we are going to use the PDL id of the checkin with the report
66+ // date range instead of the current PDL. They may be the same, but again
67+ // they may not.
7268 member . checkin = null ;
7369 member . reportDatePDLId = member . pdlId ;
7470 if ( member . checkins . length > 0 ) {
0 commit comments