Skip to content

Commit b4d3b38

Browse files
committed
Cleanup from self-review.
1 parent a6516e2 commit b4d3b38

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

web-ui/src/components/reports-section/checkin-report/TeamMemberMap.jsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
import React, { useContext, useState } from 'react';
22
import {
3-
Accordion,
4-
AccordionSummary,
53
Avatar,
64
Chip,
75
Typography,
8-
AccordionDetails,
96
Box,
107
Card,
118
CardContent,
129
} from '@mui/material';
1310
import { Link } from 'react-router-dom';
14-
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
1511
import { getAvatarURL } from '../../../api/api.js';
1612
import { AppContext } from '../../../context/AppContext.jsx';
1713
import { 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) {

web-ui/src/components/reports-section/checkin-report/checkin-utils.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ export const getCheckinDateForPeriod = (checkins, reportDate) => {
4545

4646
/**
4747
* Determine check-in status for a member during the reporting period.
48-
* Include the grace period for the end of the quarter.
4948
* @param {Checkin} checkin - Latest Check-in for a member.
5049
* @param {Date} reportDate - The date of the report.
5150
* @returns {SchedulingStatus} The status of the check-ins.

web-ui/src/components/reports-section/checkin-report/checkin-utils.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ describe('statusForPeriodByMemberScheduling', () => {
173173
});
174174

175175
test('returns "Scheduled" when the check-in is within the reporting period are not completed', () => {
176-
console.log(mockReportDate);
177176
const checkin =
178177
{ checkInDate: [2024, 4, 10, 10, 0], completed: false }; // April 1, 2024 (within reporting period, not completed)
179178
const result = statusForPeriodByMemberScheduling(checkin, mockReportDate);

0 commit comments

Comments
 (0)