ministryofjustice/Claim-for-Crown-Court-Defence

View on GitHub
app/views/external_users/claims/summary/_section_status.html.haml

Summary

Maintainability
Test Coverage
- missing_dependencies = claim.missing_dependencies_for(step)

- unless missing_dependencies.empty?
  = govuk_inset_text do
    %h3.govuk-heading-s
      = t('external_users.claims.check_your_claim.missing_information.header')
    %p
      = t('external_users.claims.check_your_claim.missing_information.section_help_text', section: t("external_users.claims.#{section}.summary.header"))

    %ul.govuk-list.govuk-list--bullet
      - claim.summary_sections.each do |section, associated_step|
        - if missing_dependencies.include?(associated_step)
          %li
            = t("external_users.claims.#{section}.summary.header")