-
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.
Replace employment details with select school
In the original IRP journey the claimant had to manually enter their school's address. We've replaced manual address entering with a school select form. We still ask for the name of the head teacher as the GIAS database doesn't contain head teacher information for all schools.
- Loading branch information
Showing
24 changed files
with
195 additions
and
379 deletions.
There are no files selected for viewing
62 changes: 0 additions & 62 deletions
62
app/forms/journeys/get_a_teacher_relocation_payment/employment_details_form.rb
This file was deleted.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
app/forms/journeys/get_a_teacher_relocation_payment/headteacher_details_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,22 @@ | ||
module Journeys | ||
module GetATeacherRelocationPayment | ||
class HeadteacherDetailsForm < Form | ||
attribute :school_headteacher_name, :string | ||
|
||
validates :school_headteacher_name, | ||
presence: { | ||
message: i18n_error_message(:school_headteacher_name) | ||
} | ||
|
||
def save | ||
return false unless valid? | ||
|
||
journey_session.answers.assign_attributes( | ||
school_headteacher_name: school_headteacher_name | ||
) | ||
|
||
journey_session.save! | ||
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
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
1 change: 1 addition & 0 deletions
1
app/views/get_a_teacher_relocation_payment/claims/_current_school_details.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 @@ | ||
<%# NOOP %> |
3 changes: 3 additions & 0 deletions
3
app/views/get_a_teacher_relocation_payment/claims/_current_school_question.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,3 @@ | ||
<h1 class="govuk-label-wrapper"> | ||
<%= label_tag :school_search, question, class: "govuk-label govuk-label--l" %> | ||
</h1> |
5 changes: 5 additions & 0 deletions
5
.../get_a_teacher_relocation_payment/claims/_current_school_search_results_question.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,5 @@ | ||
<legend class="govuk-fieldset__legend govuk-fieldset__legend--l"> | ||
<h1 class="govuk-fieldset__heading"> | ||
<%= question %> | ||
</h1> | ||
</legend> |
73 changes: 0 additions & 73 deletions
73
app/views/get_a_teacher_relocation_payment/claims/employment_details.html.erb
This file was deleted.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
app/views/get_a_teacher_relocation_payment/claims/headteacher_details.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,30 @@ | ||
<% content_for( | ||
:page_title, | ||
page_title( | ||
t("get_a_teacher_relocation_payment.forms.headteacher_details.questions.school_headteacher_name"), | ||
journey: current_journey_routing_name, | ||
show_error: @form.errors.any? | ||
) | ||
) %> | ||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<%= form_for( | ||
@form, | ||
url: claim_path(current_journey_routing_name), | ||
builder: GOVUKDesignSystemFormBuilder::FormBuilder | ||
) do |f| %> | ||
<%= f.govuk_error_summary %> | ||
|
||
<%= f.govuk_text_field( | ||
:school_headteacher_name, | ||
label: { | ||
text: t("get_a_teacher_relocation_payment.forms.headteacher_details.questions.school_headteacher_name"), | ||
size: "l", | ||
tag: "h1" | ||
}, | ||
) %> | ||
|
||
<%= f.govuk_submit %> | ||
<% end %> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -200,6 +200,7 @@ shared: | |
- visa_type | ||
- date_of_entry | ||
- nationality | ||
- current_school_id | ||
:schools: | ||
- id | ||
- urn | ||
|
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
9 changes: 9 additions & 0 deletions
9
db/migrate/20240627121651_drop_eligibility_columns_from_international_relocation_payments.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,9 @@ | ||
class DropEligibilityColumnsFromInternationalRelocationPayments < ActiveRecord::Migration[7.0] | ||
def change | ||
remove_column :international_relocation_payments_eligibilities, :school_name | ||
remove_column :international_relocation_payments_eligibilities, :school_address_line_1 | ||
remove_column :international_relocation_payments_eligibilities, :school_address_line_2 | ||
remove_column :international_relocation_payments_eligibilities, :school_city | ||
remove_column :international_relocation_payments_eligibilities, :school_postcode | ||
end | ||
end |
11 changes: 11 additions & 0 deletions
11
...0240627145713_add_current_school_id_to_international_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,11 @@ | ||
class AddCurrentSchoolIdToInternationalRelocationPaymentsEligibilities < ActiveRecord::Migration[7.0] | ||
def change | ||
add_reference :international_relocation_payments_eligibilities, | ||
:current_school, | ||
type: :uuid, | ||
foreign_key: {to_table: :schools}, | ||
index: { | ||
name: "index_irb_eligibilities_on_current_school_id" | ||
} | ||
end | ||
end |
Oops, something went wrong.