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

Inactive records in entity select #2056

Merged
merged 27 commits into from
Feb 2, 2024
Merged

Conversation

christophscheuing
Copy link
Contributor

@christophscheuing christophscheuing commented Oct 26, 2023

Closes #1983

Functionality already there, but still working on the tests.

@github-actions
Copy link

Deployed to https://pr-2056.aam-digital.net/

@christophscheuing
Copy link
Contributor Author

Unfortunately making the message "None, but XX inactive found" itself clickable hasn't worked out. But UI-wise it should also be OK if this message is only a non-clickable hint and if the user has to click on the option with the checkbox in the entry below.

@christophscheuing christophscheuing marked this pull request as ready for review November 9, 2023 16:27
Copy link
Collaborator

@TheSlimvReal TheSlimvReal left a comment

Choose a reason for hiding this comment

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

The functionality already looks good. But I would have a little wish-list to make the component a little clearer

  • I don't see a reason why the filter function every time applies the additionalFilter and the isSelected check. This rarely changes. Can we instead create a relevantEntities property that only holds the entities which pass these two checks, so the filter function only does the filtering based on the search term.
  • I don't like the multiple calls of the getNumberOfInactive function and also the complicated way to get this number. Let's rather have two arrays filteredEntities which holds the actually displayed entities (as it is currently) and inactiveFilteredEntities which only holds the inactive ones that match the filter. Both are calculated based on the relevantEntities, as described before, inside the filter function. This way we drastically remove the amount of times this has to be calculated and it also makes the code a little more straight forward.

Let me know if you need more details.

@sleidig sleidig requested a review from TheSlimvReal January 4, 2024 16:28
Copy link
Member

@sleidig sleidig left a comment

Choose a reason for hiding this comment

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

@christophscheuing thanks for implementing this! Looks pretty good to me now. I had a few questions and small remarks still, however.

# Conflicts:
#	src/app/core/common-components/entity-select/entity-select.component.spec.ts
#	src/app/core/common-components/entity-select/entity-select.component.ts
Copy link
Member

@sleidig sleidig left a comment

Choose a reason for hiding this comment

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

Great 👍

@sleidig sleidig merged commit 4b434fe into master Feb 2, 2024
7 checks passed
@sleidig sleidig deleted the inactive_records_in_entity_select branch February 2, 2024 22:05
@aam-digital-ci
Copy link
Collaborator

🎉 This PR is included in version 3.31.1-master.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@aam-digital-ci aam-digital-ci added the released on @master managed by CI (semantic-release) label Feb 2, 2024
@aam-digital-ci
Copy link
Collaborator

🎉 This PR is included in version 3.31.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@aam-digital-ci aam-digital-ci added the released managed by CI (semantic-release) label Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released on @master managed by CI (semantic-release) released managed by CI (semantic-release)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Entity Selection should by default hide inactive records
4 participants