Skip to content

Commit

Permalink
AP-5434: Code tidy up
Browse files Browse the repository at this point in the history
Remove unused partials and associated locales values
Remove redundant logic
  • Loading branch information
agoldstone93 committed Nov 7, 2024
1 parent 748c0af commit 8ac7acb
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 242 deletions.
15 changes: 0 additions & 15 deletions app/helpers/check_answers_helper.rb
Original file line number Diff line number Diff line change
@@ -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`:
# <dl class="govuk-summary-list govuk-!-margin-bottom-9">
# <%= check_answer_link ..... %>
# </dl>
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)
Expand Down
30 changes: 0 additions & 30 deletions app/views/providers/means_reports/_dependants.html.erb

This file was deleted.

36 changes: 0 additions & 36 deletions app/views/providers/means_reports/_income_cash_payments.html.erb

This file was deleted.

17 changes: 0 additions & 17 deletions app/views/providers/means_reports/_income_categories.html.erb

This file was deleted.

This file was deleted.

18 changes: 0 additions & 18 deletions app/views/providers/means_reports/_outgoings_categories.html.erb

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,9 @@
<% end %>

<% if @legal_aid_application.uploading_bank_statements? %>
<div class="govuk-!-padding-bottom-8"></div>
<section class="print-no-break">
<h3 class="govuk-heading-m"><%= t(".bank_statement_heading") %></h3>

<section class="print-no-break">
<h3 class="govuk-heading-m"><%= t(".bank_statement_heading") %></h3>
<% if @legal_aid_application.uploading_bank_statements? %>
<% has_partner = @legal_aid_application.applicant.has_partner_with_no_contrary_interest? %>
<%= govuk_summary_list(card: { title: t(".bank_statement_heading") }, actions: false, classes: "govuk-!-margin-bottom-9") do |summary_list| %>
<% if @legal_aid_application.client_uploading_bank_statements? %>
Expand Down Expand Up @@ -120,6 +118,5 @@
<% end %>
<% end %>
<% end %>
<% end %>
</section>
</section>
<% end %>
3 changes: 0 additions & 3 deletions app/views/shared/check_answers/_section_break.html.erb

This file was deleted.

17 changes: 2 additions & 15 deletions config/locales/en/providers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 8ac7acb

Please sign in to comment.