pet-rescue icon indicating copy to clipboard operation
pet-rescue copied to clipboard

Deactivate adopters/fosterers

Open mononoken opened this issue 1 year ago • 5 comments

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.

image

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_at to adopter_foster_accounts table
  • [x] Create #deactivate and #activate methods for StaffAccount model
  • [x] Create #deactivate and #activate actions in Organizations::Staff::FosterersController
  • [x] Add deactivate toggle 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

mononoken avatar May 31 '24 15:05 mononoken

Dibs!

jaxonavena avatar May 31 '24 15:05 jaxonavena

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

jaxonavena avatar May 31 '24 16:05 jaxonavena

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.

github-actions[bot] avatar Jul 09 '24 00:07 github-actions[bot]

Automatically unassigned after 7 days of inactivity.

github-actions[bot] avatar Jul 16 '24 00:07 github-actions[bot]

On hold until account model changes. Reference discussion in #878

jmilljr24 avatar Jul 26 '24 00:07 jmilljr24

#1142

jmilljr24 avatar Feb 10 '25 13:02 jmilljr24