Skip to content

Commit 090f256

Browse files
authored
Merge pull request #2712 from objectcomputing/release/0.8
Release/0.8 to develop
2 parents 2e4bac3 + 3a930a7 commit 090f256

File tree

7 files changed

+39
-8
lines changed

7 files changed

+39
-8
lines changed

server/src/main/java/com/objectcomputing/checkins/services/reviews/ReviewAssignmentController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public HttpResponse<ReviewAssignment> createReviewAssignment(@Body @Valid Review
6868
public List<ReviewAssignment> createReviewAssignment(@NotNull UUID reviewPeriodId,
6969
@Body List<@Valid ReviewAssignmentDTO> assignments) {
7070
List<ReviewAssignment> assignmentEntities = assignments.stream().map(ReviewAssignmentDTO::convertToEntity).toList();
71-
return reviewAssignmentServices.saveAll(reviewPeriodId, assignmentEntities, true);
71+
return reviewAssignmentServices.saveAll(reviewPeriodId, assignmentEntities, false);
7272
}
7373

7474
/**

web-ui/index.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,22 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<link rel="icon" href="favicon.ico" />
5+
<link rel="icon" href="/favicon.ico" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77
<meta name="theme-color" content="#000000" />
88
<meta
99
name="description"
1010
content="An open source team engagement platform"
1111
/>
12-
<link rel="apple-touch-icon" href="logo192.png" />
12+
<link rel="apple-touch-icon" href="/logo192.png" />
1313
<!--
1414
manifest.json provides metadata used when your web app is installed on a
1515
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
1616
-->
17-
<link rel="manifest" href="manifest.json" crossorigin="use-credentials" />
17+
<link rel="manifest" href="/manifest.json" crossorigin="use-credentials" />
1818
<!--
19+
The use of %PUBLIC_URL% in the tags above causes a "URI malformed" error.
20+
1921
Notice the use of %PUBLIC_URL% in the tags above.
2022
It will be replaced with the URL of the `public` folder during the build.
2123
Only files inside the `public` folder can be referenced from the HTML.

web-ui/public/favicon.ico

726 Bytes
Binary file not shown.

web-ui/public/logo192.png

2.21 KB
Loading

web-ui/public/logo512.png

13.2 KB
Loading

web-ui/src/components/reviews/TeamReviews.jsx

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,22 +239,46 @@ const TeamReviews = ({ onBack, periodId }) => {
239239
};
240240

241241
const updateTeamMembers = async teamMembers => {
242-
// First, create a set of team members, each with a default reviewer.
243-
const data = teamMembers.map(tm => ({
242+
// First, get the list of review assignements.
243+
let res = await getReviewAssignments(periodId, csrf);
244+
if (res.error) return;
245+
246+
// Match up the review assignments with the team members.
247+
const existing = res.payload.data
248+
.filter(a => teamMembers.find(m => m.id == a.revieweeId));
249+
250+
// Create a set of team members that do not yet have review assignments,
251+
// each with a default reviewer.
252+
const mem = teamMembers.filter(
253+
m => !existing.find(a => a.revieweeId == m.id)
254+
);
255+
const data = mem.map(tm => ({
244256
revieweeId: tm.id,
245257
reviewerId: tm.supervisorid,
246258
reviewPeriodId: periodId,
247259
approved: false
248260
}));
249261

250262
// Set those on the server as the review assignments.
251-
let res = await createReviewAssignments(periodId, data, csrf);
263+
res = await createReviewAssignments(periodId, data, csrf);
252264
if (res.error) return;
253265

254266
// Get the list of review assignments from the server to ensure that we are
255267
// reflecting what was actually created.
256268
res = await getReviewAssignments(periodId, csrf);
257-
const assignments = res.error ? [] : res.payload.data;
269+
let assignments = res.error ? [] : res.payload.data;
270+
271+
// Remove review assignments for members no longer selected.
272+
for(let assignment of assignments) {
273+
if (!teamMembers.find(m => m.id == assignment.revieweeId)) {
274+
// Delete review assignments if we do not have the matching member.
275+
await removeReviewAssignment(assignment.id, csrf);
276+
}
277+
}
278+
279+
// Get the review assignments from the server one more time.
280+
res = await getReviewAssignments(periodId, csrf);
281+
assignments = res.error ? [] : res.payload.data;
258282

259283
// Update our reactive assignment and member lists.
260284
setAssignments(assignments);

web-ui/src/pages/TeamSkillReportPage.jsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ const TeamSkillReportPage = () => {
8282
: undefined;
8383
}
8484
if (memberSkillsFound && memberProfiles) {
85+
// Filter the member skill down to only members that are not terminated.
86+
memberSkillsFound = memberSkillsFound.filter(
87+
mSkill => memberProfiles.find(member => member.id == mSkill.id)
88+
);
89+
8590
setAllSearchResults(memberSkillsFound);
8691
let membersSelected = memberSkillsFound.filter(mSkill =>
8792
selectedMembers.some(member => member.id === mSkill.id)

0 commit comments

Comments
 (0)