Changed handling of partner "All"#133
Conversation
Eb-Zeero
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @hettlage)
src/components/Filters.js, line 50 at r1 (raw file):
const { selectedPartner, selectedSemester, selectedPartnerStatsSemester, selectedLiaison } = filters const mayViewAll = user.roles.some(role => ['ADMINISTRATOR', 'BOARD', 'SALT_ASTRONOMER'].includes(role.type)); const partnerList = mayViewAll ? getPartnerList(user.roles) : getPartnerList(user.roles).filter(partner => partner !== ALL_PARTNER)
it seems like you are removing the "all" option if you can not view all and "all" option is need for statistics page
src/components/tables/PartnerSummaryStatTable.js, line 16 at r1 (raw file):
return ( <div className='SATableDiv'> <h2>Summary Statistics for {partner === 'All' ? 'All Partners' : partner}</h2>
don't we need to show which partner it is?
hettlage
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on @Eb-Zeero)
src/components/Filters.js, line 50 at r1 (raw file):
Previously, Eb-Zeero (Nhlavutelo Macebele) wrote…
it seems like you are removing the "all" option if you can not view all and "all" option is need for statistics page
I think I removed it as a stop-gap measure, as at least some of the stats only included the data of the user's partner, even if "All" was selected.
src/components/tables/PartnerSummaryStatTable.js, line 16 at r1 (raw file):
Previously, Eb-Zeero (Nhlavutelo Macebele) wrote…
don't we need to show which partner it is?
I don't quite remember why I removed it. Maybe because for most users there is only one partner, so the information is somewhat unnecessary (and redundant, as you have the dropdown menu showing it). Feel free to add it back!
This change is