-
Notifications
You must be signed in to change notification settings - Fork 21
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
Conversation
to be usable with any entity type, not just EducationalMaterial closes #2004
ea71024
to
b469686
Compare
Deployed to https://pr-2029.aam-digital.net/ |
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.
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", |
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.
Migration required
...re/entity-details/related-entities-with-summary/related-entities-with-summary.component.html
Outdated
Show resolved
Hide resolved
...core/entity-details/related-entities-with-summary/related-entities-with-summary.component.ts
Show resolved
Hide resolved
...core/entity-details/related-entities-with-summary/related-entities-with-summary.component.ts
Outdated
Show resolved
Hide resolved
...core/entity-details/related-entities-with-summary/related-entities-with-summary.component.ts
Outdated
Show resolved
Hide resolved
(e) => | ||
this.isArray | ||
? e[this.property].includes(this.entity.getId()) | ||
: e[this.property] === this.entity.getId(), | ||
); |
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.
Why do we need this now? Before this was covered through the filter below.
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 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
…ted-entities-with-summary.component.ts Co-authored-by: Simon <simon@aam-digital.com>
🎉 This PR is included in version 3.25.1-master.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 3.25.1-master.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 3.25.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
closes: #2004