Describe the bug
When a user tries to void an individual with active encounters, enrolments, and program_encounters, a big error pops up causing the user confusion.
To Reproduce
Register an individual, enroll it into a program, and try to have encounters planned as well.
Try to void the individual
You must see a big modal pop like the below screenshot.
Because of the stack trace the user panics and seeks out help from the support team.
A similar kind of error comes when there are active encounters and program_encounters present.
if we void all the related entities anyways for the existing data still history will be present
should else auto void all related entities like group/household members, eligibility, etc., - if a individual has 1000 encounters - what 'll happen if user closes the app when it is happening, how long will it take?
Also the above is simple - cases like same member should not be part of more than one group will come - in such cases voiding and unvoiding might need to deal with complex cases.
https://avni.freshdesk.com/a/tickets/4546
Describe the bug When a user tries to void an individual with active encounters, enrolments, and program_encounters, a big error pops up causing the user confusion.
To Reproduce
Issue link: https://drive.google.com/file/d/1PgWC0iuG-CUxuPnuJdo6J9uAiDaM2vE_/view?usp=drive_link
As is:
To be:
Analysis notes: