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

Generalized RelatedEntitiesWithSummary (from EducationalMaterialComponent) #2029

Merged
merged 7 commits into from
Oct 16, 2023

Conversation

sleidig
Copy link
Member

@sleidig sleidig commented Oct 13, 2023

closes: #2004

@github-actions
Copy link

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

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.

Nice generalisation. Functionality is fine but I left some comments about the code quality.

@@ -706,14 +706,24 @@ export const defaultJsonConfig = {
"components": [
{
"title": "",
"component": "EducationalMaterial",
"component": "RelatedEntitiesWithSummary",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Migration required

Comment on lines +68 to +72
(e) =>
this.isArray
? e[this.property].includes(this.entity.getId())
: e[this.property] === this.entity.getId(),
);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we need this now? Before this was covered through the filter below.

Copy link
Member Author

Choose a reason for hiding this comment

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

The filter is passed as input and applied internally in entity-subrecord-component only, results do not change the data in the parent component (related-entities / related-entities-with-summary). The summary was therefore not limited to records related to the given entity.
This is not a perfect architecture here, filtering the same at two places ... but we may replace this by loading data from an index in the future. And it might also improve performance to pass a more limited initial data set to entity-subrecord

@sleidig sleidig merged commit 616fc9d into master Oct 16, 2023
5 of 6 checks passed
@sleidig sleidig deleted the generalize-ed-mat branch October 16, 2023 11:41
@aam-digital-ci
Copy link
Collaborator

🎉 This PR is included in version 3.25.1-master.2 🎉

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 Oct 18, 2023
@aam-digital-ci
Copy link
Collaborator

🎉 This PR is included in version 3.25.1-master.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@aam-digital-ci
Copy link
Collaborator

🎉 This PR is included in version 3.25.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 Oct 18, 2023
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.

extend the total calculations below a subrecord list (generalize educational-material component)
3 participants