-
Notifications
You must be signed in to change notification settings - Fork 0
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
updating ab chart stats TM-2409 #1909
Conversation
…aPhase-Consulting/State-TalentMap into update/available-bidders-chart-stats
@mjoyce91 when I click the "details" link for the |
…aPhase-Consulting/State-TalentMap into update/available-bidders-chart-stats
src/Components/AvailableBidder/AvailableBidderStats/AvailableBidderStats.jsx
Outdated
Show resolved
Hide resolved
@SidelineCory24 - just add an |
src/Components/AvailableBidder/AvailableBidderStats/AvailableBidderStats.jsx
Outdated
Show resolved
Hide resolved
const stats = get(biddersData, 'stats', {})[selectedStat] || []; | ||
const statsSum = get(biddersData, 'stats.Sum', {})[selectedStat] || 0; |
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.
👍
FE looks good, can approve once also working with back-end |
…aPhase-Consulting/State-TalentMap into update/available-bidders-chart-stats
const grades$ = grades.map(grade => ({ ...grade, code: grade.name })); | ||
grades$.sort(sortGrades); | ||
|
||
const stat = selectedStat === 'Grade' ? grades$ : stats; | ||
|
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 may be cleaner, and easier to understand that stats
are the statistics for a single section (opposed to all)
if (selectedStat === 'Grade') {
stats = stats.map(grade => ({ ...grade, code: grade.name }));
stats.sort(sortGrades);
}
@mjoyce91 or is modifying stats a big no-no?
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.
That's fine
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.
done
…aPhase-Consulting/State-TalentMap into update/available-bidders-chart-stats
|
||
// sorting grades to maintain consistency across the site | ||
if (selectedStat === 'Grade') { | ||
stats = stats.map(grade => ({ ...grade, code: grade.name })); |
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.
Nice job on making this an implicit return 🦜
BE PR
To-Do