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

[DT-778] Filter by Data Access Committee #2720

Merged
merged 3 commits into from
Nov 8, 2024
Merged

Conversation

fboulnois
Copy link
Contributor

Addresses

https://broadworkbench.atlassian.net/browse/DT-778

Summary

Adds a filter for the Data Access Committee

Screen.Recording.2024-11-07.at.4.40.07.PM.mov

Have you read Terra's Contributing Guide lately? If not, do that first.

  • Label PR with a Jira ticket number and include a link to the ticket
  • Label PR with a security risk modifier [no, low, medium, high]
  • PR describes scope of changes
  • Get a minimum of one thumbs worth of review, preferably two if enough team members are available
  • Get PO sign-off for all non-trivial UI or workflow changes
  • Verify all tests go green
  • Test this change deployed correctly and works on dev environment after deployment

@fboulnois fboulnois requested a review from a team as a code owner November 7, 2024 21:41
@fboulnois fboulnois requested review from rushtong and s-rubenstein and removed request for a team November 7, 2024 21:41

export const DatasetFilterList = (props) => {
const { datasets, filters, filterHandler, isFiltered } = props;

const accessManagementFilters = uniq(compact(datasets.map((dataset) => dataset.accessManagement)));
const dataUseFilters = uniq(compact(flatten(datasets.map((dataset) => dataset.dataUse?.primary))).map((dataUse) => dataUse.code));
const dacFilters = orderBy(uniq(compact(datasets.map((dataset) => dataset?.dac?.dacName))), (dac) => dac.toLowerCase(), 'asc');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this does a case-ignore sort

Copy link
Contributor

@rushtong rushtong left a comment

Choose a reason for hiding this comment

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

This looks really nice 👍🏽

Copy link
Member

@pshapiro4broad pshapiro4broad left a comment

Choose a reason for hiding this comment

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

Looks OK, just a few minor comments

@@ -64,6 +65,27 @@ export const DatasetFilterList = (props) => {
})
}
</List>
<Typography variant="h6" gutterBottom component="div" sx={{ fontFamily: 'Montserrat' }} marginTop="1em">
Copy link
Member

Choose a reason for hiding this comment

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

Could these elements be refactored to avoid code duplication? They look pretty similar to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I definitely want to do this long term, let me see how much work it would be.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It wasn't too challenging, I created two new components.

@fboulnois fboulnois merged commit 1c14014 into develop Nov 8, 2024
9 checks passed
@fboulnois fboulnois deleted the fb-dt-778-dac-filter branch November 8, 2024 18:22
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.

3 participants