Skip to content

Commit

Permalink
2024-09-12 - When reviewers are assigned, they are added with 'approv…
Browse files Browse the repository at this point in the history
…ed' as false by default
  • Loading branch information
Luch76 committed Sep 12, 2024
1 parent 1d6eacd commit 9196337
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions web-ui/src/components/reviews/TeamReviews.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ const TeamReviews = ({ onBack, periodId }) => {
revieweeId: tm.id,
reviewerId: tm.supervisorid,
reviewPeriodId: periodId,
approved: true
approved: false
}));

const res = await resolve({
Expand All @@ -251,7 +251,7 @@ const TeamReviews = ({ onBack, periodId }) => {
);
if (!!!exists && member.supervisorid) {
const reviewers = [{ id: member.supervisorid }];
updateReviewers(member, reviewers, true);
updateReviewers(member, reviewers);
}
});
}
Expand Down Expand Up @@ -689,7 +689,7 @@ const TeamReviews = ({ onBack, periodId }) => {
return compare;
});

const updateReviewers = async (member, reviewers, addAsApproved) => {
const updateReviewers = async (member, reviewers) => {
const memberId = member.id;

let newAssignments = [...assignments];
Expand All @@ -707,8 +707,7 @@ const TeamReviews = ({ onBack, periodId }) => {
newAssignments.push({
reviewPeriodId: periodId,
reviewerId: reviewer.id,
revieweeId: member.id,
approved: addAsApproved,
revieweeId: member.id
});
}
}
Expand Down Expand Up @@ -1058,7 +1057,7 @@ const TeamReviews = ({ onBack, periodId }) => {
selectedMembers={selectedReviewers}
onClose={closeReviewerDialog}
onSubmit={reviewers => {
updateReviewers(selectedMember, reviewers, null);
updateReviewers(selectedMember, reviewers);
closeReviewerDialog();
}}
/>
Expand Down

0 comments on commit 9196337

Please sign in to comment.