Skip to content

Conversation

@mvolkmann
Copy link
Collaborator

No description provided.

VALUES
('01b7d769-9fa2-43ff-95c7-f3b950a27bf9', PGP_SYM_ENCRYPT('Gina','${aeskey}'), PGP_SYM_ENCRYPT('Bremehr','${aeskey}'), PGP_SYM_ENCRYPT('COO','${aeskey}'), PGP_SYM_ENCRYPT('St. Louis','${aeskey}'), PGP_SYM_ENCRYPT('bremehrg@objectcomputing.com','${aeskey}'), '12312345', '2012-09-20', PGP_SYM_ENCRYPT('Epitome of Strong Woman','${aeskey}'), null, '1988-09-21');

INSERT INTO member_profile -- Big Boss
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed some member_profile records so they have supervisorid values. This was needed to test some if the changes for this story.

import { Comment } from '@mui/icons-material';
import {
Avatar,
Button,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not used.

import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';

import { getAvatarURL, resolve } from '../api/api.js';
import Pulse from '../components/pulse/Pulse.jsx';
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not used.

// const ociOrange = '#f8b576'; // too light
const orange = '#b26801';

const ScoreOption = {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When viewing the 5 highest and lowest average scores, the user can choose between viewing only internal scores, only external scores, or a combination of internal and external scores.

const average = (arr) => arr.reduce((a, b) => a + b, 0) / arr.length;

// This creates data in the format that recharts needs from pulse data.
useEffect(() => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of data munging in this useEffect to prepare data for the line chart, the bar chart, and the five highest and lowest average scores.

setTeamMembers(state.memberProfiles);
}, [csrf, dateFrom, dateTo]);

const handleDateFromChange = dayJsDate => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These functions were not deleted, they were just moved down.

setTeamMembers(state.memberProfiles || []);
}, [csrf, state]);

const averageRow = scores => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This returns a single table row to be rendered in the tables of highest and lowest average scores.

setSelectedPulse(pulse);
setShowComments(true);
};
const averageScores = () => (
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This renders two dropdowns for specifying the kind of data to be displayed in the "Highest" and "Lowest" average score lists AND renders those two lists.

</Card>
);

const handleCommentClick = (pulse) => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the comment icon at the end of a row of pulse data is clicked, this function is called.
It triggers displaying the internal and external comments associated with that pulse entry in a modal dialog.

setDateTo(date);
};

const handleTeamMembersChange = members => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is used to change the set of team members selected in the MemberSelector component.

setTeamMembers(members);
};

const scoreCard = (highest) => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This renders a table of either the highest five average scores or the lowest five average scores based on the boolean passed in.

</Card>
);

const responseSummary = () => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This renders the responses that were used to drive the bar chart.

{lineChart()}
{averageScores()}
{barChart()}
<Modal open={showComments} onClose={() => setShowComments(false)}>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This dialog displays the internal and external comments associated with a selected pulse entry (by click its comment icon).

Copy link
Contributor

@S78901 S78901 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great.

const averages = averageData[memberId];
averages.externalAverage = average(averages.externalScores);
averages.internalAverage = average(averages.internalScores);
averages.combinedAverage = average([...averages.externalScores, ...averages.internalScores]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very elegant.

Copy link
Contributor

@vhscom vhscom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Very nice!

@mvolkmann mvolkmann merged commit 1ce2d6b into develop May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants