-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
728 Adopter dashboard adoption applications #738
728 Adopter dashboard adoption applications #738
Conversation
<%= active_link_to adopter_fosterer_adopter_applications_path, class: "nav-link" do %> | ||
<i class="fe fe-book nav-icon"></i> <%= t("dashboard.applications.header_title")%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry the diff is showing everything. This is the only real change for this file.
belongs_to :adopter_foster_account | ||
|
||
broadcasts_refreshes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really need to brush up on Turbo :) I have no idea how this works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is part of the new Turbo 8. When the adopter application is changed a message is sent over action cable.
It makes it really easy to update without having to do a bunch of turbo_streams and targeting specific id's. You can see in the first half of the video the status and button is update after withdrawing. The second half is just a bonus. I didn't really need to do any extra work but if the staff were to change the status of the app while the adopter was looking at it, the status will be updated without the adopter having to refresh.
Screencast from 05-24-2024 03:16:29 PM.webm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah that is so handy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
I note we have a controller test for adopter applications. Do we currently need the like integration test as well? It's not really doing much.
We have a profile_show
attribute on AdopterApplication. I used this in the old app to allow adopters to delete an application (only if the pet was adopted to someone else, or the adopter withdrew) so it no longer showed in their dashboard...but the record still exists and available on the staff end. If this makes sense, we could implement something similar here. Otherwise someone could end up with a load of withdrawn apps in their view. This could be in a new issue.
I'll take a glance and get back to you. I honestly only briefly looked at the tests since they were already implemented. |
@kasugaijin Can you give more detail on this? I'm not sure what test/file you are referring to.
Yes I think that is a good idea based on the conditions mentioned. Sounds liked a good new issue. I will not have time before RFG.
|
@jmilljr24 this test file |
Thanks. Ready for merge I say. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
🔗 Issue
Resolves #728
✍️ Description
This adds an Adoption Application list to the Adopters dashboard. The applications are listed in table for larger screens and cards for smaller screens. Application statuses are updated via turbo.
I also added a method to allow for enum's to be translated.
📷 Screenshots/Demos
Screencast.from.05-23-2024.10.20.06.AM.webm