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

Staff: As staff I can review an adopter's information on their application

Open kasugaijin opened this issue 4 months ago • 1 comments

When logged in as staff, I can go to /adoption_application_reviews to see all of the applications on a pet. But I cannot click on the adopter name to see their information.

Every User has a Person model. So, each adopter's information is stored on the person.latest_form_submission.form_answers. This will give you a list of records, each with a question snapshot and value (answer). (Nice to know, these form answers will come from a CSV uploaded by staff that matches the Person's email with a response in the CSV from a form like Google form). We need to show these questions and answers to the staff. Note, that we don't need to worry about grouping questions, for MVP we will just show a list of questions and aswers, however they come in the CSV (it's likely grouped in the original form anyway so that grouping should be loosely retained here).

To do:

  • add a route and show action for Organizations::Staff::AdoptionApplicationReviewsController that will show the adopter's information. This information is stored as form answers on the adopter's Person model's latest_form_submission.
  • authorize the route to make sure the staff is in the same organization as the adopter, and has review_adopter_applications permission
  • add the adopter's name as a link in the table for adopter applications, and when I click on it, redirect me to the show page
  • the show page will be very simple, rendered in the staff dashboard per the sketch below
  • I think the edit route/action on this controller is redundant - please check and remove it if so
  • Please add some seed data so each adopter user has some form answers on their form submission

Questions and answers Image

kasugaijin avatar Oct 09 '24 01:10 kasugaijin