diff --git a/app/helpers/check_answers_helper.rb b/app/helpers/check_answers_helper.rb index 54124b1ba0..94b77d05c9 100644 --- a/app/helpers/check_answers_helper.rb +++ b/app/helpers/check_answers_helper.rb @@ -1,20 +1,5 @@ module CheckAnswersHelper ItemStruct = Struct.new(:label, :amount_text, :name) - # Creates one dictionary list item - so needs to be used within a `govuk-summary-list` `dl`: - #
- # <%= check_answer_link ..... %> - #
- def check_answer_link(question:, answer:, name:, url: nil, read_only: false, no_border: false) - render( - "shared/check_answers/item", - name:, - url:, - question:, - answer:, - read_only: url.nil? ? true : read_only, - no_border:, - ) - end # Creates both the outer `div` and the inner list items def check_answer_change_link(name:, url:, question:, read_only: false) diff --git a/app/views/providers/means_reports/_dependants.html.erb b/app/views/providers/means_reports/_dependants.html.erb deleted file mode 100644 index ff22c064b9..0000000000 --- a/app/views/providers/means_reports/_dependants.html.erb +++ /dev/null @@ -1,30 +0,0 @@ -

<%= t("providers.means_reports.dependants_heading") %>

- -
- <%= check_answer_link( - name: "child_dependants", - question: t("providers.means_reports.child_dependants"), - answer: @legal_aid_application.dependants.child_relative.count, - read_only:, - ) %> - - <%= check_answer_link( - name: "adult_dependants", - question: t("providers.means_reports.adult_dependants"), - answer: @legal_aid_application.dependants.adult_relative.count, - read_only:, - ) %> -
- -<% if @legal_aid_application.dependants %> - <% @legal_aid_application.dependants.each_with_index do |dependant, index| %> - <%= render( - "shared/check_answers/one_link_section", - name: "dependants_#{index + 1}", - url: providers_legal_aid_application_means_dependant_path(@legal_aid_application, dependant), - question: "Dependant #{index + 1}: #{dependant.name}", - answer_hash: dependant_hash(dependant), - read_only:, - ) %> - <% end %> -<% end %> diff --git a/app/views/providers/means_reports/_income_cash_payments.html.erb b/app/views/providers/means_reports/_income_cash_payments.html.erb deleted file mode 100644 index 6661327080..0000000000 --- a/app/views/providers/means_reports/_income_cash_payments.html.erb +++ /dev/null @@ -1,36 +0,0 @@ -

<%= t("providers.means_reports.income_cash_payments_heading") %>

- -<% credits = @legal_aid_application.legal_aid_application_transaction_types.credits %> -<% cash_credits = @legal_aid_application.cash_transactions.credits.order(:transaction_date) %> -<% credit_categories = TransactionType.credits.not_children %> - -<% if !@legal_aid_application.transaction_types.credits.exists? %> -
<%= t("generic.none") %>
-<% end %> - -
- <% credit_categories.each do |category| %> - <% if credits.pluck(:transaction_type_id).include?(category.id) %> - <% if cash_credits.pluck(:transaction_type_id).include?(category.id) %> - <% cash_payments = cash_credits.where(transaction_type_id: category.id) %> - - <% cash_payment_list = cash_payments.each_with_object([]) do |payment, list| - list << "#{payment.transaction_date.strftime('%B %Y')} #{gds_number_to_currency(payment.amount, precision: 2)}" - end %> - <%= check_answer_link( - name: category.label_name, - question: category.label_name, - answer: cash_payment_list, - read_only: true, - ) %> - <% else %> - <%= check_answer_link( - name: category.label_name, - question: category.label_name, - answer: "None", - read_only: true, - ) %> - <% end %> - <% end %> - <% end %>> -
diff --git a/app/views/providers/means_reports/_income_categories.html.erb b/app/views/providers/means_reports/_income_categories.html.erb deleted file mode 100644 index fa8d409412..0000000000 --- a/app/views/providers/means_reports/_income_categories.html.erb +++ /dev/null @@ -1,17 +0,0 @@ -

<%= t("providers.means_reports.income_categories_heading") %>

- -<% credits = @legal_aid_application.legal_aid_application_transaction_types.credits %> -<% credit_categories = TransactionType.credits.not_children %> - -
- <% credit_categories.each do |category| %> - <% answer = credits.pluck(:transaction_type_id).include?(category.id) %> - - <%= check_answer_link( - name: category.label_name, - question: category.label_name, - answer: safe_yes_or_no(answer), - read_only: true, - ) %> - <% end %> -
diff --git a/app/views/providers/means_reports/_outgoings_cash_payments.html.erb b/app/views/providers/means_reports/_outgoings_cash_payments.html.erb deleted file mode 100644 index 9b00da340a..0000000000 --- a/app/views/providers/means_reports/_outgoings_cash_payments.html.erb +++ /dev/null @@ -1,36 +0,0 @@ -

<%= t("providers.means_reports.outgoings_cash_payments_heading") %>

