diff --git a/app/models/claim_checking_tasks.rb b/app/models/claim_checking_tasks.rb index e00040e4dc..f1725845fa 100644 --- a/app/models/claim_checking_tasks.rb +++ b/app/models/claim_checking_tasks.rb @@ -12,7 +12,7 @@ def initialize(claim) delegate :policy, to: :claim def applicable_task_names - return ["identity_confirmation"] if policy.international_relocation_payments? + return ["identity_confirmation", "visa"] if policy.international_relocation_payments? @applicable_task_names ||= Task::NAMES.dup.tap do |task_names| task_names.delete("induction_confirmation") unless claim.policy == Policies::EarlyCareerPayments @@ -21,6 +21,7 @@ def applicable_task_names task_names.delete("payroll_details") unless claim.must_manually_validate_bank_details? task_names.delete("matching_details") unless matching_claims.exists? task_names.delete("payroll_gender") unless claim.payroll_gender_missing? || task_names_for_claim.include?("payroll_gender") + task_names.delete("visa") unless claim.policy.international_relocation_payments? end end diff --git a/app/models/policies/international_relocation_payments/admin_tasks_presenter.rb b/app/models/policies/international_relocation_payments/admin_tasks_presenter.rb index e64aa294ea..9e7f35fddd 100644 --- a/app/models/policies/international_relocation_payments/admin_tasks_presenter.rb +++ b/app/models/policies/international_relocation_payments/admin_tasks_presenter.rb @@ -16,6 +16,12 @@ def identity_confirmation ] end + def visa + [ + ["Visa type", eligibility.visa_type] + ] + end + private delegate :eligibility, to: :claim diff --git a/app/models/task.rb b/app/models/task.rb index 8dae76bdab..b2d48af068 100644 --- a/app/models/task.rb +++ b/app/models/task.rb @@ -18,6 +18,7 @@ class Task < ApplicationRecord payroll_details matching_details payroll_gender + visa ].freeze belongs_to :claim diff --git a/app/views/admin/tasks/visa.html.erb b/app/views/admin/tasks/visa.html.erb new file mode 100644 index 0000000000..15958f21ae --- /dev/null +++ b/app/views/admin/tasks/visa.html.erb @@ -0,0 +1,27 @@ +<% content_for(:page_title) { page_title("Claim #{@claim.reference} visa check for #{@claim.policy.short_name}") } %> +<%= link_to "Back", admin_claim_tasks_path(claim_id: @claim.id), class: "govuk-back-link" %> +<%= render "shared/error_summary", instance: @task, errored_field_id_overrides: { "passed": "task_passed_true" } if @task.errors.any? %> + +