-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat: [DHIS2-16782] Changelog sorting and filtering by user and data item #3934
base: master
Are you sure you want to change the base?
feat: [DHIS2-16782] Changelog sorting and filtering by user and data item #3934
Conversation
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.
Hi @henrikmv, it looks good overall, I just added 2 small comments.
) => { | ||
const { dataElement, attribute, field } = change; | ||
const fieldId = dataElement ?? attribute ?? field; | ||
// Hjelpefunksjon for å hente riktig metadata |
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.
There are some comments and logs in Norwegian in this file. Can you please remove the comments and change the logs to English? Thank you!
@@ -32,22 +31,35 @@ export const useChangelogData = ({ | |||
setPageSize(newPageSize); | |||
}; | |||
|
|||
const filterParam = | |||
filterValue !== 'Show all' && attributeToFilterBy |
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.
The value sent from ChangelogFilterBar is SHOW_ALL
, so this check does not work correctly. The const initialization on line 24 should probably be changed to const [filterValue, setFilterValue] = useState('SHOW_ALL');
DHIS2-16782:
User
andData item
Data item
(For the attributes: DataElement and Field)