-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add back the non continuous application text for DBD component
This is for candidates with offers for 2023, they have till ~12th oct until declined by default.
- Loading branch information
Showing
3 changed files
with
75 additions
and
5 deletions.
There are no files selected for viewing
This file contains 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
13 changes: 12 additions & 1 deletion
13
...er_interface/application_header_components/offer_will_be_declined_by_default_component.rb
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
module ProviderInterface | ||
module ApplicationHeaderComponents | ||
class OfferWillBeDeclinedByDefaultComponent < ApplicationChoiceHeaderComponent | ||
def offer_text | ||
def continuous_applications_offer_text | ||
days = application_choice.days_since_offered | ||
|
||
"You made this offer #{days_since(days)}. Most candidates respond to offers within 15 working days. The candidate will receive reminders to respond." | ||
end | ||
|
||
def decline_by_default_text | ||
return unless offer_will_be_declined_by_default? | ||
|
||
if time_is_today_or_tomorrow?(application_choice.decline_by_default_at) | ||
"at the end of #{date_and_time_today_or_tomorrow(application_choice.decline_by_default_at)}" | ||
else | ||
days_remaining = days_until(application_choice.decline_by_default_at.to_date) | ||
"in #{days_remaining} (#{application_choice.decline_by_default_at.to_fs(:govuk_date_and_time)})" | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains 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