- -<% debits = @legal_aid_application.legal_aid_application_transaction_types.debits %> -<% cash_debits = @legal_aid_application.cash_transactions.debits.order(:transaction_date) %> -<% debit_categories = TransactionType.debits %> - -<% if !@legal_aid_application.transaction_types.debits.exists? %> -
<%= t("generic.none") %>
-<% end %> - -
- <% debit_categories.each do |category| %> - <% if debits.pluck(:transaction_type_id).include?(category.id) %> - <% if cash_debits.pluck(:transaction_type_id).include?(category.id) %> - <% cash_payments = cash_debits.where(transaction_type_id: category.id) %> - - <% cash_payment_list = cash_payments.each_with_object([]) do |payment, list| - list << "#{payment.transaction_date.strftime('%B %Y')} #{gds_number_to_currency(payment.amount, precision: 2)}" - end %> - - <%= check_answer_link( - name: category.label_name, - question: category.label_name, - answer: cash_payment_list, - read_only: true, - ) %> - <% else %> - <%= check_answer_link( - name: category.label_name, - question: category.label_name, - answer: t("generic.none"), - read_only: true, - ) %> - <% end %> - <% end %> - <% end %>> diff --git a/app/views/providers/means_reports/_outgoings_categories.html.erb b/app/views/providers/means_reports/_outgoings_categories.html.erb deleted file mode 100644 index 0a9f83a987..0000000000 --- a/app/views/providers/means_reports/_outgoings_categories.html.erb +++ /dev/null @@ -1,18 +0,0 @@ -

<%= t("providers.means_reports.outgoings_categories_heading") %>

- - -<% debits = @legal_aid_application.legal_aid_application_transaction_types.debits %> -<% debit_categories = TransactionType.debits %> - -
- <% debit_categories.each do |category| %> - <% answer = debits.pluck(:transaction_type_id).include?(category.id) %> - - <%= check_answer_link( - name: category.label_name, - question: category.label_name, - answer: safe_yes_or_no(answer), - read_only: true, - ) %> - <% end %> -
diff --git a/app/views/providers/means_reports/_with_bank_statement_uploads.html.erb b/app/views/providers/means_reports/_with_bank_statement_uploads.html.erb deleted file mode 100644 index 2b482cb70f..0000000000 --- a/app/views/providers/means_reports/_with_bank_statement_uploads.html.erb +++ /dev/null @@ -1,66 +0,0 @@ -<%= render "receives_benefits" %> - -<% if @legal_aid_application.non_passported? %> - - - - - - - - - - - - - - -

- <%= t(".income_result_heading") %> -

- - - - - -
- - <%= render "caseworker_review" %> -<% end %> - -

- <%= t(".assets_heading") %> -

- -<%= render "shared/check_answers/assets", read_only: true, individual: "" %> - -<% if @legal_aid_application.passported? && @manual_review_determiner.manual_review_required? %> -
- <%= render "caseworker_review" %> -<% end %> - - diff --git a/app/views/providers/means_reports/_with_cfe_result_details.html.erb b/app/views/providers/means_reports/_with_cfe_result_details.html.erb index 48dddc82ae..c7346b1664 100644 --- a/app/views/providers/means_reports/_with_cfe_result_details.html.erb +++ b/app/views/providers/means_reports/_with_cfe_result_details.html.erb @@ -88,11 +88,9 @@ <% end %> <% if @legal_aid_application.uploading_bank_statements? %> -
+ <% end %> diff --git a/app/views/shared/check_answers/_section_break.html.erb b/app/views/shared/check_answers/_section_break.html.erb deleted file mode 100644 index 225e28238a..0000000000 --- a/app/views/shared/check_answers/_section_break.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -
-
-
diff --git a/config/locales/en/providers.yml b/config/locales/en/providers.yml index 1f7c38d811..38b0707770 100644 --- a/config/locales/en/providers.yml +++ b/config/locales/en/providers.yml @@ -1409,23 +1409,14 @@ en: emergency_cost_limit: Emergency cost limit substantive_cost_limit: Substantive cost limit means_reports: - adult_dependants: Adult dependants assets_heading: &assets_heading Property, savings and other assets benefit_check_heading: Passported means benefit_check_question: In receipt of passporting benefit capital_result_heading: &capital_result_heading Capital result caseworker_review_section_heading: Caseworker Review - child_dependants: Child dependants deductions-section-heading: &deductions-section-heading Deductions debits-section-heading: &debits-section-heading Outgoings - dependants_heading: Dependants employment_heading: &employment_heading Employment income - income_cash_payments_heading: Declared cash income - income_categories_heading: Declared income categories - income_details_heading: &income_details_heading Income - income_result_heading: &income_result_heading Income result - outgoings_cash_payments_heading: Declared cash outgoings - outgoings_categories_heading: Declared outgoings categories proceeding_eligibility: Proceeding eligibility student_finance_heading: Student finance income_cash_payments: @@ -1502,10 +1493,6 @@ en: client_details_heading: Client details evidence_upload_heading: Supporting evidence heading: Means report - with_bank_statement_uploads: - assets_heading: *assets_heading - income_details_heading: *income_details_heading - income_result_heading: Employed income result with_cfe_result_details: assets_heading: *assets_heading capital_result_heading: *capital_result_heading @@ -1521,8 +1508,8 @@ en: full_employment_details: client: *client_employment_details partner: *partner_employment_details - income_details_heading: *income_details_heading - income_result_heading: *income_result_heading + income_details_heading: Income + income_result_heading: Income result bank_statement_heading: Bank statements bank_statement_question: Uploaded bank statements