diff --git a/app/controllers/dashboards_controller.rb b/app/controllers/dashboards_controller.rb index e027dbcf4..4e091b4a8 100644 --- a/app/controllers/dashboards_controller.rb +++ b/app/controllers/dashboards_controller.rb @@ -46,7 +46,8 @@ def search_params :caseworker_id, :sort_by, :sort_direction, - :application_type + :application_type, + :high_value ).merge(default_params) end diff --git a/app/controllers/nsm/searches_controller.rb b/app/controllers/nsm/searches_controller.rb index ee3bdc483..bd4058125 100644 --- a/app/controllers/nsm/searches_controller.rb +++ b/app/controllers/nsm/searches_controller.rb @@ -24,6 +24,7 @@ def search_params :updated_from, :updated_to, :status_with_assignment, + :high_value, :caseworker_id, :sort_by, :sort_direction diff --git a/app/forms/search_form.rb b/app/forms/search_form.rb index 39688c020..99de36964 100644 --- a/app/forms/search_form.rb +++ b/app/forms/search_form.rb @@ -13,6 +13,7 @@ class SearchForm < SearchResults attribute :status_with_assignment, :string attribute :caseworker_id, :string attribute :application_type, :string + attribute :high_value, :boolean validate :at_least_one_field_set validates :application_type, presence: true @@ -26,6 +27,10 @@ def caseworkers [show_all] + User.order(:last_name, :first_name).map { Option.new(_1.id, _1.display_name) } end + def claim_values + [show_all] + %i[high_value].map { Option.new(_1, I18n.t("search.claim_values.#{_1}")) } + end + def statuses [show_all] + %i[ not_assigned @@ -50,7 +55,7 @@ def at_least_one_field_set fields = [:query, :submitted_from, :submitted_to, :updated_from, :updated_to, :status_with_assignment, - :caseworker_id] + :caseworker_id, :high_value] field_set = fields.any? do |field| send(field).present? diff --git a/app/views/shared/_search.html.erb b/app/views/shared/_search.html.erb index e531e2ea6..ea0ab2696 100644 --- a/app/views/shared/_search.html.erb +++ b/app/views/shared/_search.html.erb @@ -65,6 +65,17 @@
+ <% if choose_application_type || @search_form.application_type == 'crm7' %> +
+
+ <%= f.govuk_collection_select :high_value, + @search_form.claim_values, + :value, + :label, + label: { text: t(".claim_value"), size: 's' } %> +
+
+ <% end %>
<%= f.govuk_collection_select :status_with_assignment, diff --git a/config/locales/en.yml b/config/locales/en.yml index 1b21d633a..a12fafedb 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -71,6 +71,7 @@ en: updated_filter_hint: Enter a start date, end date or both, for example, 17/5/2024 updated_from: Last updated from updated_to: Last updated to + claim_value: Claim value search_results: zero: There are no results that match the search criteria one: "%{count} Search result" diff --git a/config/locales/en/nsm/search.yml b/config/locales/en/nsm/search.yml index 115d0d13a..3af308bdb 100644 --- a/config/locales/en/nsm/search.yml +++ b/config/locales/en/nsm/search.yml @@ -13,6 +13,8 @@ en: rejected: Rejected expired: Expired unassigned: Unassigned + claim_values: + high_value: High value nsm: searches: show: diff --git a/helm_deploy/values-dev.yaml b/helm_deploy/values-dev.yaml index da1916c74..b1f14ec4d 100644 --- a/helm_deploy/values-dev.yaml +++ b/helm_deploy/values-dev.yaml @@ -57,7 +57,7 @@ resources: variables: environment: development - appStoreUrl: https://main-nscc-store-dev.cloud-platform.service.justice.gov.uk + appStoreUrl: http://crm457-2154-add-hi.laa-crime-application-store-dev.svc.cluster.local enableSyncTriggerEndpoint: 'true' allowIndexing: 'false'