Skip to content

Commit

Permalink
Merge pull request #7125 from ministryofjustice/ap-4216-update-abbrev…
Browse files Browse the repository at this point in the history
…iations

AP-4216: Update pages to display proceedings as in designs
  • Loading branch information
agoldstone93 authored Sep 9, 2024
2 parents bc1003e + af7201e commit 3b9b645
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 23 deletions.
2 changes: 1 addition & 1 deletion app/models/cfe/empty/empty_result.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def self.blank_cfe_result
income_contribution: 0.0,
matter_types: [
{
matter_type: "Domestic abuse",
matter_type: "domestic abuse (DA)",
result: "no_assessment",
},
],
Expand Down
2 changes: 1 addition & 1 deletion app/services/query/incomplete_proceedings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def query
(
NOT EXISTS (select 'has_scope_limitations' FROM scope_limitations where (proceeding_id = proceedings.id))
OR (used_delegated_functions IS NULL)
OR (accepted_substantive_defaults IS NULL AND matter_type != 'Special Children Act')
OR (accepted_substantive_defaults IS NULL AND ccms_matter_code != 'KPBLW')
OR (client_involvement_type_ccms_code IS NULL)
OR (used_delegated_functions = true AND accepted_emergency_defaults IS NULL)
OR (accepted_substantive_defaults = false
Expand Down
2 changes: 1 addition & 1 deletion app/views/providers/has_other_proceedings/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<%= summary_list.with_row(html_attributes: { id: "proceeding_type_#{proceeding.ccms_code}" }) do |row| %>
<%= row.with_value do %>
<%= proceeding.meaning %><br>
<span class="govuk-hint"><%= proceeding.category_of_law %> (<%= proceeding.matter_type %>)</span>
<span class="govuk-hint"><%= proceeding.matter_type.humanize %>, <%= proceeding.category_of_law.downcase %></span>
<% end %>
<% if proceeding.sca_type == "core" && @legal_aid_application.related_proceedings.any? %>
<%= row.with_action(
Expand Down
2 changes: 1 addition & 1 deletion app/views/providers/proceedings_types/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
:id,
proceeding_type.ccms_code,
label: { text: proceeding_type.meaning },
hint: { text: "#{proceeding_type.ccms_category_law} (#{proceeding_type.ccms_matter})" },
hint: { text: "#{proceeding_type.ccms_matter.humanize}, #{proceeding_type.ccms_category_law.downcase}" },
) %>
</div>
<% end %>
Expand Down
2 changes: 2 additions & 0 deletions config/initializers/inflections.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@
inflect.acronym "HMRC"
inflect.acronym "SCA"
inflect.acronym "PDA"
inflect.acronym "S8"
inflect.acronym "DA"
end
16 changes: 8 additions & 8 deletions features/support/puffing_billy_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def proceeding_search_term_stubs
description: "to be represented on an application for a non-molestation order.",
full_s8_only: false,
ccms_category_law: "Family",
ccms_matter: "Domestic abuse",
ccms_matter: "domestic abuse (DA)",
},
],
},
Expand All @@ -181,15 +181,15 @@ def proceeding_search_term_stubs
description: "to be represented on an application for an injunction, order or declaration under the inherent jurisdiction of the court.",
full_s8_only: false,
ccms_category_law: "Family",
ccms_matter: "Domestic abuse",
ccms_matter: "domestic abuse (DA)",
},
{
meaning: "Harassment - injunction",
ccms_code: "DA003",
description: "to be represented in an action for an injunction under section 3 Protection from Harassment Act 1997.",
full_s8_only: false,
ccms_category_law: "Family",
ccms_matter: "Domestic abuse",
ccms_matter: "domestic abuse (DA)",
},
],
},
Expand All @@ -203,7 +203,7 @@ def proceeding_search_term_stubs
description: "to be represented on an application for an occupation order.",
full_s8_only: false,
ccms_category_law: "Family",
ccms_matter: "Domestic abuse",
ccms_matter: "domestic abuse (DA)",
},
],
},
Expand All @@ -217,7 +217,7 @@ def proceeding_search_term_stubs
description: "To be represented on an application for a Female Genital Mutilation Protection Order under the Female Genital Mutilation Act.",
full_s8_only: false,
ccms_category_law: "Family",
ccms_matter: "Domestic abuse",
ccms_matter: "domestic abuse (DA)",
},
],
},
Expand All @@ -231,15 +231,15 @@ def proceeding_search_term_stubs
description: "to be represented in an action for an injunction under section 3 Protection from Harassment Act 1997.",
full_s8_only: false,
ccms_category_law: "Family",
ccms_matter: "Domestic abuse",
ccms_matter: "domestic abuse (DA)",
},
{
meaning: "Non-molestation order",
ccms_code: "DA004",
description: "to be represented on an application for a non-molestation order.",
full_s8_only: false,
ccms_category_law: "Family",
ccms_matter: "Domestic abuse",
ccms_matter: "domestic abuse (DA)",
},
],
},
Expand All @@ -253,7 +253,7 @@ def proceeding_search_term_stubs
description: "to be represented on an application for a child arrangements order - where the child(ren) will live",
full_s8_only: false,
ccms_category_law: "Family",
ccms_matter: "Children - section 8",
ccms_matter: "section 8 children (S8)",
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion spec/factories/cfe_results/empty/mock_results.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def self.no_assessment
income_contribution: 0.0,
matter_types: [
{
matter_type: "Domestic abuse",
matter_type: "domestic abuse (DA)",
result: "no_assessment",
},
],
Expand Down
8 changes: 4 additions & 4 deletions spec/factories/proceedings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
used_delegated_functions_on { nil }
used_delegated_functions_reported_on { nil }
name { "prohibited_steps_order_s8" }
matter_type { "Children - section 8" }
matter_type { "section 8 children (S8)" }
category_of_law { "Family" }
category_law_code { "MAT" }
ccms_matter_code { "KSEC8" }
Expand Down Expand Up @@ -308,7 +308,7 @@
used_delegated_functions_on { nil }
used_delegated_functions_reported_on { nil }
name { "child_assessment_order_sca" }
matter_type { "Special Children Act" }
matter_type { "special children act (SCA)" }
category_of_law { "Family" }
category_law_code { "MAT" }
ccms_matter_code { "KPBLW" }
Expand All @@ -331,7 +331,7 @@
used_delegated_functions_on { nil }
used_delegated_functions_reported_on { nil }
name { "app_contact_child_in_care_sca" }
matter_type { "Special Children Act" }
matter_type { "special children act (SCA)" }
category_of_law { "Family" }
category_law_code { "MAT" }
ccms_matter_code { "KPBLW" }
Expand All @@ -351,7 +351,7 @@
used_delegated_functions_on { nil }
used_delegated_functions_reported_on { nil }
name { "app_for_supervision_order_sca" }
matter_type { "Special Children Act" }
matter_type { "special children act (SCA)" }
category_of_law { "Family" }
category_law_code { "MAT" }
ccms_matter_code { "KPBLW" }
Expand Down
12 changes: 6 additions & 6 deletions spec/services/legal_framework/proceeding_types/all_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def all_proceeding_types_payload
ccms_category_law: "Family",
ccms_category_law_code: "MAT",
ccms_matter_code: "MINJN",
ccms_matter: "Domestic abuse",
ccms_matter: "domestic abuse (DA)",
},
{
ccms_code: "SE097",
Expand All @@ -57,7 +57,7 @@ def all_proceeding_types_payload
ccms_category_law: "Family",
ccms_category_law_code: "MAT",
ccms_matter_code: "KSEC8",
ccms_matter: "Children - section 8",
ccms_matter: "section 8 children (S8)",
},
{
ccms_code: "DA003",
Expand All @@ -69,7 +69,7 @@ def all_proceeding_types_payload
ccms_category_law: "Family",
ccms_category_law_code: "MAT",
ccms_matter_code: "MINJN",
ccms_matter: "Domestic abuse",
ccms_matter: "domestic abuse (DA)",
},
{
ccms_code: "SE016E",
Expand All @@ -81,7 +81,7 @@ def all_proceeding_types_payload
ccms_category_law: "Family",
ccms_category_law_code: "MAT",
ccms_matter_code: "KSEC8",
ccms_matter: "Children - section 8",
ccms_matter: "section 8 children (S8)",
},
{
ccms_code: "DA006",
Expand All @@ -93,7 +93,7 @@ def all_proceeding_types_payload
ccms_category_law: "Family",
ccms_category_law_code: "MAT",
ccms_matter_code: "MINJN",
ccms_matter: "Domestic abuse",
ccms_matter: "domestic abuse (DA)",
},
{
ccms_code: "PB003",
Expand All @@ -105,7 +105,7 @@ def all_proceeding_types_payload
ccms_category_law: "Family",
ccms_category_law_code: "MAT",
ccms_matter_code: "KPBLW",
ccms_matter: "Special Children Act",
ccms_matter: "special children act (SCA)",
},
].to_json
end
Expand Down

0 comments on commit 3b9b645

Please sign in to comment.