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

Staff Fosterer Management: Enable staff to update information on a fosterer

Open kasugaijin opened this issue 4 months ago • 1 comments

As staff, I can go to the dashboard > fosterers and see the table of fosterers. I should be able to see an 'Edit' button on each fosterer row, and when I click it, I should be redirected to a form that allows me to update the Person model for this fosterer. I should be able to add/edit the name, email, phone number. When I save this form I should be redirected back to the fosterers page and be able to see these details in the fosterer table in their own columns (we can get rid of the Joined At and Actions columns).

I suggest:

  • adding an update action to app/controllers/organizations/staff/fosterers_controller.rb
  • adding an update method to app/policies/organizations/fosterer_invitation_policy.rb that checks for an update_fosterers ability
  • extending the routes to allow for this update method
  • updating the fosterers table accordingly in the UI

If you want to implement this using turbo frames, then by all means go for it. I think we should be able to render a form, submit it, and replace the fosterer row with the updated information using turbo frames. I do not think we need to use a turbo stream for any of this.

kasugaijin avatar Oct 01 '24 22:10 kasugaijin