diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 9a795f4548..e12e19614c 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -31,6 +31,7 @@ $govuk-assets-path: "/"; @import "table-sort"; @import "tables"; @import "sort-transactions"; +@import "summary-card"; @import "width-style-correction"; @import "citizens/spinner"; @import "providers/legal_aid_applications"; diff --git a/app/assets/stylesheets/check-your-answers.scss b/app/assets/stylesheets/check-your-answers.scss index 6a9045b9c0..ecf2c9feb2 100644 --- a/app/assets/stylesheets/check-your-answers.scss +++ b/app/assets/stylesheets/check-your-answers.scss @@ -45,6 +45,7 @@ border-top: 3px solid #000000; border-bottom: 1px solid #000000; font-weight: bold; + @include govuk-media-query($from: tablet) { display: table-row; } @@ -70,6 +71,6 @@ } } -.print-no-break > .govuk-body { +.print-no-break>.govuk-body { word-wrap: break-word; } diff --git a/app/assets/stylesheets/summary-card.scss b/app/assets/stylesheets/summary-card.scss new file mode 100644 index 0000000000..24d13439a3 --- /dev/null +++ b/app/assets/stylesheets/summary-card.scss @@ -0,0 +1,7 @@ +.bold-border-top { + border-top: 2px solid govuk-colour("black"); +} + +.govuk-summary-card { + break-inside: avoid; +} diff --git a/app/components/reports/merits/delegated_functions_component.html.erb b/app/components/reports/merits/delegated_functions_component.html.erb index 97f875b012..fd5afd1628 100644 --- a/app/components/reports/merits/delegated_functions_component.html.erb +++ b/app/components/reports/merits/delegated_functions_component.html.erb @@ -1,14 +1,13 @@ -<h3 class="govuk-heading-s"> - <%= @proceeding.meaning %> -</h3> - <% if @proceeding.used_delegated_functions? %> <%= govuk_summary_list( + card: { title: @proceeding.meaning }, rows:, actions: false, - classes: "govuk-!-margin-bottom-9", ) %> <% else %> + <h3 class="govuk-heading-s"> + <%= @proceeding.meaning %> + </h3> <p class="govuk-body govuk-!-margin-bottom-9"> <%= t(".not_used") %> </p> diff --git a/app/helpers/check_answers_helper.rb b/app/helpers/check_answers_helper.rb index 98f7d1cfff..94b77d05c9 100644 --- a/app/helpers/check_answers_helper.rb +++ b/app/helpers/check_answers_helper.rb @@ -1,31 +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 - - def check_answer_no_link(question:, answer:, name:, no_border: false, read_only: false) - render( - "shared/check_answers/no_link_item", - name:, - question:, - answer:, - 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) @@ -38,16 +12,6 @@ def check_answer_change_link(name:, url:, question:, read_only: false) ) end - def check_long_question_no_link(question:, answer:, name:, no_border: false) - render( - "shared/check_answers/no_link_long_item", - name:, - question:, - answer:, - no_border:, - ) - end - def number_to_currency_or_na(number) number.to_d == BigDecimal("999_999_999_999.0", 12) ? "N/a" : gds_number_to_currency(number) end diff --git a/app/views/providers/check_passported_answers/show.html.erb b/app/views/providers/check_passported_answers/show.html.erb index 98df2aa368..69fcbb285a 100644 --- a/app/views/providers/check_passported_answers/show.html.erb +++ b/app/views/providers/check_passported_answers/show.html.erb @@ -9,9 +9,9 @@ <%= render "shared/check_answers/assets", individual: %> - <h2 class="govuk-heading-m"><%= t(".chances_of_success_h2") %></h2> + <h3 class="govuk-heading-m"><%= t(".what_happens_next") %></h2> - <p class="govuk-body"><%= t(".chances_of_success_body") %></p> + <p class="govuk-body"><%= t(".what_happens_next_body") %></p> <%= next_action_buttons_with_form( url: continue_providers_legal_aid_application_check_passported_answers_path(@legal_aid_application), diff --git a/app/views/providers/check_provider_answers/_read_only.html.erb b/app/views/providers/check_provider_answers/_read_only.html.erb index 111d914216..6d33733bbc 100644 --- a/app/views/providers/check_provider_answers/_read_only.html.erb +++ b/app/views/providers/check_provider_answers/_read_only.html.erb @@ -1,30 +1,31 @@ <p class="govuk-body"><%= t ".sent_email_text", email: @legal_aid_application.applicant.email %></p> - <%= govuk_button_link_to t(".change_email_button"), - providers_legal_aid_application_email_address_path, - role: "button", - secondary: true, - id: "change-email" %> +<%= govuk_button_link_to t(".change_email_button"), + providers_legal_aid_application_email_address_path, + role: "button", + secondary: true, + id: "change-email" %> - <%= page_template( - page_title: t(".title"), - notification_banner_title: t("generic.important"), - notification_banner_text: t(".banner.your_client_needs_to"), - back_link: { - path: submitted_providers_legal_aid_applications_path, - text: t("generic.home"), - method: :get, - }, - ) do %> +<%= page_template( + page_title: t(".title"), + notification_banner_title: t("generic.important"), + notification_banner_text: t(".banner.your_client_needs_to"), + back_link: { + path: submitted_providers_legal_aid_applications_path, + text: t("generic.home"), + method: :get, + }, + ) do %> - <%= render("providers/check_provider_answers/shared", - applicant: @applicant, - address: @address, - read_only: @read_only) %> - <%= next_action_buttons_with_form( - url: submitted_providers_legal_aid_applications_path, - method: :get, - show_draft: false, - continue_button_text: t("generic.back_to_your_applications"), - ) %> + <%= render("providers/check_provider_answers/shared", + applicant: @applicant, + address: @address, + read_only: @read_only) %> + + <%= next_action_buttons_with_form( + url: submitted_providers_legal_aid_applications_path, + method: :get, + show_draft: false, + continue_button_text: t("generic.back_to_your_applications"), + ) %> <% end %> diff --git a/app/views/providers/check_provider_answers/_shared.html.erb b/app/views/providers/check_provider_answers/_shared.html.erb index 53824de1d2..3edd97d2c7 100644 --- a/app/views/providers/check_provider_answers/_shared.html.erb +++ b/app/views/providers/check_provider_answers/_shared.html.erb @@ -34,7 +34,7 @@ </div> </div> - <%= govuk_summary_list(actions: false, classes: "govuk-!-margin-bottom-9") do |summary_list| %> + <%= govuk_summary_list(card: { title: t(".section_proceeding.heading") }, actions: false) do |summary_list| %> <%= @source_application.proceedings_by_name.each_with_index do |proceeding, i| %> <%= summary_list.with_row(classes: "app-check-your-answers__#{proceeding.name}_proceeding") do |row| %> <%= row.with_key(text: "#{t('.proceeding')} #{i + 1}", classes: "govuk-!-width-one-half") %> @@ -88,6 +88,7 @@ <%= render( "shared/check_answers/substantive_costs", legal_aid_application: @source_application, + heading: t(".substantive_cost_limit"), read_only: @read_only, ) %> <% end %> diff --git a/app/views/providers/means_reports/_capital_disregards.html.erb b/app/views/providers/means_reports/_capital_disregards.html.erb index b002fcde42..ec335ca7d3 100644 --- a/app/views/providers/means_reports/_capital_disregards.html.erb +++ b/app/views/providers/means_reports/_capital_disregards.html.erb @@ -1,7 +1,7 @@ <h2 class="govuk-heading-m"><%= t(".heading") %></h2> <%= govuk_summary_list( + card: { title: t(".heading") }, actions: false, - classes: "govuk-!-margin-bottom-9", html_attributes: { id: "capital-disregards-questions" }, ) do |summary_list| %> diff --git a/app/views/providers/means_reports/_caseworker_review.html.erb b/app/views/providers/means_reports/_caseworker_review.html.erb index 7c13f18607..f2f8d29708 100644 --- a/app/views/providers/means_reports/_caseworker_review.html.erb +++ b/app/views/providers/means_reports/_caseworker_review.html.erb @@ -1,48 +1,34 @@ - <section class="print-no-break"> - <h2 class="govuk-heading-l"><%= t("providers.means_reports.caseworker_review_section_heading") %></h2> +<section class="print-no-break"> + <h2 class="govuk-heading-l"><%= t("providers.means_reports.caseworker_review_section_heading") %></h2> - <section> - <dl id="caseworker-review-questions" class="govuk-summary-list govuk-!-margin-bottom-9"> - - <div class="<%= "govuk-summary-list__row normal-word-break govuk-summary-list__row--no-border" %>" id="<%= "means-merits-report__caseworker-review-required" %>"> - <dt class="<%= "govuk-summary-list__key govuk-!-width-one-half" %>"> - <%= t(".required") %> - </dt> - <dd class="<%= "govuk-summary-list__value govuk-!-text-align-right" %>" id="caseworker_review_required_answer"> - <%= yes_no(@manual_review_determiner.manual_review_required?) %> - </dd> - </div> - - <% if @manual_review_determiner.manual_review_required? %> - - <div class="<%= "govuk-summary-list__row normal-word-break govuk-summary-list__row--no-border" %>" id="<%= "means-merits-report__caseworker-review-required" %>"> - <dt class="<%= "govuk-summary-list__key govuk-!-width-one-half" %>"> - <%= t(".reasons") %> - </dt> - <dd class="<%= "govuk-summary-list__value govuk-!-text-align-right" %>" id="caseworker_review_reasons"> - <% @manual_review_determiner.review_reasons.each do |reason| %> - <%= t(".reason.#{reason}") %> - <br> - <% end %> - </dd> - </div> - - <% @manual_review_determiner.review_categories_by_reason&.each do |reason, categories| %> - <div class="<%= "govuk-summary-list__row normal-word-break govuk-summary-list__row--no-border" %>" id="<%= "means-merits-report__caseworker-review-required-#{reason}" %>"> - <dt class="<%= "govuk-summary-list__key govuk-!-width-one-half" %>"> - <%= t(".category-#{reason}") %> - </dt> - <dd class="<%= "govuk-summary-list__value govuk-!-text-align-right" %>" id="<%= "review-reason-#{reason}" %>"> - <% categories.each do |category| %> - <%= t(".category.#{category}") %> - <br> - <% end %> - </dd> - </div> + <%= govuk_summary_list( + card: { title: t("providers.means_reports.caseworker_review_section_heading") }, + actions: false, + html_attributes: { id: "caseworker-review-questions" }, + ) do |summary_list| %> + <%= summary_list.with_row do |row| %> + <%= row.with_key(text: t(".required"), classes: "govuk-!-width-one-half") %> + <%= row.with_value(text: yes_no(@manual_review_determiner.manual_review_required?)) %> + <% end %> + <% if @manual_review_determiner.manual_review_required? %> + <%= summary_list.with_row do |row| %> + <%= row.with_key(text: t(".reasons")) %> + <%= row.with_value do %> + <% @manual_review_determiner.review_reasons.each do |reason| %> + <%= t(".reason.#{reason}") %><br> + <% end %> + <% end %> + <% end %> + <% @manual_review_determiner.review_categories_by_reason&.each do |reason, categories| %> + <%= summary_list.with_row do |row| %> + <%= row.with_key(text: t(".category-#{reason}"), classes: "govuk-!-width-one-half") %> + <%= row.with_value do %> + <% categories.each do |category| %> + <%= t(".category.#{category}") %><br> + <% end %> <% end %> - <% end %> - </dl> - <hr> - </section> + <% end %> + <% end %> + <% end %> </section> 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 @@ -<h2 class="govuk-heading-m"><%= t("providers.means_reports.dependants_heading") %></h2> - -<dl id="dependants-questions" class="govuk-summary-list govuk-!-margin-bottom-9"> - <%= 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:, - ) %> -</dl> - -<% 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 @@ -<h2 class="govuk-heading-m"><%= t("providers.means_reports.income_cash_payments_heading") %></h2> - -<% 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? %> - <div class="govuk-body"><%= t("generic.none") %></div> -<% end %> - -<dl id="income-cash-payments-questions" class="govuk-summary-list govuk-!-margin-bottom-9"> - <% 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 %>> -</dl> 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 @@ -<h2 class="govuk-heading-m"><%= t("providers.means_reports.income_categories_heading") %></h2> - -<% credits = @legal_aid_application.legal_aid_application_transaction_types.credits %> -<% credit_categories = TransactionType.credits.not_children %> - -<dl id="income-category-questions" class="govuk-summary-list govuk-!-margin-bottom-9"> - <% 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 %> -</dl> 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 @@ -<h2 class="govuk-heading-m"><%= t("providers.means_reports.outgoings_cash_payments_heading") %></h2> - -<% 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? %> - <div class="govuk-body"> <%= t("generic.none") %> </div> -<% end %> - -<dl id="outgoings-cash-payments-questions" class="govuk-summary-list govuk-!-margin-bottom-9"> - <% 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 @@ -<h2 class="govuk-heading-m"><%= t("providers.means_reports.outgoings_categories_heading") %></h2> - -<!-- TODO: move ruby to controller or presenter?! --> -<% debits = @legal_aid_application.legal_aid_application_transaction_types.debits %> -<% debit_categories = TransactionType.debits %> - -<dl id="outgoings-category-questions" class="govuk-summary-list govuk-!-margin-bottom-9"> - <% 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 %> -</dl> diff --git a/app/views/providers/means_reports/_proceeding_eligibility.html.erb b/app/views/providers/means_reports/_proceeding_eligibility.html.erb index 1142c36409..05ba1d9c2b 100644 --- a/app/views/providers/means_reports/_proceeding_eligibility.html.erb +++ b/app/views/providers/means_reports/_proceeding_eligibility.html.erb @@ -1,13 +1,10 @@ <h2 class="govuk-heading-m"><%= t("providers.means_reports.proceeding_eligibility") %></h2> -<dl id="proceeding-eligibility-questions" class="govuk-summary-list govuk-!-margin-bottom-9"> +<%= govuk_summary_list(card: { title: t("providers.means_reports.proceeding_eligibility") }, actions: false, html_attributes: { id: "proceeding-eligibility-questions" }) do |summary_list| %> <% results.each do |proceeding_type, result| %> - <%= check_answer_link( - name: proceeding_type, - question: proceeding_type, - answer: result, - url: nil, - read_only: true, - ) %> + <%= summary_list.with_row do |row| %> + <%= row.with_key(text: proceeding_type, classes: "govuk-!-width-one-half") %> + <%= row.with_value(text: result) %> + <% end %> <% end %> -</dl> +<% end %> diff --git a/app/views/providers/means_reports/_receives_benefits.html.erb b/app/views/providers/means_reports/_receives_benefits.html.erb index 6b98ae74a6..386b3e315a 100644 --- a/app/views/providers/means_reports/_receives_benefits.html.erb +++ b/app/views/providers/means_reports/_receives_benefits.html.erb @@ -2,11 +2,9 @@ <%= t("providers.means_reports.benefit_check_heading") %> </h2> -<dl class="govuk-summary-list govuk-!-margin-bottom-9"> - <%= check_answer_link( - name: :receives_benefit, - question: t("providers.means_reports.benefit_check_question"), - answer: yes_no(@legal_aid_application.applicant_receives_benefit?), - read_only: true, - ) %> -</dl> +<%= govuk_summary_list(card: { title: t("providers.means_reports.benefit_check_heading") }, actions: false) do |summary_list| %> + <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__receives_benefit" }) do |row| %> + <%= row.with_key(text: t("providers.means_reports.benefit_check_question"), classes: "govuk-!-width-one-half") %> + <%= row.with_value(text: yes_no(@legal_aid_application.applicant_receives_benefit?)) %> + <% end %> +<% end %> diff --git a/app/views/providers/means_reports/_student_finance.html.erb b/app/views/providers/means_reports/_student_finance.html.erb deleted file mode 100644 index 39df762085..0000000000 --- a/app/views/providers/means_reports/_student_finance.html.erb +++ /dev/null @@ -1,10 +0,0 @@ -<h2 class="govuk-heading-m"><%= t("providers.means_reports.student_finance_heading") %></h2> - -<dl id="student-finance-questions" class="govuk-summary-list govuk-!-margin-bottom-9"> - <%= check_answer_no_link( - name: :student_finance_annual_amount, - question: "Student loan or grant (per year)", - answer: gds_number_to_currency(@legal_aid_application.applicant.student_finance_amount), - read_only:, - ) %> -</dl> 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? %> - <section class="print-no-break"> - <%= render("income_categories", read_only: true) %> - </section> - - <section class="print-no-break"> - <%= render("student_finance", read_only: true) %> - </section> - - <section class="print-no-break"> - <%= render("income_cash_payments", read_only: true) %> - </section> - - <section class="print-no-break"> - <%= render("dependants", read_only: true) %> - </section> - - <section class="print-no-break"> - <%= render("outgoings_categories", read_only: true) %> - </section> - - <section class="print-no-break"> - <%= render("outgoings_cash_payments", read_only: true) %> - </section> - - <section class="print-no-break"> - <% if @legal_aid_application.applicant.extra_employment_information? %> - <%= render "shared/check_answers/employed_income", partner: false, read_only: true %> - <% end %> - </section> - - <h2 class="govuk-heading-m"> - <%= t(".income_result_heading") %> - </h2> - - <section class="print-no-break"> - <%= render "shared/check_answers/income_result", read_only: true %> - </section> - - <section class="print-no-break"> - <% if @legal_aid_application.full_employment_details? %> - <%= render "shared/check_answers/full_employment_details", individual: "Your client", read_only: true, partner: false %> - <% end %> - </section> - - <div class="govuk-!-padding-bottom-8"></div> - - <%= render "caseworker_review" %> -<% end %> - -<h2 class="govuk-heading-m"> - <%= t(".assets_heading") %> -</h2> - -<%= render "shared/check_answers/assets", read_only: true, individual: "" %> - -<% if @legal_aid_application.passported? && @manual_review_determiner.manual_review_required? %> - <div class="govuk-!-padding-bottom-8"></div> - <%= render "caseworker_review" %> -<% end %> - -<section class="print-no-break"> - <%= render("shared/check_answers/bank_statements", bank_statements: @legal_aid_application.attachments.bank_statement_evidence, read_only: true) %> -</section> 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 ede20c303f..540d38ad42 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 @@ -9,7 +9,7 @@ <%= t(".income_result_heading") %> </h2> - <%= render "shared/check_answers/income_result", read_only: true %> + <%= render "shared/check_answers/income_result", read_only: true, heading: t(".income_result_heading") %> <% if @legal_aid_application.applicant.state_benefits.any? %> <section class="print-no-break"> @@ -27,7 +27,7 @@ <h2 class="govuk-heading-m"> <%= t(".income_details_heading") %> </h2> - <%= render "shared/check_answers/income_details" %> + <%= render "shared/means_report/income_details", heading: t(".income_details_heading") %> </section> <section class="print-no-break"> @@ -56,14 +56,12 @@ <section class="print-no-break"> <h2 class="govuk-heading-l"><%= t(".debits-section-heading") %></h2> - <%= render "shared/check_answers/outgoings_details" %> + <%= render "shared/means_report/outgoings_details", heading: t(".debits-section-heading") %> </section> - <div class="govuk-!-padding-bottom-8"></div> - <section class="print-no-break"> <h2 class="govuk-heading-l"><%= t(".deductions-section-heading") %></h2> - <%= render "shared/check_answers/deductions_details" %> + <%= render "shared/means_report/deductions_details", heading: t(".deductions-section-heading") %> </section> <div class="govuk-!-padding-bottom-8"></div> @@ -86,7 +84,7 @@ <%= t(".capital_result_heading") %> </h2> - <%= render "shared/check_answers/capital_result", read_only: true %> + <%= render "shared/check_answers/capital_result", heading: t(".capital_result_heading") %> </section> <h2 class="govuk-heading-m"> @@ -102,13 +100,11 @@ <% 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(actions: false, classes: "govuk-!-margin-bottom-9") do |summary_list| %> + <%= govuk_summary_list(card: { title: t(".bank_statement_heading") }, actions: false) do |summary_list| %> <% if @legal_aid_application.client_uploading_bank_statements? %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__bank_statements_client" }) do |row| %> <%= row.with_key(text: has_partner ? t(".bank_statement_question_with_partner") : t(".bank_statement_question"), classes: "govuk-!-width-one-half") %> @@ -134,6 +130,5 @@ <% end %> <% end %> <% end %> - <% end %> -</section> + </section> <% end %> diff --git a/app/views/providers/merits_reports/show.html.erb b/app/views/providers/merits_reports/show.html.erb index 3750044e6d..d53a13e49b 100644 --- a/app/views/providers/merits_reports/show.html.erb +++ b/app/views/providers/merits_reports/show.html.erb @@ -23,7 +23,7 @@ <h2 class="govuk-heading-m"><%= t(".previous_legal_aid") %></h2> - <%= govuk_summary_list(classes: "govuk-!-margin-bottom-9", + <%= govuk_summary_list(card: { title: t(".previous_legal_aid") }, html_attributes: { id: "previous-legal-aid-question" }) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__applied_previously" }) do |row| %> <%= row.with_key(text: t(".has_applied_before"), classes: "govuk-!-width-one-half") %> diff --git a/app/views/providers/proceeding_merits_task/check_who_client_is/show.html.erb b/app/views/providers/proceeding_merits_task/check_who_client_is/show.html.erb index f96913594f..59a2848054 100644 --- a/app/views/providers/proceeding_merits_task/check_who_client_is/show.html.erb +++ b/app/views/providers/proceeding_merits_task/check_who_client_is/show.html.erb @@ -7,7 +7,9 @@ <p class="govuk-body"><%= t(".paragraph") %></p> <% end %> - <%= render("shared/check_answers/relationship_to_child", proceeding: @proceeding, relationship_to_child: @relationship_to_child, read_only: false) %> + <%= govuk_summary_list(card: { title: page_title }, actions: true) do |summary_list| %> + <%= render("shared/check_answers/relationship_to_child", summary_list:, proceeding: @proceeding, relationship_to_child: @relationship_to_child) %> + <% end %> <%= next_action_buttons_with_form( url: providers_merits_task_list_check_who_client_is_path(@proceeding), diff --git a/app/views/shared/_application_ref.html.erb b/app/views/shared/_application_ref.html.erb index 1a5170112c..7632c3c73b 100644 --- a/app/views/shared/_application_ref.html.erb +++ b/app/views/shared/_application_ref.html.erb @@ -1,18 +1,10 @@ -<dl class="govuk-summary-list govuk-summary-list--no-border"> - <div class="govuk-summary-list__row"> - <dt class="govuk-summary-list__key"> - <%= t(".apply_ref") %> - </dt> - <dd class="govuk-summary-list__value"> - <%= legal_aid_application.application_ref %> - </dd> - </div> - <div class="govuk-summary-list__row"> - <dt class="govuk-summary-list__key"> - <%= t(".ccms_ref_html") %> - </dt> - <dd class="govuk-summary-list__value"> - <%= legal_aid_application.case_ccms_reference %> - </dd> - </div> -</dl> +<%= govuk_summary_list(classes: "govuk-summary-list--no-border") do |summary_list| %> + <%= summary_list.with_row do |row| %> + <%= row.with_key(text: t(".apply_ref")) %> + <%= row.with_value(text: legal_aid_application.application_ref) %> + <% end %> + <%= summary_list.with_row do |row| %> + <%= row.with_key(text: t(".ccms_ref_html")) %> + <%= row.with_value(text: legal_aid_application.case_ccms_reference) %> + <% end %> +<% end %> diff --git a/app/views/shared/check_answers/_assets.html.erb b/app/views/shared/check_answers/_assets.html.erb index be675e41c5..005bb50f4d 100644 --- a/app/views/shared/check_answers/_assets.html.erb +++ b/app/views/shared/check_answers/_assets.html.erb @@ -14,30 +14,26 @@ <section class="print-no-break"> <%= render "shared/check_answers/vehicles", read_only:, individual: %> -<% if showing_bank_accounts %> - <h2 class="govuk-heading-m"><%= t(".assets.bank_accounts") %></h2> -<% end %> + <% if showing_bank_accounts %> + <h2 class="govuk-heading-m"><%= t(".assets.bank_accounts") %></h2> + <% end %> <% if @legal_aid_application.non_passported? && !@legal_aid_application.client_uploading_bank_statements? %> <!-- non-passported truelayer only --> <% if read_only %> - <h3 class="govuk-heading-m"><%= t(".assets.clients_bank_accounts") %></h3> - - <%= govuk_table(classes: "govuk-!-margin-bottom-9", html_attributes: { id: "applicant-bank-accounts-details" }) do |table| - table.with_body do |body| - @legal_aid_application&.applicant&.bank_accounts&.each do |account| - body.with_row do |row| - row.with_cell(header: true, text: "#{account.name}, #{account.account_number}, #{account.sort_code}") - row.with_cell(numeric: true, text: gds_number_to_currency(account.balance).to_s) - end - end - end - end %> + <%= govuk_summary_list(card: { title: t(".assets.clients_bank_accounts") }, html_attributes: { id: "applicant-bank-accounts-details" }) do |summary_list| %> + <% @legal_aid_application&.applicant&.bank_accounts&.each do |account| %> + <%= summary_list.with_row do |row| %> + <%= row.with_key(text: "#{account.name}, #{account.account_number}, #{account.sort_code}", classes: "govuk-!-width-one-half") %> + <%= row.with_value { gds_number_to_currency(account.balance).to_s } %> + <% end %> + <% end %> + <% end %> <h3 class="govuk-heading-m"><%= t(".assets.money_in_bank_accounts") %></h3> - <%= govuk_summary_list(classes: "govuk-!-margin-bottom-9", html_attributes: { "data-test": "applicant-bank-accounts" }) do |summary_list| %> + <%= govuk_summary_list(card: { title: t(".assets.money_in_bank_accounts") }, html_attributes: { "data-test": "applicant-bank-accounts" }) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__online_current_accounts" }) do |row| %> <%= row.with_key(text: @legal_aid_application&.applicant&.has_partner? ? t(".assets.client_current_account") : t(".assets.current_accounts"), classes: "govuk-!-width-one-half") %> <%= row.with_value { online_current_accounts.present? ? gds_number_to_currency(online_current_accounts) : t("generic.none") } %> @@ -67,7 +63,10 @@ </div> <% end %> </div> - <%= govuk_summary_list(classes: "govuk-!-margin-bottom-9", html_attributes: { id: "app-check-your-answers__bank_accounts_items", "data-test": "applicant-bank-accounts" }) do |summary_list| %> + <%= govuk_summary_list( + card: { title: t(".assets.client_bank_accounts") }, + html_attributes: { id: "app-check-your-answers__bank_accounts_items", "data-test": "applicant-bank-accounts" }, + ) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__offline_current_accounts" }) do |row| %> <%= row.with_key(text: @legal_aid_application&.applicant&.has_partner? ? t(".assets.client_current_account") : t(".assets.current_accounts"), classes: "govuk-!-width-one-half") %> <%= row.with_value { @legal_aid_application&.savings_amount&.offline_current_accounts.present? ? gds_number_to_currency(@legal_aid_application.savings_amount.offline_current_accounts) : t("generic.none") } %> @@ -103,8 +102,7 @@ </div> <% end %> </div> - - <%= govuk_summary_list(classes: "govuk-!-margin-bottom-9", html_attributes: { "data-test": "partner-bank-accounts" }) do |summary_list| %> + <%= govuk_summary_list(card: { title: t(".assets.partner_bank_accounts") }, html_attributes: { "data-test": "partner-bank-accounts" }) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__partner_offline_current_accounts" }) do |row| %> <%= row.with_key(text: t(".assets.partner_current_account"), classes: "govuk-!-width-one-half") %> <%= row.with_value { @legal_aid_application.savings_amount.partner_offline_current_accounts.present? ? gds_number_to_currency(@legal_aid_application.savings_amount.partner_offline_current_accounts) : t("generic.none") } %> @@ -133,7 +131,7 @@ </div> <% end %> </div> - <%= govuk_summary_list(classes: "govuk-!-margin-bottom-9", html_attributes: { "data-test": "joint-bank-accounts" }) do |summary_list| %> + <%= govuk_summary_list(card: { title: t(".assets.joint_bank_accounts") }, html_attributes: { "data-test": "joint-bank-accounts" }) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__joint_offline_current_accounts" }) do |row| %> <%= row.with_key(text: t(".assets.joint_current_account"), classes: "govuk-!-width-one-half") %> <%= row.with_value { @legal_aid_application.savings_amount.joint_offline_current_accounts.present? ? gds_number_to_currency(@legal_aid_application.savings_amount.joint_offline_current_accounts) : t("generic.none") } %> @@ -154,19 +152,17 @@ <% end %> <%# savings and investments %> - <div class="govuk-!-padding-bottom-9"> - <%= render( - "shared/check_answers/one_link_section", - name: :savings_and_investments, - url: check_answer_url_for(journey_type, :savings_and_investments, @legal_aid_application), - question: t(".assets.savings_and_investments#{individual}"), - answer_hash: capital_assets_list( - @legal_aid_application, - locale_namespace: "shared.forms.revealing_checkbox.attribute.#{journey_type}.savings_and_investments.check_box_", - ), - read_only:, - ) %> - </div> + <%= render( + "shared/check_answers/one_link_section", + name: :savings_and_investments, + url: check_answer_url_for(journey_type, :savings_and_investments, @legal_aid_application), + question: t(".assets.savings_and_investments#{individual}"), + answer_hash: capital_assets_list( + @legal_aid_application, + locale_namespace: "shared.forms.revealing_checkbox.attribute.#{journey_type}.savings_and_investments.check_box_", + ), + read_only:, + ) %> <%# other assets %> <%= render( diff --git a/app/views/shared/check_answers/_bank_statements.html.erb b/app/views/shared/check_answers/_bank_statements.html.erb index 191cd4b997..398b7337a2 100644 --- a/app/views/shared/check_answers/_bank_statements.html.erb +++ b/app/views/shared/check_answers/_bank_statements.html.erb @@ -14,7 +14,7 @@ "Client" end %> -<%= govuk_summary_list(actions: !read_only, classes: "govuk-!-margin-bottom-9") do |summary_list| %> +<%= govuk_summary_list(card: { title: t(".section_heading") }, actions: !read_only) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__bank_statements_#{individual.downcase}" }) do |row| %> <%= row.with_key(text: t(".bank_statement_question"), classes: "govuk-!-width-one-half") %> <%= row.with_value do %> diff --git a/app/views/shared/check_answers/_benefits_breakdown.html.erb b/app/views/shared/check_answers/_benefits_breakdown.html.erb index cacc7ad2ee..ecd8aed931 100644 --- a/app/views/shared/check_answers/_benefits_breakdown.html.erb +++ b/app/views/shared/check_answers/_benefits_breakdown.html.erb @@ -8,10 +8,10 @@ <h2 class="govuk-heading-m"> <%= t(".#{individual}.heading") %> </h2> -<%= govuk_summary_list(actions: false) do |summary_list| %> +<%= govuk_summary_list(card: { title: t(".#{individual}.heading") }, actions: false) do |summary_list| %> <% data_source.state_benefits.each do |benefit| %> <% summary_list.with_row do |row| - row.with_key { benefit.description || "" } + row.with_key(text: benefit.description || "", classes: "govuk-!-width-one-half") row.with_value { "#{gds_number_to_currency(benefit.amount)} #{t("transaction_types.frequencies.#{benefit.frequency}").downcase}" } end %> <% end %> diff --git a/app/views/shared/check_answers/_benefits_income.html.erb b/app/views/shared/check_answers/_benefits_income.html.erb index 945544574b..6c6d2eca10 100644 --- a/app/views/shared/check_answers/_benefits_income.html.erb +++ b/app/views/shared/check_answers/_benefits_income.html.erb @@ -9,7 +9,7 @@ <% end %> <h2 class="govuk-heading-m"><%= t(".#{transactions_for}.heading") %></h2> -<%= govuk_summary_list(actions: !read_only, classes: "govuk-!-margin-bottom-9", html_attributes: { id: "state-benefit-section-#{transactions_for}" }) do |summary_list| %> +<%= govuk_summary_list(card: { title: t(".#{transactions_for}.heading") }, actions: !read_only, html_attributes: { id: "state-benefit-section-#{transactions_for}" }) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__#{transactions_for}__state_benefits" }) do |row| %> <%= row.with_key(text: t(".#{transactions_for}.question"), classes: "govuk-!-width-one-half") %> <%= row.with_value { yes_no(individual.receives_state_benefits?) } %> @@ -41,8 +41,8 @@ </div> <%= govuk_summary_list( + card: { title: t(".benefit_heading", index: index + 1) }, actions: false, - classes: "govuk-!-margin-bottom-9", html_attributes: { id: "app-check-your-answers__#{transactions_for}__state_benefits_#{index + 1}_items" }, ) do |summary_list| %> <%= summary_list.with_row do |row| %> diff --git a/app/views/shared/check_answers/_capital_disregard_details.html.erb b/app/views/shared/check_answers/_capital_disregard_details.html.erb index be32af5593..1b279ff569 100644 --- a/app/views/shared/check_answers/_capital_disregard_details.html.erb +++ b/app/views/shared/check_answers/_capital_disregard_details.html.erb @@ -1,22 +1,16 @@ <% capital_disregard_type = capital_disregard.mandatory? ? "mandatory" : "discretionary" %> <% capital_disregard_name = t("providers.means.capital_disregards.#{capital_disregard_type}.#{capital_disregard.name}") %> +<% action_link = govuk_link_to(t("generic.change"), + providers_legal_aid_application_means_capital_disregards_add_detail_path(@legal_aid_application, capital_disregard), + visually_hidden_suffix: capital_disregard_name, + id: "app-check-your-answers__capital_disregard_#{index}_change_link") %> <%= govuk_summary_list( - actions: !read_only, - classes: "govuk-!-margin-bottom-9", + card: { title: t(".#{capital_disregard_type}.heading", count: index + 1), actions: read_only ? [] : [action_link] }, + actions: false, html_attributes: { id: "#{capital_disregard_type}-capital-disregard-questions_#{index}" }, ) do |summary_list| %> - <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__capital_disregard_#{index}_change_link" }) do |row| %> - <%= row.with_key(text: t(".#{capital_disregard_type}.heading", count: index + 1), classes: "govuk-!-width-one-half govuk-heading-m") %> - <%= row.with_value(text: nil) %> - <%= row.with_action( - text: t("generic.change"), - href: providers_legal_aid_application_means_capital_disregards_add_detail_path(@legal_aid_application, capital_disregard), - visually_hidden_text: capital_disregard_name, - ) %> - <% end %> - <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__payment_type" }) do |row| %> <%= row.with_key(text: t(".questions.payment_type"), classes: "govuk-!-width-one-half") %> <%= row.with_value { capital_disregard_name } %> diff --git a/app/views/shared/check_answers/_capital_disregards.html.erb b/app/views/shared/check_answers/_capital_disregards.html.erb index 357944d36a..87d7e91ad9 100644 --- a/app/views/shared/check_answers/_capital_disregards.html.erb +++ b/app/views/shared/check_answers/_capital_disregards.html.erb @@ -1,7 +1,7 @@ <h2 class="govuk-heading-m"><%= t(".heading#{individual}") %></h2> <%= govuk_summary_list( + card: { title: t(".heading#{individual}") }, actions: !read_only, - classes: "govuk-!-margin-bottom-9", html_attributes: { id: "capital-disregards-questions" }, ) do |summary_list| %> diff --git a/app/views/shared/check_answers/_capital_result.html.erb b/app/views/shared/check_answers/_capital_result.html.erb index 214644b246..1c013d0e7f 100644 --- a/app/views/shared/check_answers/_capital_result.html.erb +++ b/app/views/shared/check_answers/_capital_result.html.erb @@ -1,31 +1,20 @@ -<% read_only = false unless local_assigns.key?(:read_only) %> - -<dl id="capital-result-questions" class="govuk-summary-list govuk-!-margin-bottom-9"> - <%= check_answer_link( - name: :total_capital_assessed, - question: t(".total"), - answer: gds_number_to_currency(@legal_aid_application.cfe_result.total_capital), - read_only:, - ) %> - - <%= check_answer_link( - name: :capital_lower_limit, - question: t(".lower_limit_label"), - answer: gds_number_to_currency(Rails.configuration.x.capital_result.lower_limit), - read_only:, - ) %> - - <%= check_answer_link( - name: :capital_upper_limit, - question: t(".upper_limit_label"), - answer: gds_number_to_currency(Rails.configuration.x.capital_result.upper_limit), - read_only:, - ) %> - - <%= check_answer_link( - name: :capital_contribution, - question: t(".contribution"), - answer: gds_number_to_currency(@legal_aid_application.cfe_result.capital_contribution), - read_only:, - ) %> -</dl> +<%= govuk_summary_list(card: { title: heading }, + actions: false, + html_attributes: { id: "capital-result-questions" }) do |summary_list| %> + <% summary_list.with_row(classes: "app-check-your-answers__total_capital_assessed") do |row| + row.with_key(text: t(".total"), classes: "govuk-!-width-one-half") + row.with_value { gds_number_to_currency(@legal_aid_application.cfe_result.total_capital) } + end %> + <% summary_list.with_row(classes: "app-check-your-answers__capital_lower_limit") do |row| + row.with_key { t(".lower_limit_label") } + row.with_value(text: gds_number_to_currency(Rails.configuration.x.capital_result.lower_limit)) + end %> + <% summary_list.with_row(classes: "app-check-your-answers__capital_upper_limit") do |row| + row.with_key { t(".upper_limit_label") } + row.with_value(text: gds_number_to_currency(Rails.configuration.x.capital_result.upper_limit)) + end %> + <% summary_list.with_row(classes: "app-check-your-answers__capital_contribution") do |row| + row.with_key { t(".contribution") } + row.with_value(text: gds_number_to_currency(@legal_aid_application.cfe_result.capital_contribution)) + end %> +<% end %> diff --git a/app/views/shared/check_answers/_cash_payments.html.erb b/app/views/shared/check_answers/_cash_payments.html.erb index e45dfafdf3..dea397a837 100644 --- a/app/views/shared/check_answers/_cash_payments.html.erb +++ b/app/views/shared/check_answers/_cash_payments.html.erb @@ -16,17 +16,18 @@ @legal_aid_application.outgoing_cash_transaction_types_for(individual) end %> -<% if cash_transaction_types.none? %> - <div class="govuk-body"><%= t("generic.none") %></div> -<% end %> - <% cash_transactions = @legal_aid_application.cash_transactions.where(owner_type: individual) %> <%= govuk_summary_list( + card: { title: t(".#{type}_heading", individual_with_determiner:) }, actions: false, - classes: "govuk-!-margin-bottom-9", html_attributes: { "data-check-your-answers-section": t(".#{type}_heading", individual_with_determiner:).parameterize }, ) do |summary_list| %> + <% if cash_transaction_types.none? %> + <%= summary_list.with_row do |row| %> + <%= row.with_value { t("generic.none") } %> + <% end %> + <% end %> <% cash_transaction_types.each do |category| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__#{category.label_name.parameterize}-cash-#{type}-#{individual.downcase}" }) do |row| %> <%= row.with_key(text: category.label_name, classes: "govuk-!-width-one-half") %> diff --git a/app/views/shared/check_answers/_children_involved.html.erb b/app/views/shared/check_answers/_children_involved.html.erb index e896e90862..b2b48740c7 100644 --- a/app/views/shared/check_answers/_children_involved.html.erb +++ b/app/views/shared/check_answers/_children_involved.html.erb @@ -6,7 +6,7 @@ read_only:, ) %> - <%= govuk_summary_list(actions: false, classes: "govuk-!-margin-bottom-2") do |summary_list| %> + <%= govuk_summary_list(card: { title: t(".involved-children-heading") }, actions: false) do |summary_list| %> <% @legal_aid_application.involved_children.each_with_index do |child, i| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__involved_child_#{i + 1}" }) do |row| %> <%= row.with_key(text: "#{t('.child')} #{i + 1}", classes: "govuk-!-width-one-half") %> diff --git a/app/views/shared/check_answers/_client_details.html.erb b/app/views/shared/check_answers/_client_details.html.erb index d2d15bb2c0..ca8ceebc60 100644 --- a/app/views/shared/check_answers/_client_details.html.erb +++ b/app/views/shared/check_answers/_client_details.html.erb @@ -1,4 +1,4 @@ -<%= govuk_summary_list(classes: "govuk-!-margin-bottom-9", +<%= govuk_summary_list(card: { title: t(".heading") }, html_attributes: { id: "client-details-questions" }, actions: !read_only) do |summary_list| %> <% if :first_name.in?(attributes) %> diff --git a/app/views/shared/check_answers/_deductions_details.html.erb b/app/views/shared/check_answers/_deductions_details.html.erb deleted file mode 100644 index d0388d9b0a..0000000000 --- a/app/views/shared/check_answers/_deductions_details.html.erb +++ /dev/null @@ -1,9 +0,0 @@ -<section> - <dl id="deductions-details-questions" class="govuk-summary-list govuk-!-margin-bottom-9"> - <% deductions_detail_items(@legal_aid_application).each do |item| %> - <%= render "shared/means_report/item", item.to_h %> - <% end %> - <%= render "shared/means_report/total", name: "total_deductions", value_method: :total_deductions %> - </dl> - -</section> diff --git a/app/views/shared/check_answers/_dependants.html.erb b/app/views/shared/check_answers/_dependants.html.erb index 84424e7459..4f96beed5c 100644 --- a/app/views/shared/check_answers/_dependants.html.erb +++ b/app/views/shared/check_answers/_dependants.html.erb @@ -10,8 +10,8 @@ end end %> -<%= govuk_summary_list(actions: !read_only, - classes: "govuk-!-margin-bottom-9", +<%= govuk_summary_list(card: { title: t("providers.means.check_income_answers.dependants.heading") }, + actions: !read_only, html_attributes: { id: "dependants-questions" }) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__dependants" }) do |row| %> <%= row.with_key(text: t("shared.check_answers.dependants.has_dependants", individual:), classes: "govuk-!-width-one-half") %> @@ -44,8 +44,8 @@ <% end %> </div> <%= govuk_summary_list( + card: { title: t(".dependant_name", position: index + 1, name: dependant.name) }, actions: false, - classes: "govuk-!-margin-bottom-9", html_attributes: { id: "app-check-your-answers__dependants_#{index + 1}_items" }, ) do |summary_list| %> <% dependant_hash(dependant)&.fetch(:items, [])&.each_with_index do |item, index| %> diff --git a/app/views/shared/check_answers/_emergency_costs.html.erb b/app/views/shared/check_answers/_emergency_costs.html.erb index 6878fe9d6c..04735c215a 100644 --- a/app/views/shared/check_answers/_emergency_costs.html.erb +++ b/app/views/shared/check_answers/_emergency_costs.html.erb @@ -1,4 +1,4 @@ -<%= govuk_summary_list(actions: false, classes: "govuk-!-margin-bottom-9") do |summary_list| %> +<%= govuk_summary_list(card: { title: t(".heading") }, actions: false) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__emergency_cost_override" }) do |row| %> <%= row.with_key(text: t(".request_higher_limit"), classes: "govuk-!-width-one-half") %> <%= row.with_value { yes_no(@legal_aid_application.emergency_cost_override) } %> diff --git a/app/views/shared/check_answers/_employed_income.html.erb b/app/views/shared/check_answers/_employed_income.html.erb index 8c5f7dec34..6833d5b206 100644 --- a/app/views/shared/check_answers/_employed_income.html.erb +++ b/app/views/shared/check_answers/_employed_income.html.erb @@ -22,20 +22,20 @@ <% end %> </div> </div> -<dl id="employment-<%= individual %>-notes-questions" class="govuk-summary-list govuk-!-margin-bottom-9"> - <%= check_answer_no_link( - name: :extra_employment_information, - question: t(".#{individual}.employment_question"), - answer: safe_yes_or_no(model.extra_employment_information?), - read_only:, - ) %> - - <% if model.extra_employment_information? %> - <%= check_long_question_no_link( - name: :extra_employment_information_details, - question: t(".#{individual}.employment_details"), - answer: model.extra_employment_information_details, - ) %> +<%= govuk_summary_list( + card: { title: t(".#{individual}.heading") }, + actions: false, + html_attributes: { id: "employment-#{individual}-notes-questions" }, + ) do |summary_list| %> + <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__extra_employment_information" }) do |row| %> + <%= row.with_key(text: t(".#{individual}.employment_question"), classes: "govuk-!-width-one-half") %> + <%= row.with_value(text: safe_yes_or_no(model.extra_employment_information?)) %> + <% end %> + <% if model.extra_employment_information? %> + <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__extra_employment_information_details" }) do |row| %> + <%= row.with_key(text: t(".#{individual}.employment_details"), classes: "govuk-!-width-one-half") %> + <%= row.with_value(text: model.extra_employment_information_details) %> + <% end %> + <% end %> <% end %> -</dl> diff --git a/app/views/shared/check_answers/_full_employment_details.html.erb b/app/views/shared/check_answers/_full_employment_details.html.erb index f43805f2cb..bcb2f7afe5 100644 --- a/app/views/shared/check_answers/_full_employment_details.html.erb +++ b/app/views/shared/check_answers/_full_employment_details.html.erb @@ -21,7 +21,7 @@ <% end %> </div> -<%= govuk_summary_list(actions: false, classes: "govuk-!-margin-bottom-9", html_attributes: { id: "employment-income-questions" }) do |summary_list| %> +<%= govuk_summary_list(card: { title: t(".employment", individual:) }, actions: false, html_attributes: { id: "employment-income-questions" }) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__full_employment_details" }) do |row| %> <%= row.with_key(text: t(".details", individual_with_determiner:).upcase_first, classes: "govuk-!-width-one-half") %> <%= row.with_value { content.presence || "-" } %> diff --git a/app/views/shared/check_answers/_gateway_evidence.html.erb b/app/views/shared/check_answers/_gateway_evidence.html.erb index 04f80dee79..4a14962db1 100644 --- a/app/views/shared/check_answers/_gateway_evidence.html.erb +++ b/app/views/shared/check_answers/_gateway_evidence.html.erb @@ -1,6 +1,6 @@ <section class="print-no-break govuk-!-padding-top-6"> <h2 class="govuk-heading-m"><%= t(".heading") %></h2> - <%= govuk_summary_list do |summary_list| %> + <%= govuk_summary_list(card: { title: t(".heading") }) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__gateway_evidence" }) do |row| %> <%= row.with_key(text: t(".gateway_evidence"), classes: "govuk-!-width-one-half") %> <%= row.with_value do %> diff --git a/app/views/shared/check_answers/_housing_benefit.html.erb b/app/views/shared/check_answers/_housing_benefit.html.erb index 16a9721b4c..11f778c597 100644 --- a/app/views/shared/check_answers/_housing_benefit.html.erb +++ b/app/views/shared/check_answers/_housing_benefit.html.erb @@ -17,8 +17,8 @@ </div> <%= govuk_summary_list( + card: { title: t(".heading") }, actions: false, - classes: "govuk-!-margin-bottom-9", html_attributes: { "data-check-your-answers-section": t(".heading").parameterize }, ) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__housing_benefit_question" }) do |row| %> diff --git a/app/views/shared/check_answers/_income_details.html.erb b/app/views/shared/check_answers/_income_details.html.erb deleted file mode 100644 index dcdb202c0f..0000000000 --- a/app/views/shared/check_answers/_income_details.html.erb +++ /dev/null @@ -1,9 +0,0 @@ -<section> - <dl id="income-details-questions" class="govuk-summary-list govuk-!-margin-bottom-9"> - <% income_detail_items(@legal_aid_application).each do |item| %> - <%= render "shared/means_report/item", item.to_h %> - <% end %> - <%= render "shared/means_report/total", name: "total_income", value_method: :combined_total_gross_income_assessed %> - </dl> - -</section> diff --git a/app/views/shared/check_answers/_income_result.html.erb b/app/views/shared/check_answers/_income_result.html.erb index 42f15d4920..0a38423d40 100644 --- a/app/views/shared/check_answers/_income_result.html.erb +++ b/app/views/shared/check_answers/_income_result.html.erb @@ -1,47 +1,30 @@ <section class="print-no-break"> - <% read_only = false unless local_assigns.key?(:read_only) %> - - <dl id="income-result-questions" class="govuk-summary-list govuk-!-margin-bottom-9"> - <%= check_answer_link( - name: :total_gross_income_assessed, - question: t(".total_gross_income"), - answer: gds_number_to_currency(@legal_aid_application.cfe_result.combined_total_gross_income_assessed), - read_only:, - ) %> - - <%= check_answer_link( - name: :total_disposable_income_assessed, - question: t(".total_disposable_income"), - answer: gds_number_to_currency(@legal_aid_application.cfe_result.total_disposable_income_assessed(partner: @legal_aid_application&.applicant&.has_partner_with_no_contrary_interest?)), - read_only:, - ) %> - - <%= check_answer_link( - name: :gross_income_limit, - question: t(".gross_income_limit"), - answer: number_to_currency_or_na(@legal_aid_application.cfe_result.gross_income_upper_threshold), - read_only:, - ) %> - - <%= check_answer_link( - name: :disposable_income_lower_limit, - question: t(".disposable_income_lower_limit"), - answer: gds_number_to_currency(@legal_aid_application.cfe_result.disposable_income_lower_threshold), - read_only:, - ) %> - - <%= check_answer_link( - name: :disposable_income_upper_limit_limit, - question: t(".disposable_income_upper_limit"), - answer: number_to_currency_or_na(@legal_aid_application.cfe_result.disposable_income_upper_threshold), - read_only:, - ) %> - - <%= check_answer_link( - name: :disposable_income_contribution, - question: t(".disposable_income_contribution"), - answer: gds_number_to_currency(@legal_aid_application.cfe_result.income_contribution), - read_only:, - ) %> - </dl> + <%= govuk_summary_list(card: { title: heading }, + actions: false, + html_attributes: { id: "income-result-questions" }) do |summary_list| %> + <% summary_list.with_row(html_attributes: { id: "app-check-your-answers__total_gross_income_assessed" }) do |row| + row.with_key(text: t(".total_gross_income"), classes: "govuk-!-width-one-half") + row.with_value(text: gds_number_to_currency(@legal_aid_application.cfe_result.combined_total_gross_income_assessed)) + end %> + <% summary_list.with_row(html_attributes: { id: "app-check-your-answers__total_disposable_income_assessed" }) do |row| + row.with_key(text: t(".total_disposable_income"), classes: "govuk-!-width-one-half") + row.with_value(text: gds_number_to_currency(@legal_aid_application.cfe_result.total_disposable_income_assessed(partner: @legal_aid_application&.applicant&.has_partner_with_no_contrary_interest?))) + end %> + <% summary_list.with_row(html_attributes: { id: "app-check-your-answers__gross_income_limit" }) do |row| + row.with_key(text: t(".gross_income_limit"), classes: "govuk-!-width-one-half") + row.with_value(text: number_to_currency_or_na(@legal_aid_application.cfe_result.gross_income_upper_threshold)) + end %> + <% summary_list.with_row(html_attributes: { id: "app-check-your-answers__disposable_income_lower_limit" }) do |row| + row.with_key(text: t(".disposable_income_lower_limit"), classes: "govuk-!-width-one-half") + row.with_value(text: gds_number_to_currency(@legal_aid_application.cfe_result.disposable_income_lower_threshold)) + end %> + <% summary_list.with_row(html_attributes: { id: "app-check-your-answers__disposable_income_upper_limit_limit" }) do |row| + row.with_key(text: t(".disposable_income_upper_limit"), classes: "govuk-!-width-one-half") + row.with_value(text: number_to_currency_or_na(@legal_aid_application.cfe_result.disposable_income_upper_threshold)) + end %> + <% summary_list.with_row(html_attributes: { id: "app-check-your-answers__disposable_income_contribution" }) do |row| + row.with_key(text: t(".disposable_income_contribution"), classes: "govuk-!-width-one-half") + row.with_value(text: gds_number_to_currency(@legal_aid_application.cfe_result.income_contribution)) + end %> + <% end %> </section> diff --git a/app/views/shared/check_answers/_laspo.html.erb b/app/views/shared/check_answers/_laspo.html.erb index 2426b33c1a..7456d5e059 100644 --- a/app/views/shared/check_answers/_laspo.html.erb +++ b/app/views/shared/check_answers/_laspo.html.erb @@ -1,6 +1,6 @@ <section> <h2 class="govuk-heading-m govuk-!-padding-top-6"><%= t(".heading") %></h2> - <%= govuk_summary_list(actions: !read_only, classes: "govuk-!-margin-bottom-2") do |summary_list| %> + <%= govuk_summary_list(card: { title: t(".heading") }, actions: !read_only) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__in_scope_of_laspo" }) do |row| %> <%= row.with_key(text: t(".question"), classes: "govuk-!-width-one-half") %> <%= row.with_value(text: yes_no(@legal_aid_application.in_scope_of_laspo)) %> diff --git a/app/views/shared/check_answers/_latest_incident_details.html.erb b/app/views/shared/check_answers/_latest_incident_details.html.erb index f1dda7aa74..1d3d652122 100644 --- a/app/views/shared/check_answers/_latest_incident_details.html.erb +++ b/app/views/shared/check_answers/_latest_incident_details.html.erb @@ -7,7 +7,7 @@ read_only:, ) %> - <%= govuk_summary_list(actions: false, classes: "govuk-!-margin-bottom-2") do |summary_list| %> + <%= govuk_summary_list(card: { title: t(".latest-incident-heading") }, actions: false) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__notification_of_latest_incident" }) do |row| %> <%= row.with_key(text: t(".notification_of_latest_incident"), classes: "govuk-!-width-one-half") %> <%= row.with_value(text: incident&.told_on) %> diff --git a/app/views/shared/check_answers/_linking_and_copying.html.erb b/app/views/shared/check_answers/_linking_and_copying.html.erb index e6458c6add..1a6c3a8f6a 100644 --- a/app/views/shared/check_answers/_linking_and_copying.html.erb +++ b/app/views/shared/check_answers/_linking_and_copying.html.erb @@ -5,8 +5,8 @@ <h2 class="govuk-heading-m"><%= t ".section_linking.heading" %></h2> </div> </div> - <%= govuk_summary_list(actions: !read_only, - classes: "govuk-!-margin-bottom-9", + <%= govuk_summary_list(card: { title: t(".section_linking.heading") }, + actions: !read_only, html_attributes: { id: "app-check-your-answers__linking_items" }) do |summary_list| summary_list.with_row(classes: "app-check-your-answers__linking_question") do |row| row.with_key(text: t(".section_linking.linked"), classes: "govuk-!-width-one-half") @@ -39,7 +39,7 @@ <h2 class="govuk-heading-m"><%= t ".other_links_section.#{@legal_aid_application.lead_linked_application.link_type_code}" %></h2> </div> </div> - <%= govuk_summary_list(actions: false, classes: "govuk-!-margin-bottom-9") do |summary_list| + <%= govuk_summary_list(card: { title: t(".other_links_section.#{@legal_aid_application.lead_linked_application.link_type_code}") }, actions: false) do |summary_list| all_linked_applications(@legal_aid_application).each do |application| summary_list.with_row do |row| row.with_key(text: application.applicant.full_name, classes: "govuk-!-width-one-half") @@ -63,8 +63,8 @@ end %> </div> </div> - <%= govuk_summary_list(actions: !read_only, - classes: "govuk-!-margin-bottom-9", + <%= govuk_summary_list(card: { title: t(".section_copying.heading") }, + actions: !read_only, html_attributes: { id: "app-check-your-answers__copying_items" }) do |summary_list| summary_list.with_row(classes: "app-check-your-answers__copy_question") do |row| row.with_key(text: t(".section_copying.question"), classes: "govuk-!-width-one-half") diff --git a/app/views/shared/check_answers/_matter_opposition.html.erb b/app/views/shared/check_answers/_matter_opposition.html.erb index 28508b4737..4d3d41e007 100644 --- a/app/views/shared/check_answers/_matter_opposition.html.erb +++ b/app/views/shared/check_answers/_matter_opposition.html.erb @@ -6,7 +6,7 @@ read_only:, ) %> - <%= govuk_summary_list(actions: false, classes: "govuk-!-margin-bottom-2") do |summary_list| %> + <%= govuk_summary_list(card: { title: t(".matter_opposed_reason_heading") }, actions: false) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__matter_opposed_reason" }) do |row| %> <%= row.with_key(text: t(".matter_opposed_reason"), classes: "govuk-!-width-one-half") %> <%= row.with_value(text: @legal_aid_application.matter_opposition.reason) %> diff --git a/app/views/shared/check_answers/_merits_proceeding_section.html.erb b/app/views/shared/check_answers/_merits_proceeding_section.html.erb index 78c437a80b..bb2011c68d 100644 --- a/app/views/shared/check_answers/_merits_proceeding_section.html.erb +++ b/app/views/shared/check_answers/_merits_proceeding_section.html.erb @@ -4,8 +4,8 @@ <section class="print-no-break govuk-!-padding-top-6"> <h2 class="govuk-heading-l"><%= proceeding.meaning %></h2> - <% if proceeding.chances_of_success %> - <%= govuk_summary_list(actions: !read_only, classes: "govuk-!-margin-bottom-0") do |summary_list| %> + <%= govuk_summary_list(card: { title: proceeding.meaning }, actions: !read_only) do |summary_list| %> + <% if proceeding.chances_of_success %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__#{proceeding.id}_success_likely" }) do |row| %> <%= row.with_key(text: t(".prospects_of_success"), classes: "govuk-!-width-one-half") %> <%= row.with_value(text: yes_no(proceeding.chances_of_success.success_likely)) %> @@ -16,10 +16,7 @@ ) %> <% end %> <% unless proceeding.chances_of_success.success_likely? %> - <%= summary_list.with_row( - classes: "govuk-summary-list__row--no-border", - html_attributes: { id: "app-check-your-answers__#{proceeding.id}_success_prospect" }, - ) do |row| %> + <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__#{proceeding.id}_success_prospect" }) do |row| %> <%= row.with_key(text: t(".success_prospect"), classes: "govuk-!-width-one-half") %> <%= row.with_value(text: t("shared.forms.success_prospect.#{proceeding.chances_of_success.success_prospect}")) %> <%= row.with_action( @@ -29,16 +26,19 @@ ) %> <% end %> <% end %> + <% if proceeding.chances_of_success.success_prospect_details %> + <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__#{proceeding.id}_success_prospect" }) do |row| %> + <%= row.with_key(text: t(".chances_of_success_details"), classes: "govuk-!-width-one-half") %> + <%= row.with_value(text: proceeding.chances_of_success.success_prospect_details) %> + <%= row.with_action( + text: t("generic.change"), + href: providers_merits_task_list_success_prospects_path(proceeding), + visually_hidden_text: t(".chances_of_success_details"), + ) %> + <% end %> + <% end %> <% end %> - - <% if proceeding.chances_of_success.success_prospect_details %> - <p class='govuk-body'><%= proceeding.chances_of_success.success_prospect_details %></p> - <hr class="govuk-section-break govuk-section-break--visible govuk-!-width-full"> - <% end %> - <% end %> - - <% if proceeding.attempts_to_settle || proceeding.section8? || proceeding.specific_issue || proceeding.prohibited_steps || proceeding.special_childrens_act? %> - <%= govuk_summary_list(actions: !read_only, classes: "govuk-!-margin-bottom-0") do |summary_list| %> + <% if proceeding.attempts_to_settle || proceeding.section8? || proceeding.specific_issue || proceeding.prohibited_steps || proceeding.special_childrens_act? %> <% if proceeding.attempts_to_settle %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__#{proceeding.id}_attempts_to_settle" }) do |row| %> <%= row.with_key(text: t(".attempts_to_settle"), classes: "govuk-!-width-one-half") %> @@ -62,10 +62,7 @@ <% end %> <% end %> <% if proceeding.specific_issue %> - <%= summary_list.with_row( - html_attributes: { id: "app-check-your-answers__#{proceeding.id}_specific_issue", - classes: "govuk-!-margin-bottom-2" }, - ) do |row| %> + <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__#{proceeding.id}_specific_issue" }) do |row| %> <%= row.with_key(text: t(".specific_issue"), classes: "govuk-!-width-one-half") %> <%= row.with_value(text: proceeding.specific_issue.details) %> <%= row.with_action( @@ -76,10 +73,7 @@ <% end %> <% end %> <% if proceeding.prohibited_steps %> - <%= summary_list.with_row( - html_attributes: { id: "app-check-your-answers__#{proceeding.id}_prohibited_steps" }, - classes: "govuk-summary-list__row--no-border", - ) do |row| %> + <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__#{proceeding.id}_prohibited_steps" }) do |row| %> <%= row.with_key(text: t(".prohibited_steps"), classes: "govuk-!-width-one-half") %> <%= row.with_value(text: yes_no(proceeding.prohibited_steps.uk_removal)) %> <%= row.with_action( @@ -88,21 +82,24 @@ visually_hidden_text: t(".prohibited_steps"), ) %> <% end %> + <% unless proceeding.prohibited_steps.uk_removal %> + <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__#{proceeding.id}_prohibited_steps" }) do |row| %> + <%= row.with_key(text: t(".what_is_prohibited"), classes: "govuk-!-width-one-half") %> + <%= row.with_value(text: proceeding.prohibited_steps.details) %> + <%= row.with_action( + text: t("generic.change"), + href: providers_merits_task_list_prohibited_steps_path(proceeding), + visually_hidden_text: t(".what_is_prohibited"), + ) %> + <% end %> + <% end %> <% end %> <% end %> - - <% if proceeding.prohibited_steps && !proceeding.prohibited_steps.uk_removal %> - <p class='govuk-body'><%= proceeding.prohibited_steps.details %></p> + <% if proceeding.relationship_to_child %> + <%= render("shared/check_answers/relationship_to_child", summary_list:, proceeding:, relationship_to_child: proceeding.relationship_to_child) %> <% end %> - <hr class="govuk-section-break govuk-section-break--visible govuk-!-width-full"> - <% end %> - - <% if proceeding.relationship_to_child %> - <%= render("shared/check_answers/relationship_to_child", proceeding:, relationship_to_child: proceeding.relationship_to_child, read_only:) %> - <% end %> - <% unless proceeding.special_childrens_act? %> - <%= govuk_summary_list(actions: !read_only) do |summary_list| %> + <% unless proceeding.special_childrens_act? %> <% if proceeding.vary_order %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__#{proceeding.id}_vary_order" }) do |row| %> <%= row.with_key(text: t(".vary_order"), classes: "govuk-!-width-one-half") %> diff --git a/app/views/shared/check_answers/_offline_savings_accounts.html.erb b/app/views/shared/check_answers/_offline_savings_accounts.html.erb index 5be9ac40d1..81f0cf6818 100644 --- a/app/views/shared/check_answers/_offline_savings_accounts.html.erb +++ b/app/views/shared/check_answers/_offline_savings_accounts.html.erb @@ -17,7 +17,7 @@ </div> <% end %> </div> - <%= govuk_summary_list(actions: false, classes: "govuk-!-margin-bottom-9", html_attributes: { "data-test": "offline-savings-accounts" }) do |summary_list| %> + <%= govuk_summary_list(card: { title: t(".heading") }, actions: false, html_attributes: { "data-test": "offline-savings-accounts" }) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__has_offline_savings" }) do |row| %> <%= row.with_key(text: t(".offline_savings_accounts"), classes: "govuk-!-width-one-half") %> <%= row.with_value { safe_yes_or_no(@legal_aid_application.offline_savings?) } %> @@ -29,7 +29,7 @@ <% end %> <% else %> <h3 class="govuk-heading-m"><%= t(".heading") %></h3> - <%= govuk_summary_list(actions: !read_only, classes: "govuk-!-margin-bottom-9") do |summary_list| %> + <%= govuk_summary_list(card: { title: t(".heading") }, actions: !read_only) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__has_offline_savings" }) do |row| %> <%= row.with_key(text: t(".offline_savings_accounts"), classes: "govuk-!-width-one-half") %> <%= row.with_value { safe_yes_or_no(@legal_aid_application.offline_savings?) } %> diff --git a/app/views/shared/check_answers/_one_link_section.html.erb b/app/views/shared/check_answers/_one_link_section.html.erb index ef13864d68..a748cdd1ef 100644 --- a/app/views/shared/check_answers/_one_link_section.html.erb +++ b/app/views/shared/check_answers/_one_link_section.html.erb @@ -14,8 +14,8 @@ </div> <%= govuk_summary_list( + card: { title: question }, actions: !read_only, - classes: "govuk-!-margin-bottom-9", html_attributes: { id: "app-check-your-answers__#{name}_items" }, ) do |summary_list| %> <% if answer_hash.present? %> diff --git a/app/views/shared/check_answers/_opponent_details.html.erb b/app/views/shared/check_answers/_opponent_details.html.erb index 88671bbdbf..9629b9e275 100644 --- a/app/views/shared/check_answers/_opponent_details.html.erb +++ b/app/views/shared/check_answers/_opponent_details.html.erb @@ -5,132 +5,147 @@ question: t(".opponent-heading"), read_only:, ) %> - <%= govuk_summary_list(actions: !read_only, classes: "govuk-!-margin-bottom-2") do |summary_list| %> + <%= govuk_summary_list(card: { title: t(".opponent-heading") }, actions: !read_only) do |summary_list| %> <% opponents.order(:created_at).each_with_index do |opponent, i| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__opponent_#{i + 1}" }) do |row| %> <%= row.with_key(text: "#{t('.opponent')} #{i + 1}", classes: "govuk-!-width-one-half") %> <%= row.with_value { sanitize("#{opponent.full_name},<br>#{opponent_type_description(opponent)}") } %> <% end %> <% end %> - - <% if parties_mental_capacity %> + <% end %> + <% if parties_mental_capacity %> + <%= govuk_summary_list(card: { title: t(".mental_capacity.heading") }, actions: !read_only) do |summary_list| %> <%= summary_list.with_row( - classes: "govuk-summary-list__row--no-border", html_attributes: { id: "app-check-your-answers__opponent_understands_terms_of_court_order" }, ) do |row| %> - <%= row.with_key(text: t(".understands_terms_of_court_order"), classes: "govuk-!-width-one-half") %> + <%= row.with_key(text: t(".mental_capacity.understands_terms"), classes: "govuk-!-width-one-half") %> <%= row.with_value(text: yes_no(parties_mental_capacity.understands_terms_of_court_order)) %> <%= row.with_action( text: t("generic.change"), href: providers_legal_aid_application_opponents_mental_capacity_path(@legal_aid_application), - visually_hidden_text: t(".understands_terms_of_court_order"), + visually_hidden_text: t(".mental_capacity.understands_terms"), ) %> <% end %> + <% unless parties_mental_capacity.understands_terms_of_court_order? %> + <%= summary_list.with_row do |row| %> + <%= row.with_key(text: t(".mental_capacity.reasons"), classes: "govuk-!-width-one-half") %> + <%= row.with_value(text: parties_mental_capacity.understands_terms_of_court_order_details) %> + <%= row.with_action( + text: t("generic.change"), + href: providers_legal_aid_application_opponents_mental_capacity_path(@legal_aid_application), + visually_hidden_text: t(".mental_capacity.reasons"), + ) %> + <% end %> + <% end %> <% end %> <% end %> - <% if parties_mental_capacity %> - <div class='govuk-body'><%= parties_mental_capacity.understands_terms_of_court_order_details %></div> - - <hr class="govuk-section-break govuk-section-break--visible govuk-!-width-full"> - <% end %> - <% if task_list_includes?(@legal_aid_application, :domestic_abuse_summary) %> - <%= govuk_summary_list(actions: !read_only, classes: "govuk-!-margin-bottom-2") do |summary_list| %> - <%= summary_list.with_row( - classes: "govuk-summary-list__row--no-border", - html_attributes: { id: "app-check-your-answers__opponent_warning_letter_sent" }, - ) do |row| %> - <%= row.with_key(text: t(".warning_letter_sent"), classes: "govuk-!-width-one-half") %> - <%= row.with_value(text: yes_no(domestic_abuse_summary.warning_letter_sent)) %> - <%= row.with_action( - text: t("generic.change"), - href: providers_legal_aid_application_domestic_abuse_summary_path(@legal_aid_application), - visually_hidden_text: t(".warning_letter_sent"), - ) %> + <%= govuk_summary_list(card: { title: t(".domestic_abuse.heading") }, actions: !read_only) do |summary_list| %> + <% unless domestic_abuse_summary.warning_letter_sent? %> + <%= summary_list.with_row( + html_attributes: { id: "app-check-your-answers__opponent_warning_letter_sent" }, + ) do |row| %> + <%= row.with_key(text: t(".domestic_abuse.warning_letter_reasons"), classes: "govuk-!-width-one-half") %> + <%= row.with_value(text: domestic_abuse_summary.warning_letter_sent_details) %> + <%= row.with_action( + text: t("generic.change"), + href: providers_legal_aid_application_domestic_abuse_summary_path(@legal_aid_application), + visually_hidden_text: t(".domestic_abuse.warning_letter_reasons"), + ) %> + <% end %> <% end %> - <% end %> - <div class='govuk-body'><%= domestic_abuse_summary.warning_letter_sent_details %></div> - <hr class="govuk-section-break govuk-section-break--visible govuk-!-width-full"> - <%= govuk_summary_list(actions: !read_only, classes: "govuk-!-margin-bottom-2") do |summary_list| %> - <%= summary_list.with_row( - classes: "govuk-summary-list__row--no-border", - html_attributes: { id: "app-check-your-answers__police_notified" }, - ) do |row| %> - <%= row.with_key(text: t(".police_notified"), classes: "govuk-!-width-one-half") %> - <%= row.with_value(text: yes_no(domestic_abuse_summary.police_notified)) %> + <% police_question = domestic_abuse_summary.police_notified? ? "police_notified_details" : "police_not_notified" %> + <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__opponent_warning_letter_sent" }) do |row| %> + <%= row.with_key(text: t(".domestic_abuse.#{police_question}"), classes: "govuk-!-width-one-half") %> + <%= row.with_value(text: domestic_abuse_summary.police_notified_details) %> <%= row.with_action( text: t("generic.change"), href: providers_legal_aid_application_domestic_abuse_summary_path(@legal_aid_application), - visually_hidden_text: t(".police_notified"), + visually_hidden_text: t(".domestic_abuse.#{police_question}"), ) %> <% end %> - <% end %> - <div class='govuk-body'><%= domestic_abuse_summary.police_notified_details %></div> - <hr class="govuk-section-break govuk-section-break--visible govuk-!-width-full"> - <%= govuk_summary_list(actions: !read_only, classes: "govuk-!-margin-bottom-2") do |summary_list| %> - <%= summary_list.with_row( - classes: "govuk-summary-list__row--no-border", - html_attributes: { id: "app-check-your-answers__bail_conditions_set" }, - ) do |row| %> - <%= row.with_key(text: t(".bail_conditions_set"), classes: "govuk-!-width-one-half") %> - <%= row.with_value(text: yes_no(domestic_abuse_summary.bail_conditions_set)) %> - <%= row.with_action( - text: t("generic.change"), - href: providers_legal_aid_application_domestic_abuse_summary_path(@legal_aid_application), - visually_hidden_text: t(".bail_conditions_set"), - ) %> + <% if domestic_abuse_summary.bail_conditions_set %> + <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__bail_conditions" }) do |row| %> + <%= row.with_key(text: t(".domestic_abuse.bail_conditions"), classes: "govuk-!-width-one-half") %> + <%= row.with_value(text: domestic_abuse_summary.bail_conditions_set_details) %> + <%= row.with_action( + text: t("generic.change"), + href: providers_legal_aid_application_domestic_abuse_summary_path(@legal_aid_application), + visually_hidden_text: t(".domestic_abuse.bail_conditions"), + ) %> + <% end %> + <% else %> + <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__bail_conditions_set" }) do |row| %> + <%= row.with_key(text: t(".domestic_abuse.bail_conditions_set"), classes: "govuk-!-width-one-half") %> + <%= row.with_value(text: yes_no(domestic_abuse_summary.bail_conditions_set)) %> + <%= row.with_action( + text: t("generic.change"), + href: providers_legal_aid_application_domestic_abuse_summary_path(@legal_aid_application), + visually_hidden_text: t(".domestic_abuse.bail_conditions_set"), + ) %> + <% end %> <% end %> <% end %> - <div class='govuk-body'><%= domestic_abuse_summary.bail_conditions_set_details %></div> - <hr class="govuk-section-break govuk-section-break--visible govuk-!-width-full"> <% end %> <% unless @legal_aid_application.special_children_act_proceedings? %> - <%= govuk_summary_list(actions: !read_only, classes: "govuk-!-margin-bottom-2") do |summary_list| %> - <%= summary_list.with_row( - classes: "govuk-summary-list__row--no-border", - html_attributes: { id: "app-check-your-answers__statement_of_case" }, - ) do |row| %> - <%= row.with_key(text: t("shared.check_answers.merits.statement-of-case-heading"), classes: "govuk-!-width-one-half") %> - <%= row.with_value do %> - <% if attachments_with_size(statement_of_case&.original_attachments).present? %> + <%= govuk_summary_list(card: { title: t(".statement_of_case.heading") }, actions: !read_only) do |summary_list| %> + <% if attachments_with_size(statement_of_case&.original_attachments).present? %> + <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__statement_of_case_file" }) do |row| %> + <%= row.with_key(text: t(".statement_of_case.file_names"), classes: "govuk-!-width-one-half") %> + <%= row.with_value do %> <ul class="govuk-list"> <% attachments_with_size(statement_of_case&.original_attachments).each do |item| %> <li><%= item %></li> <% end %> </ul> <% end %> + <%= row.with_action( + text: t("generic.change"), + href: providers_legal_aid_application_statement_of_case_path(@legal_aid_application), + visually_hidden_text: t("shared.check_answers.merits.statement-of-case-heading"), + ) %> + <% end %> + <% end %> + <% if statement_of_case.statement? %> + <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__statement_of_case" }) do |row| %> + <%= row.with_key(text: t(".statement_of_case.statement"), classes: "govuk-!-width-one-half") %> + <%= row.with_value(text: statement_of_case&.statement) %> + <%= row.with_action( + text: t("generic.change"), + href: providers_legal_aid_application_statement_of_case_path(@legal_aid_application), + visually_hidden_text: t(".statement_of_case.statement"), + ) %> <% end %> - <%= row.with_action( - text: t("generic.change"), - href: providers_legal_aid_application_statement_of_case_path(@legal_aid_application), - visually_hidden_text: t("shared.check_answers.merits.statement-of-case-heading"), - ) %> <% end %> <% end %> - <div class='govuk-body'><%= statement_of_case&.statement %></div> - <hr class="govuk-section-break govuk-section-break--visible govuk-!-width-full"> <% end %> <% if @legal_aid_application.allegation %> - <%= govuk_summary_list(actions: !read_only, classes: "govuk-!-margin-bottom-2") do |summary_list| %> + <%= govuk_summary_list(card: { title: t(".allegation.heading") }, actions: !read_only) do |summary_list| %> <%= summary_list.with_row( - classes: "govuk-summary-list__row--no-border", html_attributes: { id: "app-check-your-answers__allegation_denies_all" }, ) do |row| %> - <%= row.with_key(text: t(".allegation_denies_all"), classes: "govuk-!-width-one-half") %> + <%= row.with_key(text: t(".allegation.denies_all"), classes: "govuk-!-width-one-half") %> <%= row.with_value(text: yes_no(allegation.denies_all)) %> <%= row.with_action( text: t("generic.change"), href: providers_legal_aid_application_client_denial_of_allegation_path(@legal_aid_application), - visually_hidden_text: t(".allegation_denies_all"), + visually_hidden_text: t(".allegation.denies_all"), + ) %> + <% end %> + <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__allegation_denies_all" }) do |row| %> + <%= row.with_key(text: t(".allegation.additional_information"), classes: "govuk-!-width-one-half") %> + <%= row.with_value(text: allegation.additional_information) %> + <%= row.with_action( + text: t("generic.change"), + href: providers_legal_aid_application_client_denial_of_allegation_path(@legal_aid_application), + visually_hidden_text: t(".allegation.additional_information"), ) %> <% end %> <% end %> - <p class='govuk-body'><%= allegation.additional_information %></p> - <hr class="govuk-section-break govuk-section-break--visible govuk-!-width-full"> <% end %> </section> diff --git a/app/views/shared/check_answers/_outgoings_details.html.erb b/app/views/shared/check_answers/_outgoings_details.html.erb deleted file mode 100644 index 06e2a1915d..0000000000 --- a/app/views/shared/check_answers/_outgoings_details.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -<section> - <dl id="outgoings-details-questions" class="govuk-summary-list govuk-!-margin-bottom-9"> - <% outgoings_detail_items.each do |item| %> - <%= render "shared/means_report/item", item.to_h %> - <% end %> - <%= render "shared/means_report/total", name: "total_outgoings", value_method: :total_monthly_outgoings %> - </dl> -</section> diff --git a/app/views/shared/check_answers/_partner_details.html.erb b/app/views/shared/check_answers/_partner_details.html.erb index 9719ca38d4..389670c0ef 100644 --- a/app/views/shared/check_answers/_partner_details.html.erb +++ b/app/views/shared/check_answers/_partner_details.html.erb @@ -1,7 +1,7 @@ <% read_only = false unless local_assigns.key?(:read_only) heading_class = local_assigns.key?(:heading) ? local_assigns[:heading] : "govuk-heading-m" %> <h2 class="<%= heading_class %>"><%= t ".section_heading" %></h2> -<%= govuk_summary_list(classes: "govuk-!-margin-bottom-9", +<%= govuk_summary_list(card: { title: t(".section_heading") }, html_attributes: { id: "partner-details-questions" }, actions: !read_only) do |summary_list| %> diff --git a/app/views/shared/check_answers/_payments_summary.html.erb b/app/views/shared/check_answers/_payments_summary.html.erb index c4dcfaafb0..62d88ec042 100644 --- a/app/views/shared/check_answers/_payments_summary.html.erb +++ b/app/views/shared/check_answers/_payments_summary.html.erb @@ -12,8 +12,8 @@ </div> <%= govuk_summary_list( + card: { title: payment_type }, actions: false, - classes: "govuk-!-margin-bottom-9", html_attributes: { "data-check-your-answers-section": payment_type.parameterize }, ) do |summary_list| %> <% transaction_types.each do |transaction_type| %> diff --git a/app/views/shared/check_answers/_proceeding_details.html.erb b/app/views/shared/check_answers/_proceeding_details.html.erb index 330ec932a5..7e305a3a43 100644 --- a/app/views/shared/check_answers/_proceeding_details.html.erb +++ b/app/views/shared/check_answers/_proceeding_details.html.erb @@ -14,7 +14,10 @@ </div> </div> -<%= govuk_summary_list(actions: false, classes: "govuk-!-margin-bottom-9") do |summary_list| %> +<%= govuk_summary_list( + card: { title: proceeding.meaning }, + actions: false, + ) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__#{proceeding.name}_client_involvement_type" }) do |row| %> <%= row.with_key(text: t(".client_involvement_type_details.question"), classes: "govuk-!-width-one-half") %> <%= row.with_value { proceeding.client_involvement_type_description } %> diff --git a/app/views/shared/check_answers/_proceeding_details_section.html.erb b/app/views/shared/check_answers/_proceeding_details_section.html.erb index b05ca883c7..de1085324d 100644 --- a/app/views/shared/check_answers/_proceeding_details_section.html.erb +++ b/app/views/shared/check_answers/_proceeding_details_section.html.erb @@ -1,6 +1,6 @@ <% @legal_aid_application.proceedings.each_with_index do |proceeding, index| %> <h2 class="govuk-heading-m"><%= proceeding.meaning %></h2> - <%= govuk_summary_list(actions: false, classes: "govuk-!-margin-bottom-9") do |summary_list| %> + <%= govuk_summary_list(card: { title: proceeding.meaning }, actions: false) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__client_role-#{index}" }) do |row| %> <%= row.with_key(text: t(".client_role"), classes: "govuk-!-width-one-half") %> <%= row.with_value { proceeding.client_involvement_type_description } %> diff --git a/app/views/shared/check_answers/_proceedings_details.html.erb b/app/views/shared/check_answers/_proceedings_details.html.erb index abbf9c647d..3f6c5486b3 100644 --- a/app/views/shared/check_answers/_proceedings_details.html.erb +++ b/app/views/shared/check_answers/_proceedings_details.html.erb @@ -1,4 +1,4 @@ -<%= govuk_summary_list(actions: false, classes: "govuk-!-margin-bottom-9") do |summary_list| %> +<%= govuk_summary_list(card: { title: t(".heading") }, actions: false) do |summary_list| %> <%= @legal_aid_application.proceedings_by_name.each_with_index do |proceeding, i| %> <%= summary_list.with_row(classes: "app-check-your-answers__#{proceeding.name}_proceeding") do |row| %> <%= row.with_key(text: "#{t('.proceeding')} #{i + 1}", classes: "govuk-!-width-one-half") %> diff --git a/app/views/shared/check_answers/_property.html.erb b/app/views/shared/check_answers/_property.html.erb index 5ec2ec8854..7d7c2bc699 100644 --- a/app/views/shared/check_answers/_property.html.erb +++ b/app/views/shared/check_answers/_property.html.erb @@ -2,8 +2,8 @@ <h3 class="govuk-heading-m"><%= t("shared.check_answers.assets.property.heading_own_home") %></h3> <%= govuk_summary_list( + card: { title: t("shared.check_answers.assets.property.heading_own_home") }, actions: !read_only, - classes: "govuk-!-margin-bottom-9", html_attributes: { id: "property-question" }, ) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__own_home" }) do |row| %> @@ -20,8 +20,8 @@ <% if @legal_aid_application.own_home? %> <h3 class="govuk-heading-m"><%= t("shared.check_answers.assets.property.heading_property_details#{individual}") %></h3> <%= govuk_summary_list( + card: { title: t("shared.check_answers.assets.property.heading_property_details#{individual}") }, actions: !read_only, - classes: "govuk-!-margin-bottom-9", html_attributes: { id: "property-details-questions" }, ) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__property_value" }) do |row| %> diff --git a/app/views/shared/check_answers/_relationship_to_child.html.erb b/app/views/shared/check_answers/_relationship_to_child.html.erb index 3138a52b2f..9e3446ac33 100644 --- a/app/views/shared/check_answers/_relationship_to_child.html.erb +++ b/app/views/shared/check_answers/_relationship_to_child.html.erb @@ -1,23 +1,21 @@ -<%= govuk_summary_list(actions: !read_only) do |summary_list| +<%= summary_list.with_row do |row| + row.with_key(text: t("shared.check_answers.relationship_to_child.biological_parent"), classes: "govuk-!-width-one-half") + row.with_value(text: yes_no(relationship_to_child.eql?("biological"))) + row.with_action(text: t("generic.change"), href: providers_merits_task_list_is_client_biological_parent_path(proceeding), visually_hidden_text: t("shared.check_answers.relationship_to_child.biological_parent")) + end + + unless relationship_to_child.eql?("biological") summary_list.with_row do |row| - row.with_key(text: t(".biological_parent"), classes: "govuk-!-width-one-half") - row.with_value(text: yes_no(relationship_to_child.eql?("biological"))) - row.with_action(text: t("generic.change"), href: providers_merits_task_list_is_client_biological_parent_path(proceeding), visually_hidden_text: t(".biological_parent")) + row.with_key(text: t("shared.check_answers.relationship_to_child.parental_responsibilities")) + row.with_value(text: relationship_to_child.nil? || relationship_to_child.eql?("child_subject") ? t("generic.no") : t("shared.check_answers.relationship_to_child.#{relationship_to_child}")) + row.with_action(text: t("generic.change"), href: providers_merits_task_list_does_client_have_parental_responsibility_path(proceeding), visually_hidden_text: t("shared.check_answers.relationship_to_child.parental_responsibilities")) end - unless relationship_to_child.eql?("biological") + if relationship_to_child.eql?("child_subject") || relationship_to_child.nil? summary_list.with_row do |row| - row.with_key(text: t(".parental_responsibilities")) - row.with_value(text: relationship_to_child.nil? || relationship_to_child.eql?("child_subject") ? t("generic.no") : t(".#{relationship_to_child}")) - row.with_action(text: t("generic.change"), href: providers_merits_task_list_does_client_have_parental_responsibility_path(proceeding), visually_hidden_text: t(".parental_responsibilities")) - end - - if relationship_to_child.eql?("child_subject") || relationship_to_child.nil? - summary_list.with_row do |row| - row.with_key(text: t(".child_subject")) - row.with_value(text: yes_no(relationship_to_child.eql?("child_subject"))) - row.with_action(text: t("generic.change"), href: providers_merits_task_list_is_client_child_subject_path(proceeding), visually_hidden_text: t(".child_subject")) - end + row.with_key(text: t("shared.check_answers.relationship_to_child.child_subject")) + row.with_value(text: yes_no(relationship_to_child.eql?("child_subject"))) + row.with_action(text: t("generic.change"), href: providers_merits_task_list_is_client_child_subject_path(proceeding), visually_hidden_text: t("shared.check_answers.relationship_to_child.child_subject")) end end end %> diff --git a/app/views/shared/check_answers/_restrictions.html.erb b/app/views/shared/check_answers/_restrictions.html.erb index 76a86156b9..b8596a42fa 100644 --- a/app/views/shared/check_answers/_restrictions.html.erb +++ b/app/views/shared/check_answers/_restrictions.html.erb @@ -1,5 +1,8 @@ <h2 class="govuk-heading-m"><%= t(".#{journey_type}.heading#{individual}") %></h2> -<%= govuk_summary_list(classes: "govuk-!-margin-bottom-9", html_attributes: { id: "restrictions-on-clients-assets-questions" }) do |summary_list| %> +<%= govuk_summary_list( + card: { title: t(".#{journey_type}.heading#{individual}") }, + html_attributes: { id: "restrictions-on-clients-assets-questions" }, + ) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__restrictions" }) do |row| %> <%= row.with_key(text: t(".#{journey_type}.question#{individual}"), classes: "govuk-!-width-one-half") %> <%= row.with_value { yes_no(@legal_aid_application.has_restrictions) } %> diff --git a/app/views/shared/check_answers/_scope_limits.html.erb b/app/views/shared/check_answers/_scope_limits.html.erb deleted file mode 100644 index ff7a2c4bc6..0000000000 --- a/app/views/shared/check_answers/_scope_limits.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -<% read_only = false unless local_assigns.key?(:read_only) %> -<%= check_answer_no_link( - name: :"#{proceeding.name}_#{level_of_service}_scope_limitations_#{proceeding.id}", - question: t(".#{level_of_service}.question"), - answer: scope_limits(proceeding, level_of_service), - read_only:, - ) %> 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 @@ -<div class="govuk-!-margin-bottom-2"> - <hr class="govuk-section-break govuk-section-break--visible govuk-!-width-full" style="width: 100%;"> -</div> diff --git a/app/views/shared/check_answers/_separate_representation.html.erb b/app/views/shared/check_answers/_separate_representation.html.erb index 0e6dfe6437..0a821310a3 100644 --- a/app/views/shared/check_answers/_separate_representation.html.erb +++ b/app/views/shared/check_answers/_separate_representation.html.erb @@ -2,7 +2,7 @@ <section class="print-no-break govuk-!-padding-top-6"> <h2 class="govuk-heading-l"><%= t(".heading") %></h2> - <%= govuk_summary_list(actions: false, classes: "govuk-!-margin-bottom-9") do |summary_list| %> + <%= govuk_summary_list(card: { title: t(".heading") }, actions: false) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__separate_representation_required" }) do |row| %> <%= row.with_key(text: t(".separate_representation"), classes: "govuk-!-width-one-half") %> <%= row.with_value(text: t(".confirmed")) %> diff --git a/app/views/shared/check_answers/_student_finance.html.erb b/app/views/shared/check_answers/_student_finance.html.erb index e6110ce4f7..c7dd6e2a6e 100644 --- a/app/views/shared/check_answers/_student_finance.html.erb +++ b/app/views/shared/check_answers/_student_finance.html.erb @@ -9,7 +9,7 @@ <% end %> </div> -<%= govuk_summary_list(actions: false, classes: "govuk-!-margin-bottom-9") do |summary_list| %> +<%= govuk_summary_list(card: { title: t(".heading") }, actions: false) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__#{individual.class.to_s.downcase}_student_finance_question" }) do |row| %> <%= row.with_key(text: t(".does_your_client", individual_text:), classes: "govuk-!-width-one-half") %> <%= row.with_value { yes_no(individual.student_finance?) } %> diff --git a/app/views/shared/check_answers/_substantive_costs.html.erb b/app/views/shared/check_answers/_substantive_costs.html.erb index d2e9a65de4..c01540bf50 100644 --- a/app/views/shared/check_answers/_substantive_costs.html.erb +++ b/app/views/shared/check_answers/_substantive_costs.html.erb @@ -1,4 +1,4 @@ -<%= govuk_summary_list(actions: false, classes: "govuk-!-margin-bottom-6 govuk") do |summary_list| %> +<%= govuk_summary_list(card: { title: heading }, actions: false) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__emergency_cost_override" }) do |row| %> <%= row.with_key(text: t(".request_higher_limit"), classes: "govuk-!-width-one-half") %> <%= row.with_value { yes_no(@legal_aid_application.substantive_cost_override) } %> diff --git a/app/views/shared/check_answers/_supporting_evidence.html.erb b/app/views/shared/check_answers/_supporting_evidence.html.erb index 13ff5413f2..6aa37fc808 100644 --- a/app/views/shared/check_answers/_supporting_evidence.html.erb +++ b/app/views/shared/check_answers/_supporting_evidence.html.erb @@ -7,7 +7,7 @@ read_only:, ) %> - <%= govuk_summary_list(actions: false, classes: "govuk-!-margin-bottom-2") do |summary_list| %> + <%= govuk_summary_list(card: { title: t(".evidence_upload_heading") }, actions: false) do |summary_list| %> <% @legal_aid_application.uploaded_evidence_by_category.each do | category, attachments| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__#{category}" }) do |row| %> <%= row.with_key(text: t(".evidence_types.#{category}"), classes: "govuk-!-width-one-half") %> diff --git a/app/views/shared/check_answers/_undertaking.html.erb b/app/views/shared/check_answers/_undertaking.html.erb index 88dbbe5334..4f917dc7bd 100644 --- a/app/views/shared/check_answers/_undertaking.html.erb +++ b/app/views/shared/check_answers/_undertaking.html.erb @@ -1,19 +1,24 @@ <section class="print-no-break govuk-!-padding-top-6"> <h2 class="govuk-heading-m"><%= t(".heading") %></h2> - <%= govuk_summary_list(actions: !read_only, classes: "govuk-!-margin-bottom-2") do |summary_list| %> - <%= summary_list.with_row( - classes: "govuk-summary-list__row--no-border", - html_attributes: { id: "app-check-your-answers__undertaking_offered" }, - ) do |row| %> - <%= row.with_key(text: t(".undertaking_offered"), classes: "govuk-!-width-one-half") %> + <%= govuk_summary_list(card: { title: t(".heading") }, actions: !read_only) do |summary_list| %> + <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__undertaking_offered" }) do |row| %> + <%= row.with_key(text: t(".undertaking_offered_question"), classes: "govuk-!-width-one-half") %> <%= row.with_value(text: yes_no(undertaking.offered)) %> <%= row.with_action( text: t("generic.change"), href: providers_legal_aid_application_client_offered_undertakings_path(@legal_aid_application), - visually_hidden_text: t(".undertaking_offered"), + visually_hidden_text: t(".undertaking_offered_question"), + ) %> + <% end %> + <% text = undertaking.offered? ? "what" : "why" %> + <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__undertaking_offered" }) do |row| %> + <%= row.with_key(text: t(".undertaking_offered_#{text}"), classes: "govuk-!-width-one-half") %> + <%= row.with_value(text: undertaking.additional_information) %> + <%= row.with_action( + text: t("generic.change"), + href: providers_legal_aid_application_client_offered_undertakings_path(@legal_aid_application), + visually_hidden_text: t(".undertaking_offered_#{text}"), ) %> <% end %> <% end %> - <div class='govuk-body'><%= undertaking.additional_information %></div> - <hr class="govuk-section-break govuk-section-break--visible govuk-!-width-full"> </section> diff --git a/app/views/shared/check_answers/_urgency.html.erb b/app/views/shared/check_answers/_urgency.html.erb index f668ea2927..28e14af0ff 100644 --- a/app/views/shared/check_answers/_urgency.html.erb +++ b/app/views/shared/check_answers/_urgency.html.erb @@ -6,7 +6,7 @@ read_only:, ) %> - <%= govuk_summary_list(actions: false) do |summary_list| %> + <%= govuk_summary_list(card: { title: t(".heading") }, actions: false) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__nature_of_urgency" }) do |row| %> <%= row.with_key(text: t(".nature_of_urgency"), classes: "govuk-!-width-one-half") %> <%= row.with_value(text: urgency.nature_of_urgency) %> diff --git a/app/views/shared/check_answers/_vehicles.html.erb b/app/views/shared/check_answers/_vehicles.html.erb index 23d62bc4ac..4434c4a485 100644 --- a/app/views/shared/check_answers/_vehicles.html.erb +++ b/app/views/shared/check_answers/_vehicles.html.erb @@ -15,8 +15,8 @@ </div> <%= govuk_summary_list( + card: { title: t(".#{journey_type}.heading") }, actions: !read_only, - classes: "govuk-!-margin-bottom-9", html_attributes: { id: "vehicles-questions" }, ) do |summary_list| %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__own-vehicle" }) do |row| %> @@ -27,22 +27,16 @@ <% if @legal_aid_application.vehicles.any? %> <% @legal_aid_application.vehicles.each_with_index do |vehicle, index| %> + <% action_link = govuk_link_to(t("generic.change"), + providers_legal_aid_application_means_vehicle_detail_path(@legal_aid_application, vehicle), + visually_hidden_suffix: t(".providers.vehicle_index", sequence: index + 1), + id: "app-check-your-answers__vehicle__#{index}_change_link") %> <%= govuk_summary_list( - actions: !read_only, - classes: "govuk-!-margin-bottom-9", + card: { title: t(".providers.vehicle_index", sequence: index + 1), + actions: read_only ? [] : [action_link] }, html_attributes: { id: "vehicle-questions__#{index}" }, ) do |summary_list| %> - <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__vehicle__#{index}_change_link" }) do |row| %> - <%= row.with_key(text: t(".providers.vehicle_index", sequence: index + 1), classes: "govuk-!-width-one-half govuk-heading-m") %> - <%= row.with_value(text: nil) %> - <%= row.with_action( - text: t("generic.change"), - href: providers_legal_aid_application_means_vehicle_detail_path(@legal_aid_application, vehicle), - visually_hidden_text: t(".providers.vehicle_index", sequence: index + 1), - ) %> - <% end %> - <% if @legal_aid_application.applicant.has_partner_with_no_contrary_interest? %> <%= summary_list.with_row(html_attributes: { id: "app-check-your-answers__vehicles_owner" }) do |row| %> <%= row.with_key(text: t(".#{journey_type}.owner"), classes: "govuk-!-width-one-half") %> diff --git a/app/views/shared/means_report/_deductions_details.html.erb b/app/views/shared/means_report/_deductions_details.html.erb new file mode 100644 index 0000000000..6aace489f3 --- /dev/null +++ b/app/views/shared/means_report/_deductions_details.html.erb @@ -0,0 +1,23 @@ +<section> + <%= govuk_summary_list(card: { title: heading }, + actions: false, + html_attributes: { id: "deductions-details-questions" }) do |summary_list| %> + <% deductions_detail_items(@legal_aid_application).each do |item| %> + <% summary_list.with_row do |row| + row.with_key(text: t(".client.#{item.name}"), classes: "govuk-!-width-one-half") + row.with_value { gds_number_to_currency(@cfe_result.__send__(item.value_method)) } + end %> + <% if @legal_aid_application.applicant.has_partner_with_no_contrary_interest? && !partner_exclude_items.include?(item.value_method) %> + <% summary_list.with_row do |row| + row.with_key(text: t(".partner.#{item.name}"), classes: "govuk-!-width-one-half") + row.with_value { gds_number_to_currency(@cfe_result.__send__(item.value_method, partner: true)) } + end %> + <% end %> + + <% end %> + <% summary_list.with_row(classes: "bold-border-top") do |row| + row.with_key { t(".total_deductions") } + row.with_value(text: gds_number_to_currency(@cfe_result.__send__(:total_deductions)), html_attributes: { class: "govuk-!-font-weight-bold" }) + end %> + <% end %> +</section> diff --git a/app/views/shared/means_report/_income_details.html.erb b/app/views/shared/means_report/_income_details.html.erb new file mode 100644 index 0000000000..f6fd41ba5a --- /dev/null +++ b/app/views/shared/means_report/_income_details.html.erb @@ -0,0 +1,25 @@ +<section> + <%= govuk_summary_list(card: { title: heading }, + actions: false, + html_attributes: { id: "income-details-questions" }) do |summary_list| %> + <% income_detail_items(@legal_aid_application).each do |item| %> + <% summary_list.with_row do |row| + row.with_key(text: t(".client.#{item.name}"), classes: "govuk-!-width-one-half") + row.with_value { gds_number_to_currency(@cfe_result.__send__(item.value_method)) } + end %> + <% end %> + <% income_detail_items(@legal_aid_application).each do |item| %> + <% if @legal_aid_application.applicant.has_partner_with_no_contrary_interest? && !partner_exclude_items.include?(item.value_method) %> + <% summary_list.with_row do |row| + row.with_key(text: t(".partner.#{item.name}"), classes: "govuk-!-width-one-half") + row.with_value { gds_number_to_currency(@cfe_result.__send__(item.value_method, partner: true)) } + end %> + <% end %> + <% end %> + + <% summary_list.with_row(classes: "bold-border-top") do |row| + row.with_key { t(".total_income") } + row.with_value(text: gds_number_to_currency(@cfe_result.__send__(:combined_total_gross_income_assessed)), html_attributes: { class: "govuk-!-font-weight-bold" }) + end %> + <% end %> +</section> diff --git a/app/views/shared/means_report/_item.html.erb b/app/views/shared/means_report/_item.html.erb deleted file mode 100644 index fbb9d161f8..0000000000 --- a/app/views/shared/means_report/_item.html.erb +++ /dev/null @@ -1,24 +0,0 @@ -<% suppress_border ||= false %> -<% css_border_klass = suppress_border ? "govuk-summary-list__row--no-border" : "" %> -<div class="govuk-summary-list__row normal-word-break" id="<%= "means-merits-report__#{name}" %>"> - <dt class="govuk-summary-list__key govuk-!-width-one-half"> - <%= t(".#{scope}.client.#{name}") %> - </dt> - <!-- in-line styling due to issues around pdf generation in our production envs --> - <dd class="govuk-summary-list__value govuk-!-text-align-right"> - <%= gds_number_to_currency(@cfe_result.__send__(value_method)) %> - </dd> -</div> -<% if @legal_aid_application.applicant.has_partner_with_no_contrary_interest? %> - <% unless partner_exclude_items.include?(value_method) %> - <div class="<%= "govuk-summary-list__row normal-word-break #{css_border_klass}" %>" id="<%= "means-merits-report__partner_#{name}" %>"> - <dt class="<%= "govuk-summary-list__key govuk-!-width-one-half" %>"> - <%= t(".#{scope}.partner.#{name}") %> - </dt> - <!-- in-line styling due to issues around pdf generation in our production envs --> - <dd class="govuk-summary-list__value govuk-!-text-align-right"> - <%= gds_number_to_currency(@cfe_result.__send__(value_method, partner: true)) %> - </dd> - </div> - <% end %> -<% end %> diff --git a/app/views/shared/means_report/_outgoings_details.html.erb b/app/views/shared/means_report/_outgoings_details.html.erb new file mode 100644 index 0000000000..d278e513e0 --- /dev/null +++ b/app/views/shared/means_report/_outgoings_details.html.erb @@ -0,0 +1,31 @@ +<section> + <%= govuk_summary_list(card: { title: heading }, + actions: false, + html_attributes: { id: "outgoings-details-questions" }) do |summary_list| %> + <% outgoings_detail_items.each do |item| %> + <% summary_list.with_row do |row| + row.with_key(text: t(".client.#{item.name}"), classes: "govuk-!-width-one-half") + row.with_value { gds_number_to_currency(@cfe_result.__send__(item.value_method)) } + end %> + <% end %> + <% outgoings_detail_items.each do |item| %> + <% if @legal_aid_application.applicant.has_partner_with_no_contrary_interest? && !partner_exclude_items.include?(item.value_method) %> + <% summary_list.with_row do |row| + row.with_key(text: t(".partner.#{item.name}"), classes: "govuk-!-width-one-half") + row.with_value { gds_number_to_currency(@cfe_result.__send__(item.value_method, partner: true)) } + end %> + <% end %> + <% end %> + + <% result = if @legal_aid_application.applicant.has_partner_with_no_contrary_interest? + @cfe_result.__send__(:total_monthly_outgoings) + @cfe_result.__send__(:total_monthly_outgoings, partner: true) + else + @cfe_result.__send__(:total_monthly_outgoings) + end %> + + <% summary_list.with_row(classes: "bold-border-top") do |row| + row.with_key { t(".total_outgoings") } + row.with_value(text: gds_number_to_currency(gds_number_to_currency(result)), html_attributes: { class: "govuk-!-font-weight-bold" }) + end %> + <% end %> +</section> diff --git a/app/views/shared/means_report/_total.html.erb b/app/views/shared/means_report/_total.html.erb deleted file mode 100644 index 538c73e645..0000000000 --- a/app/views/shared/means_report/_total.html.erb +++ /dev/null @@ -1,9 +0,0 @@ -<div class="govuk-summary-list__total-row normal-word-break" id="<%= "means-merits-report__#{name}" %>"> - <dt class="govuk-summary-list__key govuk-!-width-one-half"> - <%= t(".#{name}") %> - </dt> - <!-- in-line styling due to issues around pdf generation in our production envs --> - <dd class="govuk-summary-list__value govuk-!-text-align-right"> - <%= gds_number_to_currency(@cfe_result.__send__(value_method)) %> - </dd> -</div> diff --git a/app/views/shared/review_application/_questions_and_answers.html.erb b/app/views/shared/review_application/_questions_and_answers.html.erb index 1fd6f77c05..f0b1037ad6 100644 --- a/app/views/shared/review_application/_questions_and_answers.html.erb +++ b/app/views/shared/review_application/_questions_and_answers.html.erb @@ -70,6 +70,7 @@ <%= render( "shared/check_answers/substantive_costs", legal_aid_application: @legal_aid_application, + heading: t(".substantive_cost_limit"), read_only: true, ) %> <% end %> diff --git a/config/locales/cy/shared.yml b/config/locales/cy/shared.yml index 4d7ad48c9e..6a10a79480 100644 --- a/config/locales/cy/shared.yml +++ b/config/locales/cy/shared.yml @@ -96,25 +96,25 @@ cy: - You still need to provide details of the case before we can decide if they’re eligible. means_report: - item: - deductions: - dependants_allowance: ecnawolla stnadnepeD - income: + income_details: + total_income: emocni latoT + client: benefits: stifeneB family_help: ylimaf ro sdneirf morf pleh laicnaniF maintenance_in: stnemyap ecnanetniaM property_or_lodger: regdol ro ytreporp morf emocnI student_loan: tnarg ro naol tnedutS pension: noisneP - outgoing: + outgoings_details: + total_outgoings: sgniogtuo latoT + client: housing: stnemyap gnisuoH childcare: stnemyap eracdlihC maintenance_out: rentrap remrof a ot stnemyap ecnanetniaM legal_aid: esac lanimirc a ni dia lagel sdrawot stnemyaP - total: - total_income: emocni latoT - total_outgoings: sgniogtuo latoT + deductions_details: total_deductions: snoitcuded latoT + dependants_allowance: ecnawolla stnadnepeD check_answers: assets: assets: diff --git a/config/locales/en/providers.yml b/config/locales/en/providers.yml index 27b21811db..61f4a8f5cb 100644 --- a/config/locales/en/providers.yml +++ b/config/locales/en/providers.yml @@ -326,8 +326,8 @@ en: show: h1-heading: Check your answers h2-heading: Your client's capital - chances_of_success_body: We'll use your answers to calculate your client's financial eligibility for legal aid. - chances_of_success_h2: What happens next + what_happens_next: What happens next + what_happens_next_body: We'll use your answers to calculate your client's financial eligibility for legal aid. check_provider_answers: standard: title: Check your answers @@ -1420,7 +1420,6 @@ 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 @@ -1433,17 +1432,9 @@ en: 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: @@ -1520,10 +1511,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 @@ -1539,8 +1526,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 diff --git a/config/locales/en/shared.yml b/config/locales/en/shared.yml index 735596db1c..07e711f8e9 100644 --- a/config/locales/en/shared.yml +++ b/config/locales/en/shared.yml @@ -302,65 +302,49 @@ en: - Widow's Pension lump sum payments - Windrush Compensation Scheme Payments means_report: - item: - deductions: - dependants_allowance: Dependants allowance - partner_allowance: Partner allowance - client: - dependants_allowance: Dependants allowance - partner_allowance: Partner allowance - income: - benefits: Benefits - employment: Gross employment income - fixed_employment_deduction: Fixed employment deduction - family_help: Financial help from friends or family - income_tax: Income tax - maintenance_in: Maintenance payments - national_insurance: National insurance - property_or_lodger: Income from property or lodger - student_loan: Student loan or grant - pension: Pension - client: - benefits: Client benefits, charitable or government payments - employment: Client gross employment income - fixed_employment_deduction: Client fixed employment deduction - family_help: Client financial help from friends or family - income_tax: Client income tax - maintenance_in: Client maintenance payments - national_insurance: Client national insurance - property_or_lodger: Client income from property or lodger - student_loan: Client student loan or grant - pension: Client pension - partner: - benefits: Partner benefits, charitable or government payments - employment: Partner gross employment income - fixed_employment_deduction: Partner fixed employment deduction - family_help: Partner financial help from friends or family - income_tax: Partner income tax - maintenance_in: Partner maintenance payments - national_insurance: Partner national insurance - property_or_lodger: Partner income from property or lodger - student_loan: Partner student loan or grant - pension: Partner pension - outgoing: - housing: "Housing payments (any declared housing benefits have been deducted from this total)" - childcare: Childcare payments - maintenance_out: Maintenance payments to a former partner - legal_aid: Payments towards legal aid in a criminal case - client: - housing: "Client housing payments (any declared housing benefits have been deducted from this total)" - childcare: Client childcare payments - maintenance_out: Client maintenance payments to a former partner - legal_aid: Client payments towards legal aid in a criminal case - partner: - housing: "Partner housing payments (any declared housing benefits have been deducted from this total)" - childcare: Partner childcare payments - maintenance_out: Partner maintenance payments to a former partner - legal_aid: Partner payments towards legal aid in a criminal case - total: + income_details: total_income: Total income + client: + benefits: Client benefits, charitable or government payments + employment: Client gross employment income + fixed_employment_deduction: Client fixed employment deduction + family_help: Client financial help from friends or family + income_tax: Client income tax + maintenance_in: Client maintenance payments + national_insurance: Client national insurance + property_or_lodger: Client income from property or lodger + student_loan: Client student loan or grant + pension: Client pension + partner: + benefits: Partner benefits, charitable or government payments + employment: Partner gross employment income + fixed_employment_deduction: Partner fixed employment deduction + family_help: Partner financial help from friends or family + income_tax: Partner income tax + maintenance_in: Partner maintenance payments + national_insurance: Partner national insurance + property_or_lodger: Partner income from property or lodger + student_loan: Partner student loan or grant + pension: Partner pension + outgoings_details: total_outgoings: Total outgoings + client: + housing: "Client housing payments (any declared housing benefits have been deducted from this total)" + childcare: Client childcare payments + maintenance_out: Client maintenance payments to a former partner + legal_aid: Client payments towards legal aid in a criminal case + partner: + housing: "Partner housing payments (any declared housing benefits have been deducted from this total)" + childcare: Partner childcare payments + maintenance_out: Partner maintenance payments to a former partner + legal_aid: Partner payments towards legal aid in a criminal case + deductions_details: total_deductions: Total deductions + dependants_allowance: Dependants allowance + partner_allowance: Partner allowance + client: + dependants_allowance: Dependants allowance + partner_allowance: Partner allowance check_answers: capital_disregard_details: mandatory: @@ -434,6 +418,7 @@ en: upper_limit_label: Capital upper limit total: Total capital assessed client_details: + heading: Client details previous_application_reference: Previous application reference has_applied_before: Has applied before? correspondence_address_choice: Where to send client's mail @@ -478,6 +463,7 @@ en: nino: National Insurance number has_partner: Does your client have a partner? dependants: + dependant_name: "Dependant %{position}: %{name}" has_dependants: Does %{individual} have any dependants? add-new: Add dependant delete: Delete dependant @@ -488,6 +474,7 @@ en: income: Do they receive any income? assets: Do they have assets worth more than £8,000? emergency_costs: + heading: Emergency cost limit request_higher_limit: Higher cost limit requested new_cost_limit: Amount requested new_limit_reasons: Reason @@ -566,26 +553,43 @@ en: matter_opposed_reason: Why is the Section 8 matter opposed by your client or the other party? matter_opposed_reason_heading: Why the matter is opposed opponent_details: - allegation_denies_all: Does the client wholly or substantially deny any allegations? - bail_conditions_set: Have bail conditions been set? + allegation: + heading: Allegation + denies_all: Does the client wholly or substantially deny any allegations? + additional_information: Additional information opponent: Opponent opponent-heading: Opponent details - police_notified: Have the police been notified? - understands_terms_of_court_order: Do all parties have the mental capacity to understand the terms of a court order? - warning_letter_sent: Has a warning letter been sent to the opponent? + domestic_abuse: + heading: Domestic abuse summary + warning_letter_reasons: Why a warning letter has not been sent + police_notified_details: Police action taken + police_not_notified: Why the police have not been notified + bail_conditions_set: Have bail conditions been set? + bail_conditions: Bail conditions + statement_of_case: + heading: Statement of case + file_names: File names + statement: Statement + mental_capacity: + heading: Mental capacity + understands_terms: All parties have the mental capacity to understand the terms of a court order? + reasons: Why you think the court would enforce a breach of an order separate_representation: heading: Separate representation separate_representation: Client wants separate representation? confirmed: Confirmed undertaking: heading: Client offer of undertakings - undertaking_offered: Has the client offered undertakings? + undertaking_offered_question: Has the client offered undertakings? + undertaking_offered_what: What undertakings have been offered? + undertaking_offered_why: Why have undertakings not been offered? urgency: heading: Nature of urgency and hearing date hearing_date_set: Has a date been set for the hearing? nature_of_urgency: What is the nature of the urgency? merits_proceeding_section: attempts_to_settle: What attempts have been made to settle the matter? + chances_of_success_details: Details on the chance of a successful outcome linked_children: Which children are covered under this proceeding? opponents_application_question: Do you have a copy of the opponent's application to the court or a copy of the court order? opponents_application_reason: Reason for applying for legal aid at this stage @@ -594,6 +598,7 @@ en: success_prospect: What is the chance of a successful outcome? specific_issue: What specific issue do you want to determine at court? vary_order: Why are you making a new application? + what_is_prohibited: What you're asking to be prohibited supporting_evidence: evidence_types: benefit_evidence: Benefit evidence @@ -611,9 +616,9 @@ en: child: Child relationship_to_child: biological_parent: Client is the biological parent of any child involved? - parental_responsibilities: Client has parental responsibility for any child involved? child_subject: Client is a child subject of this proceeding? court_order: Yes, under a court order + parental_responsibilities: Client has parental responsibility for any child involved? parental_responsibility_agreement: Yes, they have a parental responsibility agreement full_employment_details: employment: "%{individual} employment income" @@ -631,6 +636,7 @@ en: income_heading: Payments %{individual_with_determiner} receives in cash outgoings_heading: Payments %{individual_with_determiner} makes in cash proceedings_details: + heading: Proceedings proceeding: Proceeding section_proceeding: client_involvement_type: Client involvement type diff --git a/features/providers/means_report.feature b/features/providers/means_report.feature index c9112f3081..5657b9dec0 100644 --- a/features/providers/means_report.feature +++ b/features/providers/means_report.feature @@ -76,8 +76,8 @@ Feature: Means report | Client income from property or lodger | £0 | | Client student loan or grant | £0 | | Client pension | £0 | + | Total income | | - And I should see "Total income" And the 'Client' employment notes questions should exist: | Do you need to tell us anything else about your client's employment? | | Details for client | @@ -88,8 +88,7 @@ Feature: Means report | Client childcare payments | £0 | | Client maintenance payments to a former partner | £0 | | Client payments towards legal aid in a criminal case | £100 | - - And I should see "Total outgoings" + | Total outgoings | £225 | And the Deductions questions should exist: | question | @@ -206,7 +205,7 @@ Feature: Means report | h2 | Which assets does your client have? | | h2 | Restrictions on your client's assets | | h2 | Payments from scheme or charities | - | h3 | Client's bank accounts | + | h2 | Client's bank accounts | Then the following sections should not exist: | tag | section | @@ -252,8 +251,8 @@ Feature: Means report | Client income from property or lodger | £0 | | Client student loan or grant | £0 | | Client pension | £0 | + | Total income | | - And I should see "Total income" And the 'Client' employment notes questions should exist: | Do you need to tell us anything else about your client's employment? | | Details for client | @@ -264,8 +263,7 @@ Feature: Means report | Client childcare payments | £0 | | Client maintenance payments to a former partner | £0 | | Client payments towards legal aid in a criminal case | £100 | - - And I should see "Total outgoings" + | Total outgoings | £225 | And the Deductions questions should exist: | question | @@ -297,7 +295,7 @@ Feature: Means report | question | | How much is the home your client lives in worth? | | How much is left to pay on the mortgage? | - |Does your client own the home with anyone else? | + | Does your client own the home with anyone else? | | What percentage of the home does your client legally own? | And the Vehicle ownership question should exist: @@ -317,8 +315,8 @@ Feature: Means report And the "Bank accounts", for open banking accounts, questions and answers table should exist: | question | answer | - | Account Name, 12345678, 000000 | 75.57 | - | Second Account, 87654321, 999999 | 57.57 | + | Account Name, 12345678, 000000 | £75.57 | + | Second Account, 87654321, 999999 | £57.57 | And the "Your client's accounts" questions should exist: | question | diff --git a/features/providers/mtr_accelerated/check_capital_answers.feature b/features/providers/mtr_accelerated/check_capital_answers.feature index 525b165155..451754b12e 100644 --- a/features/providers/mtr_accelerated/check_capital_answers.feature +++ b/features/providers/mtr_accelerated/check_capital_answers.feature @@ -17,15 +17,15 @@ Feature: Check capital income answers | h3 | Property | | h3 | Your client's property | | h3 | Vehicles | - | dt | Vehicle 1 | + | h2 | Vehicle 1 | | h2 | Bank accounts | - | h3 | Your client's accounts | + | h2 | Your client's accounts | | h2 | Which savings or investments does your client have? | | h2 | Which assets does your client have? | | h2 | Restrictions on your client's assets | | h2 | One-off payments your client received | - | dt | Disregarded payment 1 | - | dt | Payment to be reviewed 1 | + | h2 | Disregarded payment 1 | + | h2 | Payment to be reviewed 1 | | h3 | What happens next | Then the following sections should not exist: @@ -36,20 +36,18 @@ Feature: Check capital income answers | h3 | Student finance | | h2 | Your client's outgoings | | h3 | Payments your client makes | - | h3 | "Payments your client receives in cash" | - | h3 | "Payments your client makes in cash" | + | h3 | Payments your client receives in cash | + | h3 | Payments your client makes in cash | | h2 | Payments from scheme or charities | And the Disregarded payment 1 questions and answers should match: | question | answer | - | Disregarded payment 1 | | | Payment type | Budgeting Advances | | Amount and date received | £1,001 on 8 August 2024 | | Bank account | Halifax | And the Payment to be reviewed 1 questions and answers should match: | question | answer | - | Payment to be reviewed 1 | | | Payment type | Compensation, damages or ex-gratia payments for personal harm | | What the payment is for | life changing injuries | | Amount and date received | £1,002 on 8 August 2024 | @@ -68,15 +66,15 @@ Feature: Check capital income answers | h3 | Property | | h3 | Your client's property | | h3 | Vehicles | - | dt | Vehicle 1 | + | h2 | Vehicle 1 | | h2 | Bank accounts | | h3 | Your client's accounts | | h2 | Which savings or investments does your client have? | | h2 | Which assets does your client have? | | h2 | Restrictions on your client's assets | | h2 | One-off payments your client received | - | dt | Disregarded payment 1 | - | dt | Payment to be reviewed 1 | + | h2 | Disregarded payment 1 | + | h2 | Payment to be reviewed 1 | | h3 | What happens next | Then the following sections should not exist: @@ -93,14 +91,12 @@ Feature: Check capital income answers And the Disregarded payment 1 questions and answers should match: | question | answer | - | Disregarded payment 1 | | | Payment type | Budgeting Advances | | Amount and date received | £1,001 on 8 August 2024 | | Bank account | Halifax | And the Payment to be reviewed 1 questions and answers should match: | question | answer | - | Payment to be reviewed 1 | | | Payment type | Compensation, damages or ex-gratia payments for personal harm | | What the payment is for | life changing injuries | | Amount and date received | £1,002 on 8 August 2024 | @@ -119,16 +115,16 @@ Feature: Check capital income answers | h3 | Property | | h3 | Your client's property | | h3 | Vehicles | - | dt | Vehicle 1 | + | h2 | Vehicle 1 | | h2 | Bank accounts | | h3 | Your client's accounts | | h2 | Which savings or investments does your client have? | | h2 | Which assets does your client have? | | h2 | Restrictions on your client's assets | | h2 | One-off payments your client received | - | dt | Disregarded payment 1 | - | dt | Payment to be reviewed 1 | - | h2 | What happens next | + | h2 | Disregarded payment 1 | + | h2 | Payment to be reviewed 1 | + | h3 | What happens next | Then the following sections should not exist: | tag | section | @@ -144,16 +140,13 @@ Feature: Check capital income answers And the Disregarded payment 1 questions and answers should match: | question | answer | - | Disregarded payment 1 | | | Payment type | Budgeting Advances | | Amount and date received | £1,001 on 8 August 2024 | | Bank account | Halifax | And the Payment to be reviewed 1 questions and answers should match: | question | answer | - | Payment to be reviewed 1 | | | Payment type | Compensation, damages or ex-gratia payments for personal harm | | What the payment is for | life changing injuries | | Amount and date received | £1,002 on 8 August 2024 | | Bank account | Halifax | - diff --git a/features/providers/mtr_accelerated/means_report.feature b/features/providers/mtr_accelerated/means_report.feature index 4ac5c96a9d..fea950a66d 100644 --- a/features/providers/mtr_accelerated/means_report.feature +++ b/features/providers/mtr_accelerated/means_report.feature @@ -84,8 +84,8 @@ Feature: Means report | Client income from property or lodger | £0 | | Client student loan or grant | £0 | | Client pension | £0 | + | Total income | | - And I should see "Total income" And the 'Client' employment notes questions should exist: | Do you need to tell us anything else about your client's employment? | | Details for client | @@ -96,8 +96,7 @@ Feature: Means report | Client childcare payments | £0 | | Client maintenance payments to a former partner | £0 | | Client payments towards legal aid in a criminal case | £100 | - - And I should see "Total outgoings" + | Total outgoings | £225 | And the Deductions questions should exist: | question | @@ -215,7 +214,7 @@ Feature: Means report | h2 | Which assets does your client have? | | h2 | Restrictions on your client's assets | | h2 | Capital disregards | - | h3 | Client's bank accounts | + | h2 | Client's bank accounts | Then the following sections should not exist: | tag | section | @@ -266,8 +265,8 @@ Feature: Means report | Client income from property or lodger | £0 | | Client student loan or grant | £0 | | Client pension | £0 | + | Total income | | - And I should see "Total income" And the 'Client' employment notes questions should exist: | Do you need to tell us anything else about your client's employment? | | Details for client | @@ -278,8 +277,7 @@ Feature: Means report | Client childcare payments | £0 | | Client maintenance payments to a former partner | £0 | | Client payments towards legal aid in a criminal case | £100 | - - And I should see "Total outgoings" + | Total outgoings | £225 | And the Deductions questions should exist: | question | @@ -338,8 +336,8 @@ Feature: Means report And the "Bank accounts", for open banking accounts, questions and answers table should exist: | question | answer | - | Account Name, 12345678, 000000 | 75.57 | - | Second Account, 87654321, 999999 | 57.57 | + | Account Name, 12345678, 000000 | £75.57 | + | Second Account, 87654321, 999999 | £57.57 | And the "Your client's accounts" questions should exist: | question | diff --git a/features/providers/partner_means_assessment/means_report.feature b/features/providers/partner_means_assessment/means_report.feature index e0254cee2b..aeb19ee750 100644 --- a/features/providers/partner_means_assessment/means_report.feature +++ b/features/providers/partner_means_assessment/means_report.feature @@ -84,8 +84,7 @@ Feature: Means report when partner is present | Partner income from property or lodger | £200 | | Partner student loan or grant | £100 | | Partner pension | £30 | - - And I should see "Total income" + | Total income | | And the 'Client' employment notes questions should exist: | Do you need to tell us anything else about your client's employment? | @@ -104,8 +103,7 @@ Feature: Means report when partner is present | Partner childcare payments | £30 | | Partner maintenance payments to a former partner | £50 | | Partner payments towards legal aid in a criminal case | £0 | - - And I should see "Total outgoings" + | Total outgoings | £705 | And the Deductions questions should exist: | question | diff --git a/features/providers/passported_journey.feature b/features/providers/passported_journey.feature index 174a5daacc..ce525e3944 100644 --- a/features/providers/passported_journey.feature +++ b/features/providers/passported_journey.feature @@ -94,7 +94,7 @@ Feature: passported_journey completes application Then I enter the application merits task statement of case statement field 'This is some test data for the statement of case' Then I click 'Save and continue' Then I should be on a page showing "Check your answers" - And the answer for 'Statement of case' should be 'hello_world.pdf (15.7 KB)' + And the answer for 'Statement of case file' should be 'hello_world.pdf (15.7 KB)' And I should be on a page showing "This is some test data for the statement of case" Then I click 'Save and continue' And I should be on a page showing "Confirm the following" diff --git a/features/step_definitions/means_report_steps.rb b/features/step_definitions/means_report_steps.rb index e7c638adf4..8eaa77b3d4 100644 --- a/features/step_definitions/means_report_steps.rb +++ b/features/step_definitions/means_report_steps.rb @@ -436,7 +436,7 @@ end Then("the \"Bank accounts\", for open banking accounts, questions and answers table should exist:") do |table| - expect_questions_and_answers_in_table(selector: "#applicant-bank-accounts-details", expected: table) + expect_matching_questions_and_answers(actual_selector: "#applicant-bank-accounts-details", expected_table: table) end Then("the \"Your client's accounts\" questions should exist:") do |table| diff --git a/spec/components/reports/merits/delegated_functions_component_spec.rb b/spec/components/reports/merits/delegated_functions_component_spec.rb index 42531f4102..0b09351c7d 100644 --- a/spec/components/reports/merits/delegated_functions_component_spec.rb +++ b/spec/components/reports/merits/delegated_functions_component_spec.rb @@ -17,7 +17,7 @@ end it "renders the proceeding heading" do - expect(page).to have_css("h3", text: "Test proceeding meaning") + expect(page).to have_css("h2", text: "Test proceeding meaning") end it "renders the delegated functions summary list", :aggregate_failures do diff --git a/spec/requests/providers/check_merits_answers_spec.rb b/spec/requests/providers/check_merits_answers_spec.rb index a557e578c3..ce1ceb13a4 100644 --- a/spec/requests/providers/check_merits_answers_spec.rb +++ b/spec/requests/providers/check_merits_answers_spec.rb @@ -15,9 +15,11 @@ :with_attempts_to_settle, :with_involved_children, :provider_entering_merits, + domestic_abuse_summary:, explicit_proceedings: %i[da001 se014]) end let(:smtl) { create(:legal_framework_merits_task_list, legal_aid_application: application) } + let(:domestic_abuse_summary) { create(:domestic_abuse_summary, :police_notified_true) } before { allow(LegalFramework::MeritsTasksService).to receive(:call).with(application).and_return(smtl) } @@ -45,10 +47,10 @@ scope = "shared.check_answers" expect(response.body).to include(I18n.t("latest_incident_details.notification_of_latest_incident", scope:)) expect(response.body).to include(I18n.t("latest_incident_details.date_of_latest_incident", scope:)) - expect(response.body).to include(I18n.t("opponent_details.understands_terms_of_court_order", scope:)) - expect(response.body).to include(I18n.t("opponent_details.warning_letter_sent", scope:)) - expect(response.body).to include(I18n.t("opponent_details.police_notified", scope:)) - expect(response.body).to include(I18n.t("opponent_details.bail_conditions_set", scope:)) + expect(response.body).to include(I18n.t("opponent_details.mental_capacity.understands_terms", scope:)) + expect(response.body).to include(I18n.t("opponent_details.domestic_abuse.warning_letter_reasons", scope:)) + expect(response.body).to include(I18n.t("opponent_details.domestic_abuse.police_notified_details", scope:)) + expect(response.body).to include(I18n.t("opponent_details.domestic_abuse.bail_conditions", scope:)) expect(response.body).to include(I18n.t("merits.items.statement_of_case", scope:)) expect(response.body).to include(I18n.t("merits_proceeding_section.prospects_of_success", scope:)) expect(response.body).to include(I18n.t("merits_proceeding_section.success_prospect", scope:))