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

Notes of schools and authors #1431

Merged
merged 7 commits into from
Sep 19, 2022
Merged

Notes of schools and authors #1431

merged 7 commits into from
Sep 19, 2022

Conversation

TheSlimvReal
Copy link
Collaborator

@TheSlimvReal TheSlimvReal commented Sep 7, 2022

see #1423

The current NotesOfChild component only allows to show notes that are linked to a child.
This component has been made more abstract to also support notes of a school or notes of an author.

Currently the component is still called NotesOfChild. This name should be changed in the future to something like RelatedNotes. I have left it for now because I want to get this PR out fast and a change of the name would require a migration of existing configs.

Visible/Frontend Changes

--

Architectural/Backend Changes

  • NotesOfChild can be used in school and user details components

@github-actions
Copy link

github-actions bot commented Sep 7, 2022

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.

looks straight forward and works well 💯

In the long run, connected to #1056 we may want to further generalize the linking and indexing but this is awesome as a quick win!

Comment on lines +63 to +67
this.entity = config.entity;
const entityType = this.entity.getType();
this.noteProperty = [...Note.schema.keys()].find(
(prop) => Note.schema.get(prop).additional === entityType
);
Copy link
Member

Choose a reason for hiding this comment

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

impressive solution 😃 took me a second to even understand why this works

@sleidig
Copy link
Member

sleidig commented Sep 8, 2022

closes #1423 ?

@sonarcloud
Copy link

sonarcloud bot commented Sep 19, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@TheSlimvReal TheSlimvReal merged commit 19545b9 into master Sep 19, 2022
@TheSlimvReal TheSlimvReal deleted the notes-of-schools branch September 19, 2022 06:34
@aam-digital-ci
Copy link
Collaborator

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

The release is available on GitHub release

Your semantic-release bot 📦🚀

@aam-digital-ci
Copy link
Collaborator

🎉 This PR is included in version 3.11.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@aam-digital-ci
Copy link
Collaborator

🎉 This PR is included in version 3.11.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

3 participants