Skip to content

Commit

Permalink
2024-09-10 - Add supervisor as reviewer whenever adding a member, whe…
Browse files Browse the repository at this point in the history
…n the member has no reviewer
  • Loading branch information
Luch76 committed Sep 10, 2024
1 parent 2700c76 commit 9b2a3a9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions web-ui/src/components/reviews/TeamReviews.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,21 @@ const TeamReviews = ({ onBack, periodId }) => {
if (res.error) return;

setTeamMembers(teamMembers);
addAssignmentForMemberWithNone(teamMembers);
};

const addAssignmentForMemberWithNone = async (members) => {
members.forEach(member => {
const exists = assignments.some(
a => a.revieweeId === member.id
);
if (!!!exists && member.reviewerId) {
const reviewers = [{ id: member.reviewerId }];
updateReviewers(member, reviewers);
}
});
}

const getReviewStatus = useCallback(
teamMemberId => {
let reviewStates = { submitted: false, inProgress: false };
Expand Down

0 comments on commit 9b2a3a9

Please sign in to comment.