Skip to content

Casa volunteer deactivate#344

Merged
compwron merged 5 commits into
masterfrom
casa-volunteer-deactivate
Jun 14, 2020
Merged

Casa volunteer deactivate#344
compwron merged 5 commits into
masterfrom
casa-volunteer-deactivate

Conversation

@maebeale
Copy link
Copy Markdown
Collaborator

@maebeale maebeale commented Jun 14, 2020

What github issue is this PR for, if any?

Resolves #230: Admins can Deactivate volunteers from Volunteer Edit
Depends on casa-cases-unassign PR

What changed, and why?

  • Added deactivate endpoint/route
  • Add active_volunteer method on user to indicate if volunteer is active
    • Wanted a DRY approach to determining if the volunteer's current role is 'volunteer' (vs 'inactive')
    • Naming this is_active isn't quite right bc they might be an active Supervisor, CasaAdmin, etc. Don't love calling @volunteer.active_volunteer, but, seems needed here bc of volunteer/user obfuscation
  • Changed Actions column on Assigned Cases section to only show if volunteer active
  • Changed "Assign Volunteer" button to secondary so there's only one primary on the page
  • Conditionally displaying Add Cases section only if volunteer is active
  • Change casa_case edit volunteer_assignment to differentiate between having been unassigned vs deactivated

Notes

  • Would prefer not to have to add both get and patch here. Any advice?

How will this affect user permissions?

  • Volunteer permissions:
  • Supervisor permissions:
  • Admin permissions: Admins can Deactivate volunteers from Volunteer Edit

How is this tested? (please write tests!) 💖💪

  • Help, please!

Screenshots please :)

Screen Shot 2020-06-14 at 2 49 10 PM

Copy link
Copy Markdown
Collaborator

@compwron compwron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks great! Thanks :) :) ✨🚀

@compwron compwron merged commit c5fe070 into master Jun 14, 2020
@compwron compwron deleted the casa-volunteer-deactivate branch June 14, 2020 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make case assignment inactive when volunteer becomes inactive

2 participants