Skip to content

Commit 0c7bc38

Browse files
committed
Merge branch 'develop' into feature-2645/feedback-request-add-ability-to-request-feedback-from-external-source
2 parents 9aaf10b + ce2ec7b commit 0c7bc38

File tree

17 files changed

+266
-165
lines changed

17 files changed

+266
-165
lines changed

server/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plugins {
77
id "jacoco"
88
}
99

10-
version "0.8.5"
10+
version "0.8.6"
1111
group "com.objectcomputing.checkins"
1212

1313
repositories {

server/src/main/java/com/objectcomputing/checkins/services/reports/CompensationHistory.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ public class CompensationHistory extends CSVProcessor {
2323
public record Compensation(
2424
UUID memberId,
2525
LocalDate startDate,
26-
float amount
26+
String amount,
27+
String totalComp
2728
) {
2829
}
2930

@@ -45,11 +46,13 @@ protected void loadImpl(MemberProfileRepository memberProfileRepository,
4546
if (date == null) {
4647
LOG.error("Unable to parse date: {}", startDate);
4748
} else {
49+
String value = csvRecord.get("compensation");
4850
Compensation comp = new Compensation(
4951
memberProfile.get().getId(),
5052
date,
51-
Float.parseFloat(csvRecord.get("compensation")
52-
.replaceAll("[^\\d\\.,]", "")));
53+
value == null ? null : value.replaceAll("[^\\d\\.,]", ""),
54+
csvRecord.get("totalComp")
55+
);
5356
history.add(comp);
5457
}
5558
} else {

server/src/test/java/com/objectcomputing/checkins/services/reports/ReportDataControllerTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,10 @@ void validateReportData(JsonNode node, MemberProfile user) {
185185

186186
// Compensation History
187187
ArrayNode comp = (ArrayNode)node.get("compensationHistory");
188-
assertEquals(5, comp.size());
188+
assertEquals(10, comp.size());
189189
assertEquals(memberId, comp.get(0).get("memberId").asText());
190190
assertTrue(comp.get(0).get("amount").asDouble() > 0);
191+
assertFalse(comp.get(9).get("totalComp").asText().isEmpty());
191192

192193
// Current Information
193194
JsonNode curr = node.get("currentInformation");
Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1-
"emailAddress","startDate","compensation"
2-
"[email protected]","1/1/2024","100000.00"
3-
"[email protected]","1/1/2023","95000.00"
4-
"[email protected]","1/1/2022","90000.00"
5-
"[email protected]","1/1/2021","85000.00"
6-
"[email protected]","1/1/2020","80000.00"
7-
"[email protected]","2/1/2024","100000.00"
8-
"[email protected]","2/1/2023","95000.00"
9-
"[email protected]","2/1/2022","90000.00"
10-
"[email protected]","2/1/2021","85000.00"
11-
"[email protected]","2/1/2020","80000.00"
1+
"emailAddress","startDate","compensation","totalComp"
2+
"[email protected]","1/1/2024","100000.00",
3+
"[email protected]","1/1/2023","95000.00",
4+
"[email protected]","1/1/2022","90000.00",
5+
"[email protected]","1/1/2021","85000.00",
6+
"[email protected]","1/1/2020","80000.00",
7+
"[email protected]","2/1/2024","100000.00",
8+
"[email protected]","2/1/2023","95000.00",
9+
"[email protected]","2/1/2022","90000.00",
10+
"[email protected]","2/1/2021","85000.00",
11+
"[email protected]","2/1/2020","80000.00",
12+
"[email protected]","2024",,"103000.00"
13+
"[email protected]","2023",,"98000.00"
14+
"[email protected]","2022",,"93000.00"
15+
"[email protected]","2021",,"88000.00"
16+
"[email protected]","2020",,"83000.00"
17+
"[email protected]","2024",,"103000.00"
18+
"[email protected]","2023",,"98000.00"
19+
"[email protected]","2022",,"93000.00"
20+
"[email protected]","2021",,"88000.00"
21+
"[email protected]","2020",,"83000.00"

web-ui/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "web-ui",
3-
"version": "0.8.5",
3+
"version": "0.8.6",
44
"private": true,
55
"type": "module",
66
"dependencies": {
@@ -89,7 +89,7 @@
8989
"eslint-plugin-react-hooks": "^4.6.0",
9090
"eslint-plugin-vitest": "^0.5.4",
9191
"globals": "^15.0.0",
92-
"happy-dom": "^15.10.1",
92+
"happy-dom": "^15.10.2",
9393
"jest-fetch-mock": "^3.0.3",
9494
"jsdom": "^24.0.0",
9595
"msw": "^2.2.13",

web-ui/src/components/guild-results/EditGuildModal.jsx

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import {
1111
FormControlLabel,
1212
Modal,
1313
Switch,
14-
TextField
14+
TextField,
15+
Checkbox,
1516
} from '@mui/material';
1617
import Autocomplete from '@mui/material/Autocomplete';
1718
import './EditGuildModal.css';
@@ -166,18 +167,19 @@ const EditGuildModal = ({ guild = {}, open, onSave, onClose, headerText }) => {
166167
value={editedGuild.name ? editedGuild.name : ''}
167168
onChange={e => setGuild({ ...editedGuild, name: e.target.value })}
168169
/>
169-
{guild.id && <FormControlLabel
170-
control={
171-
<Switch
172-
checked={editedGuild.active}
173-
onChange={event => {
174-
const { checked } = event.target;
175-
setGuild({ ...editedGuild, active: checked });
176-
}}
177-
/>
178-
}
170+
{guild.id && (<>
171+
<Checkbox
172+
id="guild-active-input"
179173
label="Active"
180-
/>}
174+
variant="outlined"
175+
className="halfWidth"
176+
checked={editedGuild.active ? editedGuild.active : false}
177+
onChange={event => {
178+
const { checked } = event.target;
179+
setGuild({ ...editedGuild, active: checked });
180+
}}
181+
/> Active
182+
</>)}
181183
</div>
182184
<div>
183185
<FormControlLabel

web-ui/src/components/guild-results/EditGuildModal.spec.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,14 @@ const testGuild = {
3434
guildMembers: [
3535
{ id: 125, name: 'Guild Member' },
3636
{ id: 126, name: 'Other Member' }
37-
]
37+
],
38+
active: true,
3839
};
3940

4041
const emptyGuild = {
4142
name: 'Test Guild',
42-
description: 'A guild used for testing.'
43+
description: 'A guild used for testing.',
44+
active: true,
4345
};
4446

4547
const currentUserProfile = {

web-ui/src/components/kudos_dialog/KudosDialog.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { AppContext } from '../../context/AppContext';
2929
import {
3030
selectCsrfToken,
3131
selectCurrentUser,
32-
selectNormalizedTeams,
32+
selectActiveTeams,
3333
selectOrderedCurrentMemberProfiles,
3434
selectProfile
3535
} from '../../context/selectors';
@@ -65,7 +65,7 @@ const KudosDialog = ({ open, recipient, teamId, onClose }) => {
6565
);
6666

6767
const currentUser = selectCurrentUser(state);
68-
const teams = selectNormalizedTeams(state, '');
68+
const teams = selectActiveTeams(state);
6969
const memberProfiles = selectOrderedCurrentMemberProfiles(state);
7070

7171
const handleSubmit = useCallback(() => {

web-ui/src/components/member_selector/member_selector_dialog/MemberSelectorDialog.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ import { AppContext } from '../../../context/AppContext';
3737
import {
3838
selectCsrfToken,
3939
selectCurrentMembers,
40-
selectGuilds,
40+
selectActiveGuilds,
4141
selectMappedUserRoles,
4242
selectRoles,
4343
selectSkills,
4444
selectSubordinates,
4545
selectSupervisors,
4646
selectTeamMembersBySupervisorId,
47-
selectTeams
47+
selectActiveTeams,
4848
} from '../../../context/selectors';
4949
import { UPDATE_TOAST } from '../../../context/actions';
5050
import { getMembersByTeam } from '../../../api/team';
@@ -172,14 +172,14 @@ const MemberSelectorDialog = ({
172172
const getFilterOptions = () => {
173173
switch (filterType) {
174174
case FilterType.TEAM:
175-
const teams = selectTeams(state);
175+
const teams = selectActiveTeams(state);
176176
return {
177177
options: teams,
178178
label: team => team.name,
179179
equals: (team1, team2) => team1.id === team2.id
180180
};
181181
case FilterType.GUILD:
182-
const guilds = selectGuilds(state);
182+
const guilds = selectActiveGuilds(state);
183183
return {
184184
options: guilds,
185185
label: guild => guild.name,

web-ui/src/components/member_selector/member_selector_dialog/MemberSelectorDialog.spec.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ const testGuild = {
3939
name: 'Test Guild',
4040
description: 'A guild used for testing.',
4141
guildLeads: [{ id: 124, name: managerProfile.name }],
42-
guildMembers: []
42+
guildMembers: [],
43+
active: true,
4344
};
4445

4546
const initialState = {

0 commit comments

Comments
 (0)