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

feat: [DHIS2-16782] Changelog sorting and filtering by user and data item #3934

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

henrikmv
Copy link
Contributor

@henrikmv henrikmv commented Jan 7, 2025

DHIS2-16782:

  • Implements sorting on User and Data item
  • Implements filtering on Data item (For the attributes: DataElement and Field)

@henrikmv henrikmv marked this pull request as ready for review January 13, 2025 18:58
@henrikmv henrikmv requested a review from a team as a code owner January 13, 2025 18:58
Copy link
Contributor

@simonadomnisoru simonadomnisoru left a 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
Copy link
Contributor

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
Copy link
Contributor

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');

@henrikmv henrikmv marked this pull request as draft January 15, 2025 13:46
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.

2 participants