-
Notifications
You must be signed in to change notification settings - Fork 6
Feature 2416 pulse high scores #2434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| 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 |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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'; |
There was a problem hiding this comment.
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 = { |
There was a problem hiding this comment.
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(() => { |
There was a problem hiding this comment.
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 => { |
There was a problem hiding this comment.
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 => { |
There was a problem hiding this comment.
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 = () => ( |
There was a problem hiding this comment.
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) => { |
There was a problem hiding this comment.
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 => { |
There was a problem hiding this comment.
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) => { |
There was a problem hiding this comment.
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 = () => { |
There was a problem hiding this comment.
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)}> |
There was a problem hiding this comment.
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).
S78901
left a comment
There was a problem hiding this 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]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very elegant.
vhscom
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Very nice!
No description provided.