From 93d6dc284d82b497c88bfd4134cfbf56655440c8 Mon Sep 17 00:00:00 2001 From: Josh Habdas Date: Tue, 14 May 2024 11:03:25 -0400 Subject: [PATCH] fix: update in progress status logic --- .../checkin-report/CheckinReport.jsx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/web-ui/src/components/reports-section/checkin-report/CheckinReport.jsx b/web-ui/src/components/reports-section/checkin-report/CheckinReport.jsx index 83e88b5742..45f9c4996e 100644 --- a/web-ui/src/components/reports-section/checkin-report/CheckinReport.jsx +++ b/web-ui/src/components/reports-section/checkin-report/CheckinReport.jsx @@ -66,6 +66,20 @@ const CheckinsReport = ({ closed, pdl, planned, reportDate }) => { // Done when all PDL team members have completed check-ins if (allMembersCompleted) return 'Done'; + const anyMembersCompleted = members.some( + member => + statusForPeriodByMemberScheduling( + selectFilteredCheckinsForTeamMemberAndPDL( + state, + member.id, + id, + closed, + planned + ), + reportDate + ) === 'Completed' + ); + const anyInProgress = members.some( member => statusForPeriodByMemberScheduling( @@ -81,7 +95,7 @@ const CheckinsReport = ({ closed, pdl, planned, reportDate }) => { ); // In progress when there is at least one scheduled check-in - if (anyInProgress) return 'In Progress'; + if (anyMembersCompleted || anyInProgress) return 'In Progress'; // Not started when no check-ins are scheduled return 'Not Started';