rubyforgood / pet-rescue

Pet Rescue is an application making it easy to link adopters/fosters with pets. We work with grassroots pet rescue organizations to understand how we can make the most impact.
MIT License
61 stars 105 forks source link

Adoption Applications: Add pagination. #706

Closed kasugaijin closed 4 months ago

kasugaijin commented 4 months ago

We added pagination to /staff/pets and now we should add it to /staff/adoption_application_reviews.

I think that 5 per page would be good? Open to other ideas here as well.

Refer to this PR for how it was done on staff pet index: https://github.com/rubyforgood/pet-rescue/pull/649

Acceptance criteria:

atbalaji commented 4 months ago

@kasugaijin I would love to work on this issue and I would get back with a PR before tmr

kasugaijin commented 4 months ago

@atbalaji all yours! No rush! Thank you

atbalaji commented 4 months ago

__/staff/adoption_applicationreviews in this page i am getting errors due to existence of adopter_foster_accounts with no adopter_foster_profile in pre populated data. I want to know your thoughts on handling this?

kasugaijin commented 4 months ago

Check this: https://www.loom.com/share/4152f8a41c8b4c2a9585e7a0da380ebb?sid=c13c59b4-8401-4f04-ad88-f1ac0e447c47

When we make the adopter applications in the seed file

10.times do
    adopter_application = AdopterApplication.new(
      notes: Faker::Lorem.paragraph,
      profile_show: true,
      status: rand(0..4),
      adopter_foster_account: AdopterFosterAccount.all.sample,
      pet: Pet.all.sample
    )

We sample from the adopter foster accounts. So, it is now picking up the new fosterer users, but they don't have an associated adopter foster profile being created.

atbalaji commented 4 months ago

Can we close this issue?