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

Attendance of notes are directly edited #797

Closed
TheSlimvReal opened this issue Apr 28, 2021 · 6 comments
Closed

Attendance of notes are directly edited #797

TheSlimvReal opened this issue Apr 28, 2021 · 6 comments
Assignees

Comments

@TheSlimvReal
Copy link
Collaborator

Describe the bug
When editing the attendance information of a note in the notes manager, the changes remain even when the editing is canceled.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Notes'
  2. Click on 'a note'
  3. Change the attendance of a child (e.g. change status, add remarks, ..)
  4. Click on 'cancel`
  5. Open the same note again
  6. The changes from before are still visible

Expected behavior
When clicking cancel, all changes in the NoteDetailsComponent should be undone.

Additional context
The problem occurs because no deep copy of the note is passed to the NoteDetailsComponent it is possible to add note.childrenAttendance = new Map(this.childrenAttendance); in the copy() function of the note entity, but this will only generate a shallow copy of the map. If existing EventAttendance objects are edited like in the scenario above, the bug remains. Either a deep copy of the map has to be generated or the NoteDetailsComponent should not directly edit the input note.

@sleidig
Copy link
Member

sleidig commented Jul 23, 2021

In connection to this we should also think about replacing the "NoteDetailsComponent" or basing it on the EntityDetailsComponent that is usually used

@Schottkyc137
Copy link
Contributor

Is this issue still in the app? I can't seem to replicate the bug

@TheSlimvReal
Copy link
Collaborator Author

For me I can still experience it.

  1. Go to 'notes'
  2. Filter by 'Coaching Class'
  3. Open a note
  4. Change the attendance status of a child
  5. Close the note without saving
  6. Open the same note again
  7. The changed attendance status should still be changed

However, this is a very minor problem because the changes are not written to the database.

@aam-digital-ci
Copy link
Collaborator

🎉 This issue has been resolved in version 2.60.0-master.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@aam-digital-ci
Copy link
Collaborator

🎉 This issue has been resolved in version 2.60.0-master.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@aam-digital-ci
Copy link
Collaborator

🎉 This issue has been resolved in version 3.0.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
Projects
None yet
Development

No branches or pull requests

4 participants