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

Total value column on distribution -- make it total in category if filtering by category, total of item if filtering by item #4914

Open
2 tasks
cielf opened this issue Jan 5, 2025 · 2 comments

Comments

@cielf
Copy link
Collaborator

cielf commented Jan 5, 2025

Summary

Make the total value in the distribution page be the total value for items in the category if filtering by category
Make the total value in the distribution page be the total value for the selected item if filtering by item

Why?

Matches up with the number of items column where we do the same thing

Details

To get to this screen: login as [email protected]
then click Distributions
Note the number of items and values
the filter by item category
The number of items column changes to match items in the distributions that are in the item category
The total values column doesn't.

Similarly for filtering by items.

When subsetting the distributions according to what items they contain (either by item category or by item), the values in the total values heading should reflect only those items, and the header should match.

That means:

When filtering by item category, the total values column heading should change to "Total Value for category [category name]", and the values in it (including the totals) should be the totals for only the items in the item category chosen.

When filtering by item , the total values column heading should change to "Total Value of [item name]", and the values in it (including the totals) should be the totals for only the item chosen.

Should someone choose to filter by both, use the headers as if they were filtering by item. This makes sense because there will be at most the items belonging to that item (you see, there may be no overlap between the category and the item if both were chosen, in which case there would be no distriibutions in the filter.)

Criteria for completion

  • behaviour as described above
  • tests to support the behaviour
@nozomirin
Copy link
Contributor

I would like to take this.

@cielf
Copy link
Collaborator Author

cielf commented Jan 6, 2025

Please do.

@github-actions github-actions bot removed the Help Wanted Groomed + open to all! label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants