Deactivate adopters/fosterers
Description
We have the functionality to deactivate staff accounts. Let's let staff admins also be able to deactivate adopters and fosterers.
This will require you to add a new deactivated_at column to the AdopterFosterAccounts table. You can look at how StaffAccounts was setup for a reference.
You will also need to create #deactivate and #activate actions in Organizations::Staff::FosterersController. See app/controllers/organizations/staff/staff_controller.rb for ref.
Ultimately, we want this column to be shown on the Fosterers index page.
NOTE: This is just adding deactivated_at and modifying it. We will add the functionality of utilizing deactivation in a separate issue using the policies.
Acceptance Criteria
- [x] Add
deactivated_attoadopter_foster_accountstable - [x] Create
#deactivateand#activatemethods forStaffAccountmodel - [x] Create
#deactivateand#activateactions inOrganizations::Staff::FosterersController - [x] Add
deactivatetoggle to all fosterer entries at/staff/fosterers - [x] Staff users can use a deactivate toggle element on the fosterers index page
- [x] Test
- [x] Unit tests for new public model methods
- [x] Happy path system test the deactivate toggle sets
deactivated_at
Dibs!
The description talks about adding this functionality for both adopters and fosterers, but the implementation suggestion mainly refers to only fosterers. Is this because we actually only want to add the deactivate functionality for fosterers, or am I meant to replicate those steps for adopters as well? @mononoken
Update: This has been answered on the PR
This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.
Automatically unassigned after 7 days of inactivity.
On hold until account model changes. Reference discussion in #878
#1142