I want to be able to delete the associated with my Github login data member and delete other family members,
so that member accounts can be removed when necessary.
Description
Acceptance Criteria
The logged-in user, associated with a family member with the role "Parent" or "Caregiver" should see a 'Delete account' button on their profile page and on the profile pages of other family members from their family.
Clicking the "Delete account" button should prompt a confirmation dialog to prevent accidental deletions.
Confirming the deletion should permanently delete the family member from the app.
If the user deletes their own member, they remain logged in and are redirected to the home page, where they have options to log out or create a new family and a member.
If there is an error while saving the profile data or deleting the account, an appropriate error message should be displayed.
Tasks
[ ] create branch feature/delete-member
[ ] create a button with the text "Delete account" in MemberProfile component and render it conditionally so that only the members with the roles "Parent" and "Caregiver" can see them.
[ ] implement a logic to show the modal window with a confirmation dialog upon clicking the "Delete account" button.
[ ] redirect the user to the home page after deleting his own member.
[ ] implement a logic to delete the member data from database upon the confirming.
Delete Member
Value Proposition
As a registered user and a family member,
I want to be able to delete the associated with my Github login data member and delete other family members,
so that member accounts can be removed when necessary.
Description
Acceptance Criteria
Tasks
feature/delete-member
button
with the text "Delete account" inMemberProfile
component and render it conditionally so that only the members with the roles "Parent" and "Caregiver" can see them.button
.