Add page to manage volunteer case assignments#210
Merged
compwron merged 5 commits intoApr 28, 2020
Merged
Conversation
…ue-208-edit-volunteer-case-assignments
compwron
reviewed
Apr 28, 2020
| def must_be_admin | ||
| return if current_user&.casa_admin? | ||
|
|
||
| flash[:notice] = 'You do not have permission to view that page.' |
compwron
reviewed
Apr 28, 2020
Collaborator
|
Looks great so far, I'll come back when it's un-drafted :) |
Collaborator
…ue-208-edit-volunteer-case-assignments
compwron
reviewed
Apr 28, 2020
|
|
||
| def humanized_type | ||
| "#{contact_type.humanize.titleize}" | ||
| contact_type.humanize.titleize.to_s |
compwron
approved these changes
Apr 28, 2020
| volunteer = User.find(params[:volunteer_id]) | ||
| case_assignment = volunteer.case_assignments.find(params[:id]) | ||
|
|
||
| case_assignment.destroy |
Collaborator
There was a problem hiding this comment.
Eventually we will want to use case_assignment.is_active instead of .destroy so we can view previously-assigned volunteers but because case_contact has case_id (so case contacts never vanish) it's not needed for MVP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What github issue is this PR for, if any?
Resolves #208
Resolves #204
Checklist
/docsbundle exec rakepasses locallyWhat changed, and why?
This commit adds a new page for admins to manage the case assignments of volunteers. Because this page only handles case assignments at the moment, I changed the route from edit_volunteers to a nested route inside of volunteers, i.e.
volunteers/1/case_assignments.How will this affect user permissions?
How is this tested?
New rspec tests have been added!
Screenshots please :)