Skip to content

Commit

Permalink
Add new provider verification questions
Browse files Browse the repository at this point in the history
Updates the provider verification form to ask the provider to verify
that the claimant isn't subject to any performance or disciplinary
measures.
  • Loading branch information
rjlynch committed Oct 2, 2024
1 parent 1ae9923 commit 139ba53
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ module Provider
class VerifyClaimForm < Form
include CoursesHelper

# When adding new assertions, try to use the same name as the attribute
# in the eligibility model. This simplifies displaying the
# corresponding claimant answer in the admin ui.
ASSERTIONS = {
fixed_contract: %i[
contract_type
Expand All @@ -12,6 +15,8 @@ class VerifyClaimForm < Form
teaching_hours_per_week
half_teaching_hours
subjects_taught
subject_to_formal_performance_action
subject_to_disciplinary_action
],
variable_contract: %i[
contract_type
Expand All @@ -22,6 +27,8 @@ class VerifyClaimForm < Form
half_teaching_hours
subjects_taught
teaching_hours_per_week_next_term
subject_to_formal_performance_action
subject_to_disciplinary_action
]
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,22 @@ def verification
@verification ||= claim.eligibility.verification
end

# See the `courses_taught_assertion` method for more information on why
# that assertion is different to the others.
# We need to make sure that when presenting the list of assertions to the
# admin that the courses taught assertion is displayed after the subjects
# taught assertion.
def assertions
verification["assertions"] + [courses_taught_assertion]
return @assertions if @assertions

subjects_taught_index = verification["assertions"].find_index do |h|
h["name"] == "subjects_taught"
end

@assertions = verification["assertions"].dup.insert(
subjects_taught_index + 1,
courses_taught_assertion
)
end

# The provider verifies the courses taught question as part of verifying the
Expand Down
26 changes: 26 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,16 @@ en:
claimant_answers:
true: "Yes"
false: "No"
subject_to_formal_performance_action:
label: "Performance measures"
claimant_answers:
true: "Yes"
false: "No"
subject_to_disciplinary_action:
label: "Disciplinary action"
claimant_answers:
true: "Yes"
false: "No"
forms:
ineligible:
courses:
Expand Down Expand Up @@ -1254,6 +1264,14 @@ en:
label: "For at least half of their timetabled teaching hours, does %{claimant} teach:"
errors:
inclusion: "Select yes if %{claimant} teaches this course for at least half their timetabled teaching hours"
subject_to_formal_performance_action:
label: "Can you confirm that %{claimant} is not currently subject to any performance measures?"
errors:
inclusion: "Select yes if %{claimant} is not currently subject to any performance measures"
subject_to_disciplinary_action:
label: "Can you confirm that %{claimant} is not currently subject to disciplinary action?"
errors:
inclusion: "Select yes if %{claimant} is not currently subject to disciplinary action"
variable_contract:
contract_type:
label: "Does %{claimant} have a %{type_of_contract} of employment at %{provider}?"
Expand Down Expand Up @@ -1287,6 +1305,14 @@ en:
label: "Will %{claimant} be timetabled to teach at least 2.5 hours per week next term?"
errors:
inclusion: "Select yes if %{claimant} will be timetabled to teach at least 2.5 hours per week next term"
subject_to_formal_performance_action:
label: "Can you confirm that %{claimant} is not currently subject to any performance measures?"
errors:
inclusion: "Select yes if %{claimant} is not currently subject to any performance measures"
subject_to_disciplinary_action:
label: "Can you confirm that %{claimant} is not currently subject to disciplinary action?"
errors:
inclusion: "Select yes if %{claimant} is not currently subject to disciplinary action"

early_years_payment:
claim_description: for an early years financial incentive payment
Expand Down

0 comments on commit 139ba53

Please sign in to comment.