-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds the initial set up for IRP along with a some feature test. So far the IRP journey lets a user click "Start now" and then shows the check your answers page where they can submit a claim. The feature test has some temporary hacks, where we update the database model, this is just required to get the answers in a state that passes the validations on the claim. We'll be removing the `teacher_reference_number` question and (probably) the `payroll_gender` question from the IRP journey but they're currently required.
- Loading branch information
Showing
26 changed files
with
537 additions
and
17 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
app/forms/journeys/get_a_teacher_relocation_payment/claim_submission_form.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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module Journeys | ||
module GetATeacherRelocationPayment | ||
class ClaimSubmissionForm < ::ClaimSubmissionBaseForm | ||
private | ||
|
||
def main_eligibility | ||
@main_eligibility ||= eligibilities.first | ||
end | ||
|
||
def calculate_award_amount(eligibility) | ||
# NOOP | ||
# This is just for compatibility with the AdditionalPaymentsForTeaching | ||
# claim submission form. | ||
end | ||
|
||
def generate_policy_options_provided | ||
[] | ||
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
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module Journeys | ||
module GetATeacherRelocationPayment | ||
extend Base | ||
extend self | ||
|
||
ROUTING_NAME = "get-a-teacher-relocation-payment" | ||
VIEW_PATH = "get_a_teacher_relocation_payment" | ||
I18N_NAMESPACE = "get_a_teacher_relocation_payment" | ||
POLICIES = [Policies::InternationalRelocationPayments] | ||
FORMS = { | ||
"claims" => {} | ||
} | ||
end | ||
end |
6 changes: 6 additions & 0 deletions
6
app/models/journeys/get_a_teacher_relocation_payment/eligibility_checker.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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module Journeys | ||
module GetATeacherRelocationPayment | ||
class EligibilityChecker < Journeys::EligibilityChecker | ||
end | ||
end | ||
end |
7 changes: 7 additions & 0 deletions
7
app/models/journeys/get_a_teacher_relocation_payment/session.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module Journeys | ||
module GetATeacherRelocationPayment | ||
class Session < Journeys::Session | ||
attribute :answers, SessionAnswersType.new | ||
end | ||
end | ||
end |
6 changes: 6 additions & 0 deletions
6
app/models/journeys/get_a_teacher_relocation_payment/session_answers.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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module Journeys | ||
module GetATeacherRelocationPayment | ||
class SessionAnswers < Journeys::SessionAnswers | ||
end | ||
end | ||
end |
5 changes: 5 additions & 0 deletions
5
app/models/journeys/get_a_teacher_relocation_payment/session_answers_type.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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module Journeys | ||
module GetATeacherRelocationPayment | ||
class SessionAnswersType < ::Journeys::SessionAnswersType; end | ||
end | ||
end |
35 changes: 35 additions & 0 deletions
35
app/models/journeys/get_a_teacher_relocation_payment/slug_sequence.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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
module Journeys | ||
module GetATeacherRelocationPayment | ||
class SlugSequence | ||
# FIXME RL due to how the page sequence works we need a minimum of 2 | ||
# slugs otherwise there's no next slug to go to. Once we have added | ||
# another page remove the duplicate "check-your-answers" slug. | ||
RESULTS_SLUGS = [ | ||
"check-your-answers", | ||
"check-your-answers" | ||
].freeze | ||
|
||
SLUGS = RESULTS_SLUGS | ||
|
||
def self.start_page_url | ||
if Rails.env.production? | ||
"https://www.gov.uk/government/publications/international-relocation-payments/international-relocation-payments" | ||
else | ||
Rails.application.routes.url_helpers.landing_page_path("get-a-teacher-relocation-payment") | ||
end | ||
end | ||
|
||
attr_reader :journey_session | ||
|
||
delegate :answers, to: :journey_session | ||
|
||
def initialize(journey_session) | ||
@journey_session = journey_session | ||
end | ||
|
||
def slugs | ||
SLUGS | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module Policies | ||
module InternationalRelocationPayments | ||
end | ||
end |
13 changes: 13 additions & 0 deletions
13
app/models/policies/international_relocation_payments/eligibility.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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module Policies | ||
module InternationalRelocationPayments | ||
class Eligibility < ApplicationRecord | ||
self.table_name = "international_relocation_payments_eligibilities" | ||
|
||
has_one :claim, as: :eligibility, inverse_of: :eligibility | ||
|
||
def ineligible? | ||
false | ||
end | ||
end | ||
end | ||
end |
21 changes: 21 additions & 0 deletions
21
app/models/policies/international_relocation_payments/policy_eligibility_checker.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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module Policies | ||
module InternationalRelocationPayments | ||
class PolicyEligibilityChecker | ||
attr_reader :answers | ||
|
||
delegate_missing_to :answers | ||
|
||
def initialize(answers:) | ||
@answers = answers | ||
end | ||
|
||
def status | ||
:eligible_now | ||
end | ||
|
||
def ineligible? | ||
false | ||
end | ||
end | ||
end | ||
end |
27 changes: 27 additions & 0 deletions
27
app/views/get_a_teacher_relocation_payment/claims/check_your_answers.html.erb
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<% content_for( | ||
:page_title, | ||
page_title( | ||
"Check your answers before sending your application", | ||
journey: current_journey_routing_name, | ||
) | ||
) %> | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<h1 class="govuk-heading-xl"> | ||
Check your answers before sending your application | ||
</h1> | ||
|
||
<%= form_for @form, url: claim_submission_path, method: :post, builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %> | ||
<%= f.govuk_error_summary %> | ||
|
||
<h2 class="govuk-heading-m"><%= t("check_your_answers.heading_send_application") %></h2> | ||
|
||
<p class="govuk-body"><%= t("check_your_answers.statement") %></p> | ||
|
||
<div class="govuk-form-group"> | ||
<%= f.govuk_submit t("check_your_answers.btn_text") %> | ||
</div> | ||
<% end %> | ||
</div> | ||
</div> |
120 changes: 120 additions & 0 deletions
120
app/views/get_a_teacher_relocation_payment/landing_page.html.erb
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 |
---|---|---|
@@ -0,0 +1,120 @@ | ||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-full"> | ||
<h1 class="govuk-heading-xl">Apply for the international relocation payment</h1> | ||
</div> | ||
</div> | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-full"> | ||
<p class="govuk-body"> | ||
The international relocation payment (IRP) is a single payment of £10,000, | ||
funded by the UK government, which is available to eligible non-UK trainees and teachers of: | ||
</p> | ||
|
||
<ul class="govuk-list govuk-list--bullet"> | ||
<li>languages</li> | ||
<li>physics</li> | ||
<li>general or combined science when that includes physics</li> | ||
</ul> | ||
|
||
<p class="govuk-body"> | ||
Only teachers and salaried trainees need to complete this form. | ||
</p> | ||
|
||
<p class="govuk-body"> | ||
Before starting your application, visit | ||
<%= govuk_link_to( | ||
"Get an international relocation payment", | ||
"https://getintoteaching.education.gov.uk/non-uk-teachers/get-an-international-relocation-payment", | ||
target: "_blank" | ||
) %> | ||
to check the criteria you must meet to receive the IRP. You need to have started your job or course before you can apply. | ||
</p> | ||
|
||
<p class="govuk-body"> | ||
You should also get your documents and information ready, as you will | ||
not be able to save your entries and return to the form later. It should | ||
take approximately 15 minutes to complete. | ||
</p> | ||
|
||
|
||
<h2 class="govuk-heading-l">Documents and information to get ready</h2> | ||
|
||
<p class="govuk-body"> | ||
You will need: | ||
</p> | ||
|
||
<ul class="govuk-list govuk-list--bullet"> | ||
<li> | ||
if you are a teacher, your teaching subject and the terms of your employment contract | ||
</li> | ||
<li> | ||
if you are a salaried trainee, details of your teacher training course, including | ||
teaching subject and start date | ||
</li> | ||
<li> | ||
your visa type and when you entered the UK | ||
</li> | ||
<li> | ||
your passport | ||
</li> | ||
<li> | ||
your address in England | ||
</li> | ||
<li> | ||
contact details for the school where you are employed as a teacher or trainee | ||
</li> | ||
</ul> | ||
|
||
<p class="govuk-body"> | ||
<a href="<%= claim_path(current_journey_routing_name, "claim") %>" role="button" draggable="false" class="govuk-button govuk-button--start" data-module="govuk-button"> | ||
Start | ||
<svg class="govuk-button__start-icon" xmlns="http://www.w3.org/2000/svg" width="17.5" height="19" viewBox="0 0 33 40" aria-hidden="true" focusable="false"> | ||
<path fill="currentColor" d="M0 0h13l20 20-20 20H0l20-20z"/> | ||
</svg> | ||
</a> | ||
</p> | ||
|
||
<h2 class="govuk-heading-l">Deadline for applications</h2> | ||
|
||
<p class="govuk-body"> | ||
Applications for the international relocation payment (IRP) are open from: | ||
</p> | ||
|
||
<ul class="govuk-list govuk-list--bullet"> | ||
<li>2 April to 16 June 2024</li> | ||
</ul> | ||
|
||
<p class="govuk-body"> | ||
If you have started your teaching job or salaried teacher training | ||
course, you should apply now. If you are eligible, you should receive | ||
the money by 30 September 2024. | ||
</p> | ||
|
||
<p class="govuk-body"> | ||
To remain eligible for the IRP, you must apply in either the first or | ||
second term of your employment as a teacher or salaried trainee. | ||
</p> | ||
<p class="govuk-body"> | ||
Applications will re-open later in 2024. | ||
</p> | ||
|
||
<h2 class="govuk-heading-l">Not ready to apply?</h2> | ||
<p class="govuk-body"> | ||
If you have not started your job or course, please visit | ||
<%= govuk_link_to( | ||
"Get an international relocation payment", | ||
"https://getintoteaching.education.gov.uk/non-uk-teachers/get-an-international-relocation-payment", | ||
target: "_blank" | ||
) %> | ||
for information about future applications. | ||
</p> | ||
|
||
<h2 class="govuk-heading-m">Contact us</h2> | ||
|
||
<p class="govuk-body"> | ||
For help, please email us at | ||
<%= govuk_link_to("[email protected]", "mailto:[email protected]")%>. | ||
</p> | ||
</div> | ||
</div> |
29 changes: 29 additions & 0 deletions
29
app/views/get_a_teacher_relocation_payment/submissions/show.html.erb
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<% content_for(:page_title, page_title("Claim submitted", journey: current_journey_routing_name)) %> | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
|
||
<div class="govuk-panel govuk-panel--confirmation"> | ||
<h1 class="govuk-panel__title" id="submitted-title">Claim submitted</h1> | ||
|
||
<div class="govuk-panel__body"> | ||
Your reference number<br> | ||
<strong><%= submitted_claim.reference %></strong> | ||
</div> | ||
</div> | ||
|
||
<p class="govuk-body"> | ||
We have sent you a confirmation email to <%= submitted_claim.email_address %>. | ||
</p> | ||
|
||
<h2 class="govuk-heading-m">What happens next</h2> | ||
|
||
<%= render partial: "submissions/confirmation" %> | ||
|
||
<p class="govuk-body"> | ||
<%= link_to "What do you think of this service?", done_page_url, class: "govuk-link" %> | ||
(takes 30 seconds) | ||
</p> | ||
</div> | ||
</div> | ||
|
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
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 |
---|---|---|
|
@@ -679,6 +679,11 @@ en: | |
claim_amount_description: "Additional payment for teaching" | ||
support_email_address: "[email protected]" | ||
information_provided_further_details_link_text: levelling up premium payment (opens in new tab) | ||
get_a_teacher_relocation_payment: | ||
journey_name: "Get a teacher relocation payment" | ||
feedback_email: "[email protected]" | ||
claim_description: "for a get a teacher relocation payment" | ||
|
||
activerecord: | ||
errors: | ||
models: | ||
|
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
7 changes: 7 additions & 0 deletions
7
db/migrate/20240618143941_create_policies_relocation_payments_eligibilities.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class CreatePoliciesRelocationPaymentsEligibilities < ActiveRecord::Migration[7.0] | ||
def change | ||
create_table :international_relocation_payments_eligibilities, id: :uuid do |t| | ||
t.timestamps | ||
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
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
Oops, something went wrong.