diff --git a/app/controllers/admin/amendments_controller.rb b/app/controllers/admin/amendments_controller.rb index 967a555237..5955dd7985 100644 --- a/app/controllers/admin/amendments_controller.rb +++ b/app/controllers/admin/amendments_controller.rb @@ -2,6 +2,7 @@ class Admin::AmendmentsController < Admin::BaseAdminController before_action :load_claim before_action :ensure_service_operator before_action :ensure_claim_is_amendable + before_action :set_claim_summary_view, only: [:index] def index end diff --git a/app/controllers/admin/base_admin_controller.rb b/app/controllers/admin/base_admin_controller.rb index e589014d1c..5b6846d941 100644 --- a/app/controllers/admin/base_admin_controller.rb +++ b/app/controllers/admin/base_admin_controller.rb @@ -58,5 +58,10 @@ def clear_session session.delete(:role_codes) session.delete(:claims_backlink_path) end + + def set_claim_summary_view + policy_append = @claim.policy.to_s.underscore if @claim.policy.is_a?(Policies::FurtherEducationPayments) + @claim_summary_view = ["claim_summary", policy_append].compact.join("_") + end end end diff --git a/app/controllers/admin/claims_controller.rb b/app/controllers/admin/claims_controller.rb index 6f26e3cb2a..b42a0c878b 100644 --- a/app/controllers/admin/claims_controller.rb +++ b/app/controllers/admin/claims_controller.rb @@ -62,6 +62,7 @@ def hold redirect_to admin_claim_notes_path(@claim) else @note = Note.new + set_claim_summary_view render "admin/notes/index" end end diff --git a/app/controllers/admin/decisions_controller.rb b/app/controllers/admin/decisions_controller.rb index e24adfbb14..8bb37d76f0 100644 --- a/app/controllers/admin/decisions_controller.rb +++ b/app/controllers/admin/decisions_controller.rb @@ -6,6 +6,7 @@ class Admin::DecisionsController < Admin::BaseAdminController before_action :reject_decided_claims, unless: -> { qa_decision_task? } before_action :reject_missing_payroll_gender, only: [:create] before_action :reject_if_claims_preventing_payment, only: [:create] + before_action :set_claim_summary_view def new @decision = Decision.new diff --git a/app/controllers/admin/notes_controller.rb b/app/controllers/admin/notes_controller.rb index 8efb06a6a4..c67eb15da3 100644 --- a/app/controllers/admin/notes_controller.rb +++ b/app/controllers/admin/notes_controller.rb @@ -2,6 +2,7 @@ module Admin class NotesController < BaseAdminController before_action :ensure_service_operator before_action :load_claim + before_action :set_claim_summary_view def index @note = Note.new diff --git a/app/controllers/admin/payments_controller.rb b/app/controllers/admin/payments_controller.rb index 452a39bcf6..2e68f8ec50 100644 --- a/app/controllers/admin/payments_controller.rb +++ b/app/controllers/admin/payments_controller.rb @@ -3,6 +3,7 @@ class PaymentsController < BaseAdminController before_action :ensure_service_operator before_action :find_payroll_run, except: [:index] before_action :find_payment, except: [:index] + before_action :set_claim_summary_view, only: [:index] def index @claim = Claim.find(params[:claim_id]) diff --git a/app/controllers/admin/support_tickets_controller.rb b/app/controllers/admin/support_tickets_controller.rb index 33ccef43f8..73b0d0e1b0 100644 --- a/app/controllers/admin/support_tickets_controller.rb +++ b/app/controllers/admin/support_tickets_controller.rb @@ -2,6 +2,7 @@ module Admin class SupportTicketsController < BaseAdminController before_action :ensure_service_operator before_action :load_claim + before_action :set_claim_summary_view def create @support_ticket = @claim.build_support_ticket(support_ticket_params) diff --git a/app/controllers/admin/tasks_controller.rb b/app/controllers/admin/tasks_controller.rb index f98582e2b4..801a9bf5fd 100644 --- a/app/controllers/admin/tasks_controller.rb +++ b/app/controllers/admin/tasks_controller.rb @@ -5,6 +5,7 @@ class Admin::TasksController < Admin::BaseAdminController before_action :load_claim before_action :ensure_task_has_not_already_been_completed, only: [:create] before_action :load_matching_claims, only: [:show], if: -> { params[:name] == "matching_details" } + before_action :set_claim_summary_view def index @claim_checking_tasks = ClaimCheckingTasks.new(@claim) diff --git a/app/views/admin/amendments/index.html.erb b/app/views/admin/amendments/index.html.erb index 6537072356..213bcea8bb 100644 --- a/app/views/admin/amendments/index.html.erb +++ b/app/views/admin/amendments/index.html.erb @@ -3,7 +3,7 @@ <%= link_to "Back", claims_backlink_path, class: "govuk-back-link" %>