-
Notifications
You must be signed in to change notification settings - Fork 4
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
Conversation
|
||
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'); |
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 does a case-ignore sort
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 looks really nice 👍🏽
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.
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"> |
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.
Could these elements be refactored to avoid code duplication? They look pretty similar to me.
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.
I definitely want to do this long term, let me see how much work it would be.
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.
It wasn't too challenging, I created two new components.
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.