-
Notifications
You must be signed in to change notification settings - Fork 9
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
Highlight candidate application edits on manage #8695
Highlight candidate application edits on manage #8695
Conversation
d9aceff
to
a7395f9
Compare
751e665
to
9a8aea9
Compare
Instance method on an ApplicationChoice which determines if the ApplicationChoice has been updated within a specific duration since it was submitted to the provider. The default duration is 40 days.
If the ApplicationChoice has been updated recently, show an notification banner with a link to the application timeline.
Add - Personal details - Contact information - Disability disclosure - Interview preferences - Equality and diversity
Include index page assertions
b04e2e2
to
b1ace76
Compare
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.
Awesome work! Just one concern regards DB slow queries.
app/models/application_choice.rb
Outdated
return false if sent_to_provider_at.blank? | ||
|
||
since = [UPDATED_RECENTLY_DAYS.days.ago, sent_to_provider_at].max | ||
RecentlyUpdatedApplicationChoice.new.call(application_choice: self, since: since).exists? |
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.
Can't since
be moved inside RecentlyUpdatedApplicationChoice
? And you can have RecentlyUpdatedApplicationChoice.new.call(application_choice: self).exists?
And then the method wouldn't even need to be part of the instance.
f07f95e
to
77c8cba
Compare
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 would've probably skipped the instance method entirely and used the self.call
pattern.
77c8cba
to
d1d1dea
Compare
Context
Providers will want to be aware when a candidate has updated their submitted application.
The ticket outlined an implementation where the data that was changed is shown in the Timeline. I have not implemented this in this PR as it would require consideration about how and what could be shared between the history component and the timeline component.
As a stopgap, the link to "View Application" in the Timeline brings the user to the specific section of the application that has been changed.
Screenshots
Changes proposed in this pull request
Guidance to review
Link to Trello card
Trello Ticket