Skip to content
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

Changed handling of partner "All" #133

Open
wants to merge 3 commits into
base: development
Choose a base branch
from

Conversation

hettlage
Copy link
Contributor

@hettlage hettlage commented Dec 3, 2019

This change is Reviewable

Copy link
Collaborator

@Eb-Zeero Eb-Zeero left a comment

Choose a reason for hiding this comment

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

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?

Copy link
Contributor Author

@hettlage hettlage left a comment

Choose a reason for hiding this comment

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

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!

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.

2 participants