-
Notifications
You must be signed in to change notification settings - Fork 2
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
Dhis2 18142/category option group forms #422
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for dhis2-maintenance-app-beta ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
...DEFAULT_FIELD_FILTERS, | ||
'name', | ||
'shortName', | ||
'code', | ||
'description', | ||
'categoryOptions[id,displayName]', | ||
'dataDimension', | ||
'dataDimensionType', | ||
'attributeValues[value,attribute[id]]', |
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.
Minor, but can we use the constant ATTRIBUTE_VALUES_FIELD_FILTERS
. eg.
...DEFAULT_FIELD_FILTERS, | |
'name', | |
'shortName', | |
'code', | |
'description', | |
'categoryOptions[id,displayName]', | |
'dataDimension', | |
'dataDimensionType', | |
'attributeValues[value,attribute[id]]', | |
...DEFAULT_FIELD_FILTERS, | |
...ATTRIBUTE_VALUES_FIELD_FILTERS, | |
'name', | |
'shortName', | |
'code', | |
'description', | |
'categoryOptions[id,displayName]', | |
'dataDimension', | |
'dataDimensionType', |
export type CategoryFormValues = PickWithFieldFilters< | ||
Category, | ||
typeof fieldFilters |
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.
Please update name and Category
import to CategoryOptionGroup
.
fields: fieldFilters.concat(), | ||
}, | ||
} | ||
const categoryQuery = useQuery({ |
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.
Same here; let's keep this categoryOptionGroupQuery
and the same for related types.
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 good, just some minor remnants from copy-pasting (which is perfectly valid here btw!).
Can you also add an entry for categoryOptionGroup
to sectionListViewsConfig
?
I think it makes sense to have much of the same config as category
, but without categoryCombo
as a filter.
After #423 is merged, we could also add categoryOption
as a filter.
No description provided